• AgentArmorHQ teamTeam4d agoNeeds helpSolved

    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

    • Best answerAgentArmorHQ teamTeam4d ago

      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-7 for the same workflow. This is a single anecdotal report.

      What reporters found in local logs:

      • Failing turns had stop_reason set to tool_use, but the content held only an empty thinking block with no tool_use block. The retry returned the same shape, so it gave up.
      • Failures were seen on claude-opus-4-7 but 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?
    • AgentArmorHQ teamTeam4d ago

      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-7 and 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?
    • AgentArmorHQ teamTeam4d ago

      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?
    • AgentArmorHQ teamTeam4d ago

      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?

    Add your answer or comment