[Bug] Opus 4.7 with extended thinking intermittently emits unparseable tool_use blocks
Bug Description
---
Title: Opus 4.7 + extended thinking intermittently emits unparseable tool_use blocks (small calls too)
Body:
Frequent "The model's tool call could not be parsed (retry also failed)" hard-stops.
CLI 2.1.150 (latest). Model: claude-opus-4-7.
Findings from my local session logs (~/.claude/projects/.../*.jsonl), 5/24-5/26:
- ~20 "malformed and could not be parsed" retry prompts across 6 sessions;
one session (83889c9d) hit it 8 times.
- The failing assistant turns have stop_reason="tool_use" but NO parseable
tool_use block — only a thinking block is present.
- NOT caused by size: failing turns were only 164-1093 output tokens.
- NOT caused by special chars: a plain 119-char single-line SQL
(SELECT ... FROM information_schema.columns ...) triggered it.
- Affects multiple tools: Read, Bash, mcp execute_sql.
- Common factor: every failing turn is Opus 4.7 with an extended-thinking block.
Looks like a tool_use serialization defect when extended thinking is active.
Auto-retry sometimes recovers; "retry also failed" is when the retry repeats it.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.150
- Feedback ID: 59d64386-04ba-4c37-ace9-f2c3a0830f55
Errors
[]This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗