Follow Discord
Sweep 08 Oct 2026 · 18:53Z Build v2.1.295 516 read Stable v2.1.286 Latest v2.1.295 Next v2.1.295 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.290 ·

Worktree removal checks the checkout first, and worktree errors are reworded

Claude Code now checks a git worktree before deleting it, and worktree error messages name fewer paths and suggest a different --worktree name

Group of 5 You'll notice Improvements
JSON All of v2.1.290
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
WorktreesArea: what it touches
ImprovementsKind: in v2.1.290,
ImprovementsSection of the release

Unclear Exactly when a stopped session's worktree record is dropped is not clear.

What

A git worktree is a second working folder for the same repository. Claude Code creates one when you start it with --worktree, and agents can get their own. This release changes how worktrees are removed and how worktree problems are reported.

  • Removal now first calls a new remover that checks the checkout before deleting anything. It only falls back to git worktree remove --force when the outcome is "unanchored". Before, it went straight to git worktree remove --force.
  • The remover reports one of four outcomes: removed, not_registered, refused or unanchored. A failed result carries the state of the checkout, and the check on the repository's git folder and root happens earlier.
  • Agent worktree removal goes through the same remover. New messages include "refused before anything was deleted" and "its .git file is missing or does not point to git's record of it".
  • An error about a worktree that belongs to a different repository no longer names the repositories.
  • Cleanup can now drop the registration of a stopped entry (dropIfStopped, deregisterIfStopped). The fallback log line now reads "falling back to removing the git worktree at" instead of "falling back to git worktree remove for".
  • When the branch is already checked out in another worktree, the error no longer names that worktree's path. It now says the branch "is already checked out elsewhere in this repository. Pass a different --worktree name."
  • The "already exists" error and other creation failures now include git's own error message.
  • Removal advice no longer gives ready-made rm -rf or git worktree remove commands with paths in them.
  • The warning about a redirected checkout now names ~/.claude/skills.
  • When a worktree name collides, a new message says "The worktree registration for ... was left in place; pass a different --worktree name."

Why

Because the checkout is checked before anything is deleted, a removal that is refused leaves your files untouched. Cleanup of worktrees for stopped sessions may also remove more than before. When creating a worktree fails, the usual fix is now to pick a different --worktree name. The messages no longer hand you exact paths or commands to delete folders, so you get less path-specific guidance than before.

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 doubtExactly when a stopped session's worktree record is dropped is not clear.

See this entry in the whole of v2.1.290 →

Feedback