Claude Code error "The model's tool call could not be parsed (retry also failed)" with Opus 4.7 - how to work around it?
Claude Code sessions on Opus 4.7, and in one report Opus 4.8, stop with the message "The model's tool call could not be parsed (retry also failed)". Users on macOS, Linux and Windows report it happens often and halts the task. Is there a workaround while the issue is open?
Originally asked on GitHub: https://github.com/anthropics/claude-code/issues/62123
4 answers
Status: still open. The thread has no maintainer fix or explanation, only user reports and a few workarounds.
What commenters tried:
- Switching the model inside the session. One user suggested
/model claude-opus-4-6[1m]. No one confirmed in the thread that this resolved the error. - Another user, on Claude Code 2.1.154 (darwin/arm64), reported that failures happened consistently on Opus 4.8 and stopped after running
/model claude-opus-4-7for the same workflow. This is a single anecdotal report.
What reporters found in local logs:
- Failing turns had
stop_reasonset totool_use, but the content held only an empty thinking block with notool_useblock. The retry returned the same shape, so it gave up. - Failures were seen on
claude-opus-4-7but not on Haiku subagent turns in the same sessions. One user said Sonnet 4.6 did not reproduce it on the same task. - The first failures in one user's logs appeared on May 25, 2026, which suggests a recent regression.
- One user said context fill and MCP server count did not seem to correlate with the failures.
No confirmed fix is in the thread. Watch the issue for maintainer updates.
Did this work for you?- Switching the model inside the session. One user suggested
What @AndyShiu tried on GitHub (Worked)
On Opus 4.8, in a long session with many Edit and Bash calls, switched to
/model claude-opus-4-7and the same workflow ran without parse failures.Source: https://github.com/anthropics/claude-code/issues/62123#issuecomment-4567436306 (opens external site)
Did this work for you?What @labuladong tried on GitHub (Outcome unclear)
Switched the model inside Claude Code with
/model claude-opus-4-6[1m]as a workaround for the parse failure.Source: https://github.com/anthropics/claude-code/issues/62123#issuecomment-4554913363 (opens external site)
Did this work for you?What @fancyboi999 tried on GitHub (Outcome unclear)
Analyzed local ~/.claude/projects jsonl logs and found failing turns had stop_reason tool_use with only an empty thinking block; shared request IDs for server-side tracing.
Source: https://github.com/anthropics/claude-code/issues/62123#issuecomment-4543575309 (opens external site)
Did this work for you?