claude-code - 💡(How to fix) Fix [BUG] Opus 4.7 tool calls fail with "The model's tool call could not be parsed (retry also failed)" since 2026-05-20

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

Code Example

The model's tool call could not be parsed (retry also failed).

---

# Injected by Claude Code after the response with no tool_use block:
Your tool call was malformed and could not be parsed. Please retry.

# Shown after the retried response again has no tool_use block:
The model's tool call could not be parsed (retry also failed).
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this is not a duplicate
  • I am filing a single bug report
  • I am using the latest version of Claude Code

What's Wrong?

Claude Opus 4.7 assistant turns end with stop_reason: tool_use, but the response body contains no tool_use block — only thinking and text blocks. Claude Code injects Your tool call was malformed and could not be parsed. Please retry.; the retried response again contains no tool_use block, and the turn ends with:

The model's tool call could not be parsed (retry also failed).

The thinking-block signatures decode to a protobuf model-name field. Two distinct values appear: claude-opus-4-7 (a 15-byte length-prefixed string) and claude-quoll-v7-hr-fast-ab-high-p (a 33-byte length-prefixed string). This value changed by date. The table below is a full (not sampled) decode of every Opus 4.7 assistant response that has a thinking-block signature; 0 entries failed to decode:

Dateclaude-opus-4-7claude-quoll-v7-hr-fast-ab-high-pretry also failed eventsPlease retry events
05-19174 (100%)000
05-2084504
05-210491 (100%)2970

Every malformed (no tool_use block) response decodes to claude-quoll-v7-hr-fast-ab-high-p.

The usage_speed field is standard for every Opus 4.7 response in this period, including all malformed ones. Across the entire local transcript DB (73,830 messages), the count of responses with usage_speed=fast is 0. /fast is unavailable on this account (no usage credits).

What Should Happen?

A response with stop_reason: tool_use must contain a tool_use block. Opus 4.7 tool calls produced no retry also failed events while the signature model-name value was claude-opus-4-7 (through 05-19).

Error Messages/Logs

# Injected by Claude Code after the response with no tool_use block:
Your tool call was malformed and could not be parsed. Please retry.

# Shown after the retried response again has no tool_use block:
The model's tool call could not be parsed (retry also failed).

Malformed assistant message shape (from decoded transcripts):

  • stop_reason = tool_use
  • content blocks = thinking + text only (no tool_use block)
  • thinking-block signature model-name field = claude-quoll-v7-hr-fast-ab-high-p
  • usage_speed = standard

Steps to Reproduce

  1. Use model = Claude Opus 4.7 (signature model-name field claude-quoll-v7-hr-fast-ab-high-p as of 2026-05-21).
  2. Run tasks that require multiple tool calls with extended thinking (file edits, bash, searches).
  3. The assistant intermittently returns stop_reason: tool_use with no tool_use block, which ends the turn with The model's tool call could not be parsed (retry also failed).

On 2026-05-21 this produced 70 Please retry events and 29 retry also failed events. All 29 retry also failed events originate from Opus 4.7 responses; 0 originate from Sonnet 4.6 responses in the same period.

Claude Model

Opus (Claude Opus 4.7; signature model-name field claude-quoll-v7-hr-fast-ab-high-p)

Is this a regression?

Yes — it worked before.

Last Working Version

retry also failed events: 0 through 05-19, 0 on 05-20, 29 on 05-21. While the signature model-name value was claude-opus-4-7 (through 05-19) there were 0 such events. Claude Code was upgraded from 2.1.145 to 2.1.146 on 2026-05-21.

Claude Code Version

2.1.146

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

zsh

Additional Information

  • Per-date signature model-name value (full decode), usage_speed, and recorded failure events:

    DateOpus 4.7 model-name value (decoded)usage_speedretry also failedPlease retry
    05-19claude-opus-4-7 (174/174)standard00
    05-20claude-opus-4-7 (8) + claude-quoll-v7-hr-fast-ab-high-p (45)standard04
    05-21claude-quoll-v7-hr-fast-ab-high-p (491/491)standard2970
  • Decoding detail: the model name is a length-prefixed protobuf string field (0x32, length 0x0f=15 for claude-opus-4-7; 0x32, length 0x21=33 for claude-quoll-v7-hr-fast-ab-high-p). A trailing 8 seen in naive strings output (e.g. ...-high-p8, claude-opus-4-78) is the next field's tag byte 0x38, not part of the model name.

  • The 29 retry also failed events on 05-21 by cwd: 18 across three same worktrees (14 + 3 + 1) and 11 in one more workspace; all are Opus 4.7 responses.

  • usage_speed is standard for all responses; usage_speed=fast count in the DB is 0; /fast is unavailable (no usage credits).

  • The internal meaning of the claude-quoll-v7-hr-fast-ab-high-p value is not determinable from client-side data.

  • An exact malformed rate cannot be derived from the local transcript export: tool_use blocks are not consistently persisted in the export (responses on 05-18/05-19, which had 0 failures, also show absent tool_use blocks in the export). Only Claude Code's recorded Please retry / retry also failed events are cited above.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Opus 4.7 tool calls fail with "The model's tool call could not be parsed (retry also failed)" since 2026-05-20