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

VCS-Agnostic Worktree Isolation via Hooks

Entry
JSON All of v2.1.50
EntryKind: in v2.1.50,
ChangesSection of the release
What

Custom hooks for creating and removing worktrees, enabling worktree isolation to work with any version control system—not just Git.

Usage

Configure hooks in your settings.json:

{
  "hooks": {
    "WorktreeCreate": [{
      "command": "your-worktree-create-script"
    }],
    "WorktreeRemove": [{
      "command": "your-worktree-remove-script"
    }]
  }
}
Details
  • WorktreeCreate hook receives JSON input with name (suggested worktree slug); stdout should contain the absolute path to the created worktree
  • WorktreeRemove hook receives JSON input with worktree_path (absolute path to worktree); exit code 0 indicates successful removal
  • Enables worktree isolation for non-Git VCS systems (Mercurial, SVN, etc.)
  • Error messages guide users when hooks are missing or fail
Evidence

Hook types and error messages (search for "WorktreeCreate", "WorktreeRemove", "Configure WorktreeCreate/WorktreeRemove hooks")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agreeAdded WorktreeCreate and WorktreeRemove hook events, enabling custom VCS setup and teardown when agent worktree isolation creates or removes…

See this entry in the whole of v2.1.50 →

Feedback