Source Intelligence
Sweep 28 Aug 2026 · 16:06Z Build v2.1.251 479 read Stable v2.1.236 Latest v2.1.251 Next v2.1.251 Feeds RSS JSON llms.txt

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.

Prompt capture

EnterWorktree tool description

27 model strings share this prompt, byte for byte.

v2.1.242 36 lines 3220 chars sha256 6e2930159e8f Plain text Whole capture

1Use this tool ONLY when explicitly instructed to work in a worktree — either by the user directly, or by project instructions (CLAUDE.md / memory). This tool creates an isolated git worktree and switches the current session into it.
3## When to Use
5- The user explicitly says "worktree" (e.g., "start a worktree", "work in a worktree", "create a worktree", "use a worktree")
6- CLAUDE.md or memory instructions direct you to work in a worktree for the current task
8## When NOT to Use
10- The user asks to create a branch, switch branches, or work on a different branch — use git commands instead
11- The user asks to fix a bug or work on a feature — use normal git workflow unless worktrees are explicitly requested by the user or project instructions
12- Never use this tool unless "worktree" is explicitly mentioned by the user or in CLAUDE.md / memory instructions
14## Requirements
16- Must be in a git repository, OR have WorktreeCreate/WorktreeRemove hooks configured in settings.json
17- Must not already be in a worktree session when creating a new worktree (`name`); switching into another existing worktree via `path` is allowed
19## Behavior
21- In a git repository: creates a new git worktree inside `.claude/worktrees/` on a new branch. The base ref is governed by the `worktree.baseRef` setting: `fresh` (default) branches from origin/<default-branch>; `head` branches from your current local HEAD
22- Outside a git repository: delegates to WorktreeCreate/WorktreeRemove hooks for VCS-agnostic isolation
23- Switches the session's working directory to the new worktree
24- Use ExitWorktree to leave the worktree mid-session (keep or remove). On session exit, if still in the worktree, the user will be prompted to keep or remove it
26## Entering an existing worktree
28Pass `path` instead of `name` to switch the session into a worktree that already exists (e.g., one you just created with `git worktree add`). On first entry from the launch directory, the path must appear in `git worktree list` for the repository that owns it — the current repository or, in a multi-repo workspace, a repository nested inside it; paths registered by neither are rejected. ExitWorktree will not remove a worktree entered this way; use `action: "keep"` to return to the original directory.
30Switching with `path` also works when the session is already in a worktree (the previous worktree is left on disk, untouched, and only the new one is tracked for exit-time cleanup), and from agents whose working directory was pinned at launch (subagent isolation or explicit cwd). In both cases the target must be a worktree under `.claude/worktrees/` of the same repository, and from a pinned agent the switch only affects this agent, not the parent session. After a further switch, previously-visited worktrees are no longer writable — re-issue EnterWorktree with `path` to return to one.
32## Parameters
34- `name` (optional): A name for a new worktree. If neither `name` nor `path` is provided, a random name is generated.
35- `path` (optional): Path to an existing worktree to enter instead of creating one — of the current repository, or (on first entry from the launch directory) of a repository nested inside it. Mutually exclusive with `name`.