You'll notice
Git worktree removal now runs through a much more careful safety-checked routine
What
Claude Code now uses a large new internal routine to remove git worktrees (a git feature that lets multiple working copies share one repository). Before removing anything, it now:
- verifies that git's own worktree list is well-formed
- refuses to touch the main worktree
- checks for cross-host paths
- checks for symlink or reparse-point tampering (tricks that could make a path point somewhere unexpected)
It also now reports a specific outcome for each removal attempt: kept, removed, unregistered, unlisted, or failed, instead of a plain success/failure.
Why
This makes worktree cleanup much less likely to remove the wrong directory or follow a tampered path, and the more detailed outcomes make it clearer what actually happened when a cleanup doesn't go as expected.