Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.248 Home All releases olderv2.1.247 v2.1.250newer
Claude Code v2.1.248

Worktree exit dialog no longer pretends an uncountable branch has zero commits

You'll notice
Useful3 Signal1
Worktrees

Leaving a worktree warns about possible unpushed commits instead of claiming zero.

What

When leaving a worktree, Claude Code counts commits on its branch to tell you what removal would discard. If that count cannot be computed, the dialog now says so and warns the branch may hold unpushed commits, instead of silently claiming zero. Live for everyone.

Details
  • The count is only used when there is an original HEAD commit and git rev-list --count exits 0; hook-based worktrees count as zero; otherwise the count is null.
  • Unknown counts are reported as -1 in tengu_worktree_kept and tengu_worktree_removed rather than a fabricated 0.
  • The removal confirmation names the branch and mentions discarded work only when there were uncommitted changes.
Evidence

Worktree and branch ${a.worktreeBranch} removed., may hold unpushed commits (commit baseline unavailable). The branch will be deleted if you remove., tengu_worktree_removed

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

Related

Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.

See this entry in the whole of v2.1.248 →