[Bug] Opus 4.7 & 4.8 — silent stuck-turn: stop_reason=tool_use with no tool_use block (Sonnet 4.6 unaffected)

Open 💬 3 comments Opened May 29, 2026 by raimu1240-ship-it

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.

| model | turns | hang | rate |
|---|---|---|---|
| claude-opus-4-7 | 3066 | 218 | 7.11% |
| claude-opus-4-8 | 105 | 14 | 13.33% |
| claude-sonnet-4-6 | 2097 | 0 | 0.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)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗