Tool calls leak as raw text ('call' + args) instead of executing — frequent on Opus 4.8

Resolved 💬 1 comment Opened May 31, 2026 by bon-clevique Closed May 31, 2026

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

| | |
|---|---|
| Model | Opus 4.8 (1M context) — claude-opus-4-8[1m] |
| Client | Claude Code CLI (terminal) |
| Terminal | Kitty |
| OS | macOS Tahoe 26.2 |
| Effort | max |

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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗