You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
WorktreesArea: what it touches
Bug FixesKind: in v2.1.300,
Bug FixesSection of the release
Unclear How a reader asks Claude Code to reuse an existing worktree as it is is not stated.
What
--worktree starts Claude Code in a separate working copy of your project, called a worktree. Plugins can supply a hook for this. A hook is a small program that runs when a certain event happens, and the WorktreeCreate hook runs when a worktree is being created, replacing the default git behaviour.
Before this release, Claude Code did not register plugin worktree hooks before creating the worktree at startup, so a plugin's WorktreeCreate hook did not run. Startup now registers them first. Other changes in the same part of startup:
If registering the plugin hooks fails, Claude Code logs a warning saying the plugin's WorktreeCreate hook will not run.
Worktree setup now takes a pull request as a number plus a forge, meaning the hosting service the pull request lives on. Before, it took a bare number.
Setup takes a new resumeAsIs option, connected to cloud attach.
Setup takes a new final option that is on by default and controls one further setup step.
The record Claude Code logs when a worktree is created gains the fields for_cloud_attach and resumed_existing.
The root-privilege check is unchanged. Its message wording is also unchanged apart from the phrase "Configure a WorktreeCreate hook".
Why
If you use a plugin that creates worktrees its own way, its WorktreeCreate hook can now run when you start Claude Code with --worktree. This could matter, for example, for version control systems other than git. If the hook still does not run, check the log for the new warning.
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.
Confirmed sinceAnthropic's documentation has since written up --worktree, on Desktop application.| Session isolation | [`--worktree`](/docs/en/cli-reference) flag | [Run a session in its own worktree](#run-a-session-in-its-own-worktree) |desktopsee the edit
Confirmed sinceAnthropic's documentation has since written up WorktreeCreate, on Claude Code changelog.- Fixed quitting removing a worktree made by a `WorktreeCreate` hook without asking when it may hold unpushed commitschangelogsee the edit
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 doubtHow a reader asks Claude Code to reuse an existing worktree as it is is not stated.
Anthropic's documentation agreesAnthropic's documentation has since written up WorktreeCreate, on Claude Code changelog.
Anthropic's release notes agreeFixed plugin WorktreeCreate and WorktreeRemove hooks not running when Claude Code starts with --worktree (not yet with --tmux)