[DOCS] Inconsistency in Bash Tool Input Schema: `restart` parameter used in examples but missing from SDK definitions

Resolved 💬 4 comments Opened Jan 21, 2026 by coygeek Closed Feb 27, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool

Section/Topic

The "Implement the bash tool" section and the "Parameters" section on the Bash tool page, specifically regarding the restart parameter.

Current Documentation

In the Bash tool documentation (docs/en/agents-and-tools/tool-use/bash-tool), under "Parameters":

restart: Set to true to restart the bash session

In the Implement the bash tool section, the Python example code includes:

if content.input.get("restart"):
    bash_session.restart()
    result = "Bash session restarted"

However, in the Agent SDK TypeScript Reference (docs/en/agent-sdk/typescript), the BashInput interface is defined as:

interface BashInput {
  command: string;
  timeout?: number;
  description?: string;
  run_in_background?: boolean;
}

What's Wrong or Missing?

There is a contradiction between the Bash tool documentation and the Agent SDK type definitions regarding the valid input schema for the bash_20250124 tool.

  1. The Bash tool page claims restart is a valid parameter and uses it in the implementation logic.
  2. The Agent SDK documentation (and the underlying API schema definition implied by ToolBash20250124) does not list restart as a valid input field. It instead lists timeout, description, and run_in_background.

If a developer follows the Agent SDK types, they will not account for restart. Conversely, if the model attempts to use restart based on the Bash tool documentation's logic, it may fail validation against the SDK types, or the developer may not have implemented the logic to handle it if they relied on the SDK interface definitions.

Suggested Improvement

The documentation should be harmonized to reflect the actual capabilities of the bash_20250124 tool.

Scenario A: If restart is NOT supported natively by the tool schema:
Remove the restart parameter from the "Parameters" table and remove the restart logic from the Python implementation example in docs/en/agents-and-tools/tool-use/bash-tool.

Scenario B: If restart IS supported:
Update the BashInput interface definition in docs/en/agent-sdk/typescript (and the Python equivalent) to explicitly include restart?: boolean.

Impact

High - Prevents users from using a feature

Additional Context

  • This confusion affects developers implementing the tool manually versus those using the SDK types.
  • The discrepancy suggests that bash_20250124 might have different schema definitions in different parts of the documentation.

View original on GitHub ↗

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