Follow Discord
Sweep 23 Nov 2026 · 19:13Z Build v2.1.331 548 read Stable v2.1.323 Latest v2.1.330 Next v2.1.331 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.331 ·

Stale worktree entries are moved aside before removal on Linux and WSL

On Linux and WSL, Claude Code now moves a stale worktree entry aside and checks it before emptying it, instead of deleting it in place

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

A git worktree is an extra working folder tied to the same repository, and git keeps a record of each one. When Claude Code removes the record of a worktree that no longer exists, on Linux and WSL it now:

  • Renames the record into a worktrees/claude-dropped-* folder.
  • Checks that the moved folder is the one it meant to remove.
  • Empties it there.

Before, it deleted the record in place. Claude Code now shows a warning if the move fails because the target is on a different filesystem (the EXDEV error), or if the entry changed before it could be removed.

Why

Commands running in the sandbox, a restricted environment Claude Code uses to run commands safely, could still be using the worktree. Moving the entry first avoids a timing clash where a running command and the cleanup touch the same files at once.

See this entry in the whole of v2.1.331 →

Feedback