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 ·

Clearer error when a session writes into a different worktree

When an isolated session tries to write into another worktree, Claude Code now says so instead of calling it the shared checkout

You'll notice Improvements
JSON All of v2.1.290
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.290,
ImprovementsSection of the release

Unclear It is not clear whether there are other conditions that turn the guard on or off.

What

A worktree is a separate working copy of a git repository, so several tasks can work on the same project without touching each other's files. Claude Code can keep a background session confined to its own worktree, and it blocks writes and shell commands that reach outside it.

Before, the error always said the path was in the shared main checkout. Now Claude Code tracks which worktree the session belongs to. If the path is in a different worktree, it gives a separate message saying so and points to the copy of the file inside the session's own worktree.

The guard applies to background sessions, where CLAUDE_CODE_SESSION_KIND is bg. It is skipped when CLAUDE_CODE_HOST_WORKTREE is set.

Why

When several agents work in several worktrees at once, the old message could point at the wrong place. The new one says which kind of mistake happened, so the agent or you can fix the path.

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 whether there are other conditions that turn the guard on or off.

See this entry in the whole of v2.1.290 →

Feedback