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.