[DOCS] `EnterWorktree` docs omit confirmation for worktrees outside `.claude/worktrees/`
Documentation Type
Unclear/confusing documentation
Documentation Location
https://code.claude.com/docs/en/tools-reference
Section/Topic
The EnterWorktree tool row and the "Create a worktree" section of the worktrees guide.
Current Documentation
The tool reference says:
"Creates an isolated git worktree and switches into it. Pass a path to switch into an existing worktree instead of creating a new one."
The worktrees guide says:
"Once in a worktree, Claude can switch directly to another one under.claude/worktrees/by callingEnterWorktreewith the target path."
Neither passage describes the confirmation boundary for an existing worktree elsewhere on disk.
What's Wrong or Missing?
As of v2.1.206, EnterWorktree asks the user for confirmation before entering a Git worktree outside the project's .claude/worktrees/ directory. This is an important safety and interaction contract: an agent cannot silently move the session into an arbitrary externally located worktree.
The current tool row broadly says the path form switches into an existing worktree, while the guide only describes the no-extra-confirmation path under .claude/worktrees/. Readers are not told what happens for a registered worktree created with a path such as git worktree add ../feature.
Suggested Improvement
Add a versioned note to both references, for example:
Whenpathpoints outside the current project's.claude/worktrees/directory, Claude Code asks you to confirm before switching the session into that worktree. Worktrees under the managed directory do not trigger this additional location confirmation. Requires Claude Code v2.1.206 or later.
Clarify whether this confirmation applies in non-interactive execution and what EnterWorktree returns when confirmation cannot be collected or is declined.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/tools-reference | 24 | EnterWorktree path behavior |
| https://code.claude.com/docs/en/worktrees | 35 | Switching to an existing worktree during a session |
Total scope: 2 pages affected.
Version: External-worktree confirmation added in Claude Code v2.1.206.