[DOCS] Agent SDK tool reference missing `ExitWorktree` tool documentation

Open 💬 5 comments Opened Mar 10, 2026 by coygeek

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/headless

Section/Topic

Built-in tool type documentation for worktree lifecycle tools in Agent SDK references.

Current Documentation

Current Agent SDK TypeScript tool docs include:

### EnterWorktree Tool name: EnterWorktree Creates and enters a temporary git worktree for isolated work.

The ToolInputSchemas/ToolOutputSchemas sections list EnterWorktree types, but no ExitWorktree type or section is documented.

Python SDK tool input/output docs similarly include an Agent section and many tool schemas, but no documented ExitWorktree tool schema.

What's Wrong or Missing?

Release v2.1.72 added an ExitWorktree tool to leave an EnterWorktree session.

Current SDK docs document entering worktrees but not exiting them via tool call. That leaves the worktree lifecycle incomplete for SDK users who rely on the built-in tool schema pages to implement robust automation.

Suggested Improvement

Add ExitWorktree to Agent SDK tool references:

  1. TypeScript: include ExitWorktreeInput/ExitWorktreeOutput in schema unions and dedicated tool sections.
  2. Python: add ExitWorktree input/output schema blocks in the Tool Input/Output Types section.
  3. Briefly describe when to call ExitWorktree and expected behavior (for example cleanup/preserve semantics if applicable).

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/headless | 7-22 | Points users to Agent SDK docs for tool behavior, but worktree tool lifecycle docs are incomplete there |
| https://platform.claude.com/docs/en/agent-sdk/typescript | 1487-1497, 1931-1943 | Documents EnterWorktree only; no ExitWorktree tool section |
| https://platform.claude.com/docs/en/agent-sdk/python | 1919-1946 | Tool schema docs include many tools but no ExitWorktree section |

Total scope: 3 pages affected

Source: Release v2.1.72

  • Added ExitWorktree tool to leave an EnterWorktree session

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗