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.265 ·

WorktreeCreate/WorktreeRemove hook gating and fallback behavior refined

Worktree create/remove hook handling was refined: fewer spurious errors and clearer checks for whether a hook applies

Group of 3 You'll notice Internal Changes
JSON All of v2.1.265
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
WorktreesArea: what it touches
Internal ChangesKind: in v2.1.265,
Bug FixesSection of the release

Unclear What other conditions the broader capability check considers beyond hook registration is not stated.

What

  • In the worktree-create flow, if no hook commands ran at all, the code used to always throw a "hook is configured but did not run" error. Now it first checks whether any WorktreeCreate hook is actually configured, and silently continues if none is, only throwing when a hook is genuinely configured but failed to run.
  • The decision of whether to use a WorktreeCreate hook (instead of falling back to the built-in git worktree flow) now goes through a renamed gate that checks either an existing predicate or the presence of a registered WorktreeCreate hook.
  • The existing WorktreeCreate/WorktreeRemove hook events are now also checked through a broader capability lookup (not just whether hooks are registered for them), used to decide whether the worktree create/remove UI is shown at all.

Why These changes reduce spurious "hook is configured but did not run" errors when no worktree hook is set up, and make the logic for whether worktree create/remove hooks and UI are active more consistent.

Read from
Names in the bundleWorktreeCreateWorktreeRemove
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 WorktreeRemove after this was published. When you exit an interactive worktree session, Claude checks the worktree for work that removal would delete: changed or untracked files, uncommitted work inside checked-out submodules, and new commits. These rules apply to worktrees Claud… worktrees see the edit
Confirmed since Anthropic's documentation has since written up WorktreeRemove, on Manage multiple agents with agent view. | v2.1.274 | When a [delete is refused](#what-deleting-a-session-removes) because git or your `WorktreeRemove` hook couldn't remove the worktree, a checked-out submodule that Claude Code verifies has no uncommitted changes to tracked files… agent-view see the edit
Added since A small documentation edit on Commands touched a line naming WorktreeCreate after this was published. | `/batch <instruction>` | **[Skill](/docs/en/skills#bundled-skills).** Orchestrate large-scale changes across a codebase in parallel. Researches the codebase, decomposes the work into 5 to 30 independent units, and presents a plan. Once a… commands see the edit
Confirmed since Anthropic's documentation has since written up WorktreeCreate, on Claude Code changelog. * Improved `/batch` to run where a WorktreeCreate hook provides the agent worktrees, not only inside a git repository changelog see 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 doubtWhat other conditions the broader capability check considers beyond hook registration is not stated.
Anthropic's documentation agreesAnthropic's documentation has since written up WorktreeCreate, on Claude Code changelog.

See this entry in the whole of v2.1.265 →

Feedback