claude-code - 💡(How to fix) Fix [Bug] Anthropic API: Opus 4.7/4.8 Missing Tool Use Block with tool_use Stop Reason

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…

Code Example

[]
RAW_BUFFERClick to expand / collapse

Bug Description Opus 4.7 AND 4.8 both produce silent stuck-turns: the assistant message has stop_reason="tool_use" but no tool_use block in content (it stops right after a thinking block). Local transcript scan, aggregated at message.id level, denominator = turns with stop_reason==tool_use: opus-4-7 218/3066 = 7.11% (ongoing since 2026-05-23, not converged), opus-4-8 14/105 = 13.33% (2026-05-29), sonnet-4-6 0/2097 = 0.00% on the same machine over the same period. Hang signature is identical across 4.7 and 4.8 (95% thinking-only, 5% thinking+text). The fact it spans 4.7->4.8 while Sonnet 4.6 is completely clean points to a server-side issue in the Opus thinking->tool_use transition, not a client/version/file-structure problem. Related closed issue: #50727 (was reported as 4.7-only).

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.156
  • Feedback ID: 9e2f89b6-a60b-473e-bd08-cab968ee9d82

Errors

[]

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] Anthropic API: Opus 4.7/4.8 Missing Tool Use Block with tool_use Stop Reason