claude-code - 💡(How to fix) Fix [Bug] Opus 4.7 & 4.8 — silent stuck-turn: stop_reason=tool_use with no tool_use block (Sonnet 4.6 unaffected)

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…

Opus 4.7 and 4.8 both produce silent stuck-turns where the assistant message has stop_reason="tool_use" but contains no tool_use block in content — it stops right after a thinking block. The harness then injects a retry, so tasks still complete but with wasted turns and latency.

This is a continuation of #50727 (reported as 4.7-only, now closed). The bug now reproduces on Opus 4.8, so it is not 4.7-specific.

Root Cause

Opus 4.7 and 4.8 both produce silent stuck-turns where the assistant message has stop_reason="tool_use" but contains no tool_use block in content — it stops right after a thinking block. The harness then injects a retry, so tasks still complete but with wasted turns and latency.

This is a continuation of #50727 (reported as 4.7-only, now closed). The bug now reproduces on Opus 4.8, so it is not 4.7-specific.

RAW_BUFFERClick to expand / collapse

Summary

Opus 4.7 and 4.8 both produce silent stuck-turns where the assistant message has stop_reason="tool_use" but contains no tool_use block in content — it stops right after a thinking block. The harness then injects a retry, so tasks still complete but with wasted turns and latency.

This is a continuation of #50727 (reported as 4.7-only, now closed). The bug now reproduces on Opus 4.8, so it is not 4.7-specific.

Data (local transcript scan)

Aggregated at message.id level — thinking/text/tool_use are split across separate jsonl lines, so counting per-line produces false positives. Denominator = turns with stop_reason=="tool_use". A "hang" = such a turn with no tool_use block in content.

modelturnshangrate
claude-opus-4-730662187.11%
claude-opus-4-81051413.33%
claude-sonnet-4-6209700.00%

Same machine, same period (since 2026-05-22).

Daily Opus rate (not converged): 5/23 10.90%, 5/24 5.25%, 5/25 14.02%, 5/26 2.56%, 5/27 6.03%, 5/28 12.90% (4.7), 5/29 13.33% (4.8).

Signature

Hang content-type breakdown (tool_use excluded): thinking-only 95%, thinking+text 5% — identical across 4.7 and 4.8. Every hang stops immediately after a thinking block with the expected tool_use block missing.

Why this looks server-side, not client-side

  • Reproduces across two model generations (4.7 → 4.8).
  • Sonnet 4.6 is completely clean (0/2097) on the same client, same files, same period.
  • Controlled comparison rules out the client: the same Claude Code version across different days shows the rate swinging from 0% to ~13% (only the date/server differs). File structure / hooks / @import / MCP config are model-agnostic, so if they were causal they would affect Sonnet too — they don't.

This points to a server-side issue in the Opus thinking→tool_use transition.

Environment

  • Claude Code: 2.1.156
  • OS: macOS (Darwin 25.5.0)
  • Models observed: claude-opus-4-7, claude-opus-4-8, claude-sonnet-4-6

Related

#50727 (closed, reported as 4.7-only)

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 & 4.8 — silent stuck-turn: stop_reason=tool_use with no tool_use block (Sonnet 4.6 unaffected)