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 ·

Worktree moves are refused outside the starting folder, and exits explain kept worktrees

Claude Code refuses to move a session into a worktree outside its starting folder, and says why a worktree was kept when the return folder changed

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

A worktree is a separate working copy of a git repository. Claude Code now refuses to move a session into a worktree that sits outside the folder the server was started in.

ExitWorktree now notices when the folder it would return to leads somewhere different from when its permission check ran. In that case it keeps the worktree and says it "did not remove it, since the directory to go back to has changed". The old message only said it had exited the worktree but could not remove it.

Why

Entering and leaving worktrees is stricter in sessions run by a server. A worktree is not deleted when the folder you would return to has quietly changed.

See this entry in the whole of v2.1.331 →

Feedback