[BUG] Opus 4.8 repeatedly emits malformed tool_use blocks, entire response discarded (4.7 works fine)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
On Opus 4.8 (claude-opus-4-8[1m]), when the assistant attempts to call an MCP tool, the generated tool_use JSON is frequently malformed (unterminated strings / missing braces / truncated arguments). The harness rejects the whole turn with "Your tool call was malformed and could not be parsed. Please retry."
Because text blocks and tool_use blocks are emitted in a single response, the malformed tool_use causes the accompanying text block to be discarded as well. From the user's side, the assistant appears to "go silent" — no text reaches the user even when the user explicitly says "don't use tools, just talk to me," because the model still tries to call a tool out of habit and the whole response gets thrown away again.
This blocked an active conversation for ~30 minutes across many retries. Switching the model to Opus 4.7 (claude-opus-4-7[1m]) immediately restored normal behavior with the exact same system prompt, MCP set, and conversation history.
What Should Happen?
Tool calls should either be well-formed, or — if generation fails — the accompanying text block should still be delivered to the user so the model can at least communicate.
Error Messages/Logs
Steps to Reproduce
- Use Opus 4.8 with a long-ish system prompt and multiple MCP servers attached (in my case: plugin:telegram, several claude.ai connectors).
- Hold an active conversation where most turns require calling an MCP tool (e.g. replying through a Telegram bridge).
- Within ~5–10 turns the model starts emitting malformed tool_use blocks repeatedly; "retry" does not converge.
- Switching to Opus 4.7 in the same session resolves immediately.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.156
Platform
Anthropic API
Operating System
Windows 11
Terminal/Shell
Windows Terminal
Additional Information
- Multiple MCP servers connected, including plugin:telegram and a handful of claude.ai-hosted connectors
- Long system prompt (~several KB of project-level CLAUDE.md)
- Issue is intermittent on the first few turns and then becomes near-deterministic
- Not a network/SSE hang — tokens are flowing, the response is generated and then rejected by the parser
This issue has 13 comments on GitHub. Read the full discussion on GitHub ↗