{"version":"2.1.271","anchor":"git-worktree-cleanup-now-vets-repos-before-pruning-prune-g","canonical_anchor":"git-worktree-cleanup-now-vets-repos-before-pruning-prune-g","heading":"Git worktree cleanup now vets repos before pruning (\"prune gate\")","tier":"notice","area":"Worktrees","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271\/e\/git-worktree-cleanup-now-vets-repos-before-pruning-prune-g","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271","markdown":"### Git worktree cleanup now vets repos before pruning (\"prune gate\")\n\nClaude Code now checks a git repo is legitimate before pruning its worktrees\n\n**What**\n\nBefore 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.\n\n**Why**\n\nThis prevents Claude Code from running worktree cleanup against a repository structure it can't confidently recognize, avoiding unsafe or mistaken pruning.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5"}