Sweep 19 Sep 2026 · 02:36Z Build v2.1.278 500 read Stable v2.1.267 Latest v2.1.278 Next v2.1.278 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.271 ·

Git worktree cleanup gains a much more careful safety-checked removal routine

Git worktree removal now runs through a much more careful safety-checked routine

TierYou'll noticehow much it should matter to you
Useful2my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaWorktreeswhat it touches
KindImprovementsin v2.1.271,
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.

See this entry in the whole of v2.1.271 →