[DOCS] Inconsistency in Bash Tool Input Schema: `restart` parameter used in examples but missing from SDK definitions
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.
- The Bash tool page claims
restartis a valid parameter and uses it in the implementation logic. - The Agent SDK documentation (and the underlying API schema definition implied by
ToolBash20250124) does not listrestartas a valid input field. It instead liststimeout,description, andrun_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_20250124might have different schema definitions in different parts of the documentation.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗