[DOCS] EnterWorktree docs omit new `path` parameter for existing worktrees
Documentation Type
Incorrect/outdated documentation
Documentation Location
https://code.claude.com/docs/en/agent-sdk/typescript
Section/Topic
EnterWorktree tool input schema and behavior description
Current Documentation
The docs currently say:
type EnterWorktreeInput = { name?: string; }; Creates and enters a temporary git worktree for isolated work.
The tools reference also says:
EnterWorktree | Creates an isolated git worktree and switches into it
What's Wrong or Missing?
Changelog v2.1.105 added a new path parameter to EnterWorktree so callers can switch into an existing worktree of the current repository.
The current documentation still describes the older behavior only:
A. The input schema is outdated
EnterWorktreeInput shows only name?: string and does not document the new path parameter.
B. The behavior description is now too narrow
The docs say EnterWorktree creates a temporary/isolated worktree, but the changelog shows it can also switch into an existing worktree when path is supplied.
Without this update, SDK users and tool users cannot discover that existing-worktree reuse is supported in v2.1.105.
Suggested Improvement
Update the EnterWorktree documentation to reflect the v2.1.105 behavior:
- Add the new
pathfield to the documented input schema. - Clarify that
EnterWorktreecan either create a worktree or switch into an existing worktree of the current repository whenpathis provided. - Update the tools reference description so it no longer implies creation is the only behavior.
Suggested outline:
type EnterWorktreeInput = { name?: string; path?: string; };
Then add a short explanation of when to use name versus path, with one example of entering an existing worktree by path.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/agent-sdk/typescript | EnterWorktreeInput currently shows only name?: string and says the tool creates a temporary git worktree |
| https://code.claude.com/docs/en/tools-reference | EnterWorktree is described only as creating an isolated worktree |
| https://platform.claude.com/docs/en/agent-sdk/typescript | Agent SDK cross-reference with the same outdated EnterWorktreeInput schema and behavior text |
Total scope: 3 pages affected
Source: Changelog v2.1.105
Exact changelog entry:
Addedpathparameter to theEnterWorktreetool to switch into an existing worktree of the current repository
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗