coily dispatch should not mutate .claude/* during startup - poisons its own reap #122
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
coily dispatchstartup mutates.claude/lockdown-deny.shand.claude/settings.json(and sometimes.claude/scheduled_tasks.lock) inside the dispatch worktree as part of the lockdown wrapper.coily dispatch reaprefuses to clean worktrees with modified or untracked files. Net result: every dispatch session becomes permanently un-reapable after it exits, because the dispatch itself dirties the tree.Evidence
Six stale dispatch worktrees observed 2026-05-27, all with identical 2-file dirty state, all on branches that have already been merged to
origin/main:.dispatch-worktrees/agent-guard/issue-32(closed).dispatch-worktrees/backend/issue-91(+D .claude/scheduled_tasks.lock).dispatch-worktrees/coily/issue-258.dispatch-worktrees/repo-recall/issue-254.dispatch-worktrees/session-lattice/issue-37.dispatch-worktrees/voice-flow-learning-loop/issue-20(merged HEAD message:closes #20)All six show only:
The work shipped. The dirt is bookkeeping the dispatch itself wrote.
Fix
coily dispatchshould not mutate.claude/*inside the worktree during startup. Kai's call 2026-05-27.Implementation options to evaluate, in rough preference order:
.claude/*at all in the dispatch worktree - read settings from the parent checkout, or generate per-session config under/tmpinstead of the working tree..claude/*paths back to HEAD as the dispatch tears down (atexit handler in the wrapper).Out of scope
git worktree remove --force(or areap --force) clears them. The work in each is already merged to main; no salvage needed..dispatch-worktrees/gauntlet/issue-39directory, which is a different failure mode (worktree registration deleted, dir survived). Separate cleanup,rm -rfis safe.agentic-os/issue-149worktree, which has a third dirty pattern (.claude/,agentic_os.egg-info/,uv.lockuntracked). Likely a related but distinct gitignore-coverage issue.Context
Discovered while trying to re-dispatch the seven stale worktrees per Kai's instinct, after noticing them in a
coily dispatch interactiverun for an unrelated issue (agentic-os-kai#364, the icon issue). Most issue refs no longer resolve on GitHub (issues disabled) or Forgejo (404), so re-dispatch was a dead end - which is what surfaced the cleanup question and the underlying bug.Merged into #12 in the 2026-05-29 backlog burn-down. Same dispatch .claude mutation poisons own reap Reopen if it should stand alone.