Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.50 Home All releases olderv2.1.49 v2.1.51newer
Claude Code v2.1.50

VCS-Agnostic Worktree Isolation via Hooks

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.

Related

Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.

See this entry in the whole of v2.1.50 →