Long-lived actors accumulate git worktrees; document the cause and safe cleanup
Long-lived actors accumulate git worktrees, and nothing cleans them up. On one host on 10 Oct we counted 279 linked worktrees across our groups' repos, and they filled the disk twice in a week.
Why they build up:
- About 88% were created by agents running
git worktree addthemselves. No runtime removes those. - Claude Code cleans up its own subagent and background-session worktrees, but by its docs it keeps worktrees from sessions that are never backgrounded. A CCCC actor is stopped or restarted by the daemon, never exited interactively, so its worktrees are never swept.
CCCC itself creates no worktrees. We know worktree management was ruled out of scope in #32, and we're not proposing it. #140 documents the cause and the safe manual cleanup in the runtimes guide. A narrower FAQ-only version is linked there.
Thanks for documenting this operational issue and contributing PR #140. Your changes are now in main, with a few clarifications around runtime cleanup behavior and safe manual removal.
The guide now covers checking active processes, preserving unique commits and untracked/ignored files, inspecting locks, and previewing prune. One important detail we verified is that git worktree remove can delete ignored files even without --force.
We agree that documentation is the right scope here: CCCC cannot safely assume ownership of agent-created worktrees or their cleanup. Thanks for keeping the proposal practical and focused!