docs(agents): dispatched work names its worktree; the main checkout is production #105
Reference in New Issue
Block a user
Delete Branch "docs/agents-worktree-rule"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a short "Worktrees: where dispatched work happens" section near the top of
AGENTS.md. opencode loads that file into every session, including dispatched workers.Why: worker sessions open in the main checkout (
/home/alee/Sources/6krrt) by default, and that checkout is production: the live router restarts from itsconfig.yaml. On 2026-09-28, after an opencode restart, Atlas dispatched workers whose prompts named no worktree, and one rewrote the main checkout's liveconfig.yaml. It was caught and reverted before any restart. The existing "work in a worktree" line sits under Git hygiene and never addressed dispatch.Rules added:
cdinto the named worktree; confirmgit rev-parse --show-toplevelbefore the first edit; if no worktree is named, stop and ask; never touch the main checkout unless the task says so.task()prompt withWORKTREE: <path>….category/subagent_type. A call with neither creates no worker but still reports "completed".oh-my-claudecode:*agents, which are pinned to unreachable Anthropic models.Verified live: after the section went into the working copy, Atlas's next dispatch opened with the
WORKTREE:line.Docs only; no code or tests touched.
🤖 Generated with Claude Code
https://claude.ai/code/session_01N9biTbFC63yDfYfUsZmhgd