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 now vets repos before pruning ("prune gate")

Claude Code now checks a git repo is legitimate before pruning its worktrees

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

Claude Code now checks a git repo is legitimate before pruning its worktrees

What

Before running git worktree prune to clean up stale git worktrees (linked working directories for a repo), Claude Code now vets the repository first. It refuses to prune when the repo can't be verified as legitimate, for example if it lacks a real .git directory or bare root, has a commondir file, or has an unlistable .git/worktrees folder, and it reports a specific refusal reason for each worktree path instead of pruning blindly.

Why

This prevents Claude Code from running worktree cleanup against a repository structure it can't confidently recognize, avoiding unsafe or mistaken pruning.

See this entry in the whole of v2.1.271 →