[DOCS] Background-session worktree isolation guard for non-git directories with a `WorktreeCreate` hook was fixed in v2.1.203 but the agent-view "How file edits are isolated" section and Version history table do not record the fix

Open 💬 0 comments Opened Jul 7, 2026 by coygeek

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/agent-view

Section/Topic

The "How file edits are isolated" subsection of the "Manage multiple agents with agent view" page (the bullet that begins "The working directory isn't a git repository and no WorktreeCreate hook is configured" and the closing paragraph about configuring a WorktreeCreate hook for non-git VCS checkouts). The "Version history" table at the bottom of the same page — the most recent row is currently v2.1.202, so v2.1.203 is missing entirely.

Current Documentation

The "How file edits are isolated" subsection currently states:

Every background session, whether started from agent view, /bg, or claude --bg, starts in your working directory. Before editing files, Claude moves the session into an isolated git worktree under .claude/worktrees/, so parallel sessions can read the same checkout but each writes to its own. Claude skips the worktree when: The session is already inside a linked git worktree, whether Claude created it under .claude/worktrees/ or you created it with git worktree add somewhere else The working directory isn't a git repository and no WorktreeCreate hook is configured * The write is outside the working directory

And the closing paragraph:

Outside a git repository, sessions write to the working directory directly and aren't isolated from each other, so avoid dispatching parallel sessions that edit the same files. If you use a different version control system, configure a WorktreeCreate hook and Claude isolates edits the same way it does for git.

The Version history table at the bottom of the page lists fixes back to v2.1.141 and currently ends at v2.1.202. There is no v2.1.203 row.

What's Wrong or Missing?

A. The non-git + WorktreeCreate hook case was unreliable before v2.1.203 for background sessions

The v2.1.203 changelog records:

Fixed background sessions started from a non-git directory unable to edit files when a WorktreeCreate hook was configured

The "How file edits are isolated" subsection already implies that configuring a WorktreeCreate hook in a non-git VCS checkout is enough for the isolation guard to enter the hook-created worktree and let the session edit there ("Claude isolates edits the same way it does for git"). Before v2.1.203 that implication was not actually true for background sessions: the isolation guard refused to honor the hook-created path, so a background session started in a non-git directory with a WorktreeCreate hook could not edit files. The page does not acknowledge that the previous behavior was broken in this configuration, so a reader who followed the documented rule before v2.1.203 would hit the bug without any in-page hint that the docs and the implementation disagreed.

B. The Version history table stops at v2.1.202

The Version history table is the canonical place on the agent-view page where readers learn when each documented behavior was added or fixed. It currently ends at v2.1.202 and has no row for v2.1.203, so a reader cross-referencing the v2.1.203 changelog will not find this fix listed alongside the other recent agent-view changes.

Suggested Improvement

A. Add a v2.1.203 row to the Version history table

Add the following row at the top of the Version history table on https://code.claude.com/docs/en/agent-view:

| v2.1.203 | {/* min-version: 2.1.203 */}In a non-git directory that configures a `WorktreeCreate` hook, background sessions now move into the hook-created worktree before editing, matching the rule under "How file edits are isolated". Before v2.1.203 the isolation guard refused the hook path and the session was blocked from editing. |

B. Note the fix in the "How file edits are isolated" subsection

Replace the closing sentence:

Outside a git repository, sessions write to the working directory directly and aren't isolated from each other, so avoid dispatching parallel sessions that edit the same files. If you use a different version control system, configure a WorktreeCreate hook and Claude isolates edits the same way it does for git.

with:

Outside a git repository, sessions write to the working directory directly and aren't isolated from each other, so avoid dispatching parallel sessions that edit the same files. If you use a different version control system, configure a WorktreeCreate hook and Claude isolates edits the same way it does for git. The hook path was unreliable for background sessions before v2.1.203 — the session was blocked from editing the hook's checkout — so users on a non-git VCS who depend on background isolation should be on v2.1.203 or later.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/agent-view | "How file edits are isolated" subsection + Version history table |

Total scope: 1 page affected.

The "Non-git version control" section of https://code.claude.com/docs/en/worktrees already documents how to write the WorktreeCreate hook itself (the SVN example in particular). The gap on the agent-view side is only that the page never tells background-session users that the hook path actually works after v2.1.203, and the Version history table never lists the fix.

View original on GitHub ↗