{"version":"2.1.271","anchor":"git-worktree-cleanup-gains-a-much-more-careful-safety-checke","canonical_anchor":"git-worktree-cleanup-gains-a-much-more-careful-safety-checke","heading":"Git worktree cleanup gains a much more careful safety-checked removal routine","tier":"notice","area":"Worktrees","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271\/e\/git-worktree-cleanup-gains-a-much-more-careful-safety-checke","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271","markdown":"### Git worktree cleanup gains a much more careful safety-checked removal routine\n\nGit worktree removal now runs through a much more careful safety-checked routine\n\n**What**\n\nClaude 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:\n\n- verifies that git's own worktree list is well-formed\n\n- refuses to touch the main worktree\n\n- checks for cross-host paths\n\n- checks for symlink or reparse-point tampering (tricks that could make a path point somewhere unexpected)\n\nIt also now reports a specific outcome for each removal attempt: kept, removed, unregistered, unlisted, or failed, instead of a plain success\/failure.\n\n**Why**\n\nThis 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.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5"}