Tool call corrupted ("could not be parsed") when a tool call immediately follows long-form text in the same turn
Resolved 💬 2 comments Opened Jun 7, 2026 by nahanaha Closed Jun 7, 2026
Summary
When the model produces long-form text and then makes a tool call in the same turn, the tool call is frequently corrupted, causing "The model's tool call could not be parsed" and a hung/dead response. Short text before a tool call does not trigger this.
Environment
- Model: Claude Opus 4.8 (1M context)
- Platform: Windows 11, Claude Code Desktop
- Many MCP servers connected (very large number of tool definitions)
Reproduction
- Reliably reproduces when long explanatory text is emitted immediately before a tool call in the same turn
- Does NOT reproduce with short text before a tool call
- Confirmed via repeated manual testing
Impact
- Tool call fails to execute; response hangs or dies
- Sometimes raw broken tool-call syntax leaks into visible output
- 2026-06-01: occurred 11 times in one session; recurred multiple times since
Workarounds tried
- Splitting long text and tool calls into separate turns: effective but hard to enforce consistently across sessions
- Lowering effortLevel (xhigh -> lower): no effect
- Documenting the rule in config: not reliably followed
Request
Please investigate why tool-call token generation becomes unstable specifically after long-form text output.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗