Observed (2026-09-22, cluesmith/codev, after PR #1710 merged)
afx cleanup -p 1709 printed:
[info] To delete: git branch -d "builder/air-1709"
[ok] Builder builder-air-1709 cleaned up!
but afterwards:
git worktree list still shows .builders/air-1709 (912 MB on disk, branch builder/air-1709 still checked out there)
git branch -d builder/air-1709 refuses: "used by worktree"
- a second
afx cleanup -p 1709 says Builder not found for project: 1709 — the roster row is gone, so the CLI can no longer reach the worktree it failed to remove
A manual git worktree remove .builders/air-1709 (non-force) fails with "contains modified or untracked files, use --force". The untracked files are only the spawn scaffolding (.builder-prompt.txt, .builder-role.md, .builder-session-id, .builder-start.sh, .claude/hooks/); tracked state was clean and every commit was on origin.
Expected
Either the worktree is actually removed (cleanup owns the scaffolding it wrote, so removing it, or using --force for a worktree whose branch is fully merged and pushed, is correct), or cleanup reports the failure and keeps the roster row so it can be retried — not "cleaned up!" with the worktree intact and the handle deleted.
Notes
Observed (2026-09-22, cluesmith/codev, after PR #1710 merged)
afx cleanup -p 1709printed:but afterwards:
git worktree liststill shows.builders/air-1709(912 MB on disk, branchbuilder/air-1709still checked out there)git branch -d builder/air-1709refuses: "used by worktree"afx cleanup -p 1709saysBuilder not found for project: 1709— the roster row is gone, so the CLI can no longer reach the worktree it failed to removeA manual
git worktree remove .builders/air-1709(non-force) fails with "contains modified or untracked files, use --force". The untracked files are only the spawn scaffolding (.builder-prompt.txt,.builder-role.md,.builder-session-id,.builder-start.sh,.claude/hooks/); tracked state was clean and every commit was on origin.Expected
Either the worktree is actually removed (cleanup owns the scaffolding it wrote, so removing it, or using
--forcefor a worktree whose branch is fully merged and pushed, is correct), or cleanup reports the failure and keeps the roster row so it can be retried — not "cleaned up!" with the worktree intact and the handle deleted.Notes
.claude/hooks/directory? anode_modulesfrom the builder'spnpm install --frozen-lockfile?). Worth checking whatgit worktree removeactually returned and whether its exit code is inspected.