Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.300 ·

Plugin WorktreeCreate hooks now run when --worktree creates a worktree

With --worktree, Claude Code now registers plugin worktree hooks before creating the worktree, and setup gains PR forge and resume options

Group of 2 You'll notice Bug Fixes
JSON All of v2.1.300
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

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.

Read from
Names in the bundle--worktreeWorktreeCreate
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.

Confirmed since Anthropic'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) | desktop see the edit
Confirmed since Anthropic'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 commits changelog see the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
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)

See this entry in the whole of v2.1.300 →

Feedback