Fall back to prune-based removal for submodule-bearing worktrees #6

Merged
weichen merged 1 commits from fix/task-finish-remove into main 2026-09-30 03:37:20 +00:00
1 Commits
Author SHA1 Message Date
weichen fdf63e3fc8 Fall back to prune-based removal for submodule-bearing worktrees
Why: git unconditionally refuses worktree remove when the tree contains
gitlinks (index-level check; deinit does not bypass it), so the PR#4 fix
path still failed on the second real task.
Evidence: after deinit the worktree was clean and submodule dirs empty, yet
remove refused; rm -rf + worktree prune is the documented workaround and
was proven manually on the empty-list task worktree.
Impact: task-finish now completes the recycle path automatically after its
merge verification; no guard weakened.
Refs: Agent-System-Dev PR#4; policy/tool-adaptation-matrix.md A5
2026-09-30 03:37:01 +00:00