[Bug] Tool call parsing failures on first attempt with successful identical retry across all tool types
Bug Description
Title: Tool calls frequently fail to parse ("malformed / could not be parsed") — first attempt fails, identical retry usually succeeds. Affects ALL tool types.
Environment: Claude Code, model Opus 4.8 (1M context). Long interactive session (2026-06-04).
Symptom: The large majority of tool calls fail on the FIRST attempt with:
- "Your tool call was malformed and could not be parsed. Please retry."
- occasionally: "The model's tool call could not be parsed (retry also failed)."
Re-emitting the IDENTICAL tool call (same arguments) usually succeeds on the 2nd attempt.
Scope: Affects every tool type — Bash, Edit, Write, Read, ToolSearch, Workflow, and MCP tools (e.g. a Gmail MCP send). Not specific to one tool or schema.
Ruled out (local hook): A PreToolUse hook rtk hook claude is configured, but its matcher is "Bash" only. Failures also occur on Edit/Write/Read/MCP/Workflow (non-Bash), so the hook is not the cause.
Observations:
- Content containing backslashes, </>, long multi-line bodies, or Japanese text seemed somewhat more prone, but trivial calls without them also failed — so it is not purely content-driven.
- The fail-first / succeed-on-identical-retry pattern points to intermittent tool-call serialization/transport flakiness rather than schema violations.
Impact: Roughly doubles the number of tool calls; significantly slows multi-step work.
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.162
- Feedback ID: d3c93a3a-44fa-4dae-8db5-3813b11a788a
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗