Unclear Which command triggers this cleanup is not stated.
What
A git worktree is an extra working copy of a repository in another folder, and git keeps a small record of each one inside the .git folder. When Claude Code removes a record for a worktree that no longer exists, it now does more checking first:
- it verifies where the record points before touching it
- it refuses symbolic links (shortcuts to other locations) and unusual paths
- it leaves locked worktrees alone
If it cannot complete the checks, it shows a warning starting "Could not vet the worktree registrations".
Why
This makes worktree cleanup harder to abuse with a deliberately crafted repository that tries to trick Claude Code into deleting files it should not.
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
Which command triggers this cleanup is not stated.