claude-code - 💡(How to fix) Fix Tool calls leak as raw text ('call' + args) instead of executing — frequent on Opus 4.8

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…

Since Opus 4.8 (claude-opus-4-8[1m]), tool calls frequently fail to serialize as tool_use blocks and instead leak into the assistant's visible text output. The literal token call appears on its own line, followed by the tool's parameters rendered as plain text — and the tool never executes. The turn simply ends with the leaked text.

Root Cause

Blocks all tool-dependent work — file edits, bash, sub-agent dispatch, follow-up questions. The session cannot proceed because every attempted tool call becomes inert text. Recovery currently requires the user to run commands manually (e.g. via the ! prefix) or restart the session.

Fix Action

Fix / Workaround

Blocks all tool-dependent work — file edits, bash, sub-agent dispatch, follow-up questions. The session cannot proceed because every attempted tool call becomes inert text. Recovery currently requires the user to run commands manually (e.g. via the ! prefix) or restart the session.

RAW_BUFFERClick to expand / collapse

Summary

Since Opus 4.8 (claude-opus-4-8[1m]), tool calls frequently fail to serialize as tool_use blocks and instead leak into the assistant's visible text output. The literal token call appears on its own line, followed by the tool's parameters rendered as plain text — and the tool never executes. The turn simply ends with the leaked text.

Environment

ModelOpus 4.8 (1M context) — claude-opus-4-8[1m]
ClientClaude Code CLI (terminal)
TerminalKitty
OSmacOS Tahoe 26.2
Effortmax

Symptoms

  • The assistant intends to invoke a tool. Instead of a tool invocation, the transcript shows the word call on its own line, followed by the serialized parameters as visible text.
  • Observed with multiple tools:
    • AskUserQuestion — the full [{"question": ...}] array is printed as text.
    • Bash — the command string is printed as text (e.g. cd /Users/bon/.claude && git status ...).
  • The tool does not run — no tool_result is produced.
  • Once it starts, it reproduces repeatedly within the same session. Retrying with a simpler single command did not reliably recover.

Steps to reproduce

Not deterministic, but observed reliably mid-session once triggered:

  1. Run a session on claude-opus-4-8[1m] (effort max).
  2. Have the assistant perform a sequence of tool calls (mix of Bash, AskUserQuestion, sub-agents).
  3. At some point a tool call is emitted as text (call + params) rather than executed.
  4. Subsequent tool calls continue to leak as text; the session can no longer make progress.

Expected behavior

Tool calls should always be emitted as structured tool_use blocks and executed — never rendered as assistant-visible text.

Actual behavior

The tool call is rendered as plain markdown text (leading token call + the serialized arguments). Nothing executes.

Impact

Blocks all tool-dependent work — file edits, bash, sub-agent dispatch, follow-up questions. The session cannot proceed because every attempted tool call becomes inert text. Recovery currently requires the user to run commands manually (e.g. via the ! prefix) or restart the session.

Notes / hypotheses

  • Appears to be a model/harness serialization issue (the model emits the call in a form the harness parses as text), not something controllable from the prompt.
  • Possibly correlated with long compound bash commands (&&, braces, heredocs, redirects) and/or with calls that immediately follow a block of assistant prose — but it also leaked on a minimal single command (ls <path>), so the trigger is not yet isolated.
  • Frequency: frequent since upgrading to Opus 4.8; far rarer or absent on prior models.

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…

FAQ

Expected behavior

Tool calls should always be emitted as structured tool_use blocks and executed — never rendered as assistant-visible text.

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 Tool calls leak as raw text ('call' + args) instead of executing — frequent on Opus 4.8