Skip to content

docs: split git workflow by execution context#49

Merged
jonnyparris merged 2 commits intomainfrom
docs/session-context-git-workflow
Apr 25, 2026
Merged

docs: split git workflow by execution context#49
jonnyparris merged 2 commits intomainfrom
docs/session-context-git-workflow

Conversation

@jonnyparris
Copy link
Copy Markdown
Owner

Summary

  • AGENTS.md now distinguishes Dodo-session runtime (sandboxed clone in a DO, no shell, no parent dir) from local opencode-CLI runtime (~/dev/dodo on a laptop). Worktree workflow stays for the local case; sessions branch directly via git_checkout + git_push_checked.
  • Added two rules to SYSTEM_PROMPT under Git safety: never use git worktree from inside a session, and open the PR before replying (construct the compare URL if needed).

Why

Session da9f961f read AGENTS.md, hit the "Worktrees Required" section, found git worktree add was not available as a tool, improvised a feature branch in-place, then forgot to push and open the PR until asked twice. That's a documentation problem, not a model problem — the guidance was written for opencode-CLI use on a laptop and leaked into the Dodo runtime.

Validation

  • Typecheck: pre-existing errors in test/idle-session-cleanup.test.ts (present on main, unchanged by this PR). No new errors introduced.
  • No runtime code changed beyond two prompt strings.

beep-boop-🤖

Dodo sessions run in sandboxed Durable Object clones — there is no
parent checkout to share with and no concurrent local agent to
collide with, so 'git worktree add' is meaningless and unavailable
as a tool. Following the existing 'Worktrees Required' guidance
caused session da9f961f to improvise a branch in-place and forget
to push/open the PR until asked twice.

AGENTS.md now splits the guidance:
- Dodo session runtime: branch via git_checkout, push with
  git_push_checked, open the PR before replying.
- Local opencode CLI in ~/dev/dodo: keep the worktree workflow.

Also adds two short rules to SYSTEM_PROMPT under Git safety:
- Never use git worktree (you are the sandboxed clone).
- Open the PR before replying — construct the compare URL if
  no dispatch tool opens it for you.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 25, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
dodo 3342d97 Apr 25 2026, 03:06 PM

…n tests

The generics are <O extends DurableObject, R> — DurableObject type
first, return type second. The tests had them swapped, which made
TypeScript infer the return type as a DurableObject and fail.

Tests pass (4/4) and typecheck is clean.
@jonnyparris jonnyparris marked this pull request as ready for review April 25, 2026 15:06
@jonnyparris jonnyparris merged commit c7b54aa into main Apr 25, 2026
2 of 3 checks passed
@jonnyparris jonnyparris deleted the docs/session-context-git-workflow branch April 25, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant