Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.330 ·

Worktrees can now come from a mod, including in projects that do not use git

Worktree isolation now works when a mod or hook supplies the copy, even outside git, with reworded prompts, errors and cleanup

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

What

A worktree is a separate working copy of a project. Claude Code can give one to a helper agent so that agent's edits stay apart from yours. Before this release, worktree mode needed a git repository or a WorktreeCreate hook, which is your own script that makes the copy. A mod, meaning a user-written add-on, can now supply worktrees too. Prompts, error messages and cleanup were reworked around this.

  • The worktree mode check now waits for the mod loader. If the installed mod is not loaded, it fails with a new message saying worktree mode needs a git repository, WorktreeCreate hooks or a mod.
  • A new section of the worker prompt says a folder that is not a git repository still supports isolation: "worktree" when a mod or hook makes the worktrees. In that case git and gh do not work, so workers commit and publish with the project's own version control and finish with PR: none. Phase 3 counts such a worker as done.
  • The Agent tool's isolation setting is now one shared definition with a new description covering "worktree" and "remote". "remote" runs the agent in a cloud environment, always in the background, and is only offered to some users. The "worktree" description says a project without version control that can make worktrees gets its own label in the folder.
  • Workflow web-fetch agents with isolation: 'worktree' now get their copy through the hook-based creator, which may hand back a copy made in place. Their prompt then says "worktree" or "project" instead of "git worktree" or "repo", and each agent gets an agent ID assigned in advance.
  • The error for a returned path that is not a folder now names WorktreeCreate for the ordinary hook, or the other provider by name, and ends with "answering" instead of "echoing".
  • The symlink error now names the vcs.isolate hook when a mod made the copy. That part is left out when you entered a worktree that already existed.
  • The error "Cannot create agent worktree: not in a git repository and no WorktreeCreate hooks are configured." can now use a default hint when an optional flag is set and no hook hint exists. When there is no hint, the text is the same as before.
  • The safety checks for hook-made worktrees moved into one shared function.
  • The git branch -D call that deletes a branch was replaced by a helper.
  • Worktree creation accepts new newIn and skipsSetup options.
  • Cleanup of stale worktrees now skips a worktree whose recorded path still exists.

Why

A project that does not use git can now give helper agents their own working copies, as long as a mod or a hook makes those copies. The messages now say which kind of provider made the copy, which helps when something goes wrong. The cleanup change means a stale worktree is left in place if its folder is still there.

Read from
Names in the bundleWorktreeCreate
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Added since A small documentation edit on Run parallel sessions with worktrees touched a line naming WorktreeCreate after this was published. When a subagent finishes, Claude Code keeps the worktree if git shows changed files, untracked files, or new commits there. Otherwise, Claude Code can remove the worktree right away. A kept worktree stays on disk until the [periodic sweep]… worktrees see the edit
Confirmed since Anthropic's documentation has since written up WorktreeCreate, on Intercept and control agent behavior with hooks. | `WorktreeCreate` | No | Yes | Claude Code needs a worktree, and the hook creates it instead of git | Create the worktree and return its path in [`hookSpecificOutput.worktreePath`](https://code.claude.com/docs/en/hooks#worktreecreate-outp… agent-sdk/hooks see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up WorktreeCreate, on Intercept and control agent behavior with hooks.

See this entry in the whole of v2.1.330 →

Feedback