You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
WorktreesArea: what it touches
ImprovementsKind: in v2.1.327,
ImprovementsSection of the release
Unclear It is not clear what Claude Code does with this check, for example whether it removes empty worktrees automatically.
What
A worktree is an extra working copy of a git repository on its own branch. Claude Code can create one so work happens apart from your main copy.
Claude Code now checks whether a worktree's branch has any commits that are not already on the current branch or on a remote, which is a shared copy of the repository such as one on GitHub. The check reports the branch as having nothing of its own only when no such commits exist. It never reports that for a worktree that was set up through a hook.
Why
This could let Claude Code clean up worktrees that hold no unique work without risking commits that exist nowhere else.
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not clear what Claude Code does with this check, for example whether it removes empty worktrees automatically.