Bash tool name stored as full command string in tool_use block, causing 200-char API limit error
Bug Report
Summary
A Bash tool call's full command string was recorded as the name field of a tool_use block in conversation history, causing subsequent API calls to fail with a 400 error.
Error message
API Error: 400 {"message":"messages.77.content.0.tool_use.name: String should have at most 200 characters"}. Received Model Group=claude-sonnet-4-6
Steps to reproduce
- Run a
Bashtool call with a command that has very long file paths (total command string > 200 characters) - Continue the conversation — subsequent API calls fail immediately
Root cause (as diagnosed by Claude)
The full bash command (286 chars in this case) was stored as the name field of the tool_use block instead of the correct value (Bash). Once in conversation history, every subsequent API call includes it and the API rejects the whole request.
Example offending command
python3 ~/.claude/skills/export-full/jsonl-to-transcript.py /Users/indiamos/.claude/projects/-Users-indiamos-repos-clockwork-web/6fa74fa3-6d6d-4d04-834a-1b1899e2c5c9.jsonl /Users/indiamos/repos/clockwork_web/ai-context/conversations/2026-05-22-1655-pr-67481-netsuite-migration-review.md
(286 chars total)
Expected behavior
The name field of a tool_use block should always be the tool name (e.g., Bash), never the command string.
Impact
The conversation becomes permanently broken — there is no way to continue it without clearing history.
Environment
- Claude Code (IDE terminal extension)
- Model: claude-sonnet-4-6
Feedback bundle: cc-20260522-214332-5379b6.zip
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗