Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.324 ·

Hidden worktree-hook command lets Claude Desktop run worktree hooks

A hidden worktree-hook command runs WorktreeCreate or WorktreeRemove hooks, reports JSON, and refuses to fall back to a plain git worktree

Group of 2 You'll notice Notable New Features
JSON All of v2.1.324
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
4Signal: worth watching, 1 to 5
WorktreesArea: what it touches
New FeaturesKind: in v2.1.324,
What probably matters to youSection of the release

What

A worktree is a separate working copy of a project. WorktreeCreate and WorktreeRemove are hooks, commands you configure to run when a worktree is created or removed. A new hidden command drives these hooks:

  • worktree-hook runs those hooks for the current folder and reports the result as JSON on the last line of its output. Its description says it is used by Claude Desktop.
  • It takes --event, --name, --path and --trusted-folder, and --json is required.
  • It refuses to run in several cases: its output goes to a terminal, it was started by a session, trust is not stated, the trusted folder is not the current folder, or the path is unsafe. Reasons are reported as strings such as stdout_is_tty and create_wants_a_trusted_folder.
  • For a create event it runs in hook-only mode. If no WorktreeCreate hook made a worktree, it stops with "No WorktreeCreate hook made a worktree: none ran, or none is enabled any more" instead of going on to create a plain git worktree.
  • It can report an outcome of not_configured, and for hooks that come from plugins it reports mayBeCheckouts.

Why

Claude Desktop can use this command to run your worktree hooks through Claude Code. Because the command is hidden and refuses to write to a terminal, you cannot run it from a normal terminal session. In hook-only mode, a missing or disabled hook produces an error rather than a git worktree you did not ask for.

Read from
Names in the bundleworktree-hookWorktreeCreateWorktreeRemove
What the documentation says
--event reference modified, high confidence Event deltas are stream-only preview events. The server emits them on stream connections (session-level or per-thread) that opt in with the `event_deltas` (curl: `event_deltas[]`; cli: `--event-delta`; java, php: `eventDeltas`; csharp, go:… see the edit
--json Claude Code changelog modified, high confidence * Added `unsetOptionCount` to the `claude plugin install --json` result: how many `userConfig` options are not yet set see the edit
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 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 agrees--event on reference

See this entry in the whole of v2.1.324 →

Feedback