[Bug] Claude Opus 4.8 emits malformed tool calls with parsing errors

Resolved 💬 3 comments Opened May 31, 2026 by iryopapa Closed Jul 5, 2026

Bug Description
Title: Opus 4.8 — tool calls frequently emitted as malformed (Your tool call was malformed and could
not be parsed)

Summary
On Opus 4.8 in Claude Code, tool calls (especially Bash/Read/Edit) are frequently emitted in a broken
form and rejected with Your tool call was malformed and could not be parsed. Switching the same
conversation to Opus 4.7 immediately resolved the issue.

Symptoms

  • A stray token (e.g. literal court) appears where the tool-invocation tag should start, breaking the

parser.

  • Same operation retried within seconds sometimes succeeds, sometimes fails — appears intermittent.
  • Write/Edit calls succeed more often than Bash/Read/Grep calls (search/read paths are the worst).
  • Occurs in normal sessions, no special skill or MCP usage.

Reproduction

  1. Start Claude Code with Opus 4.8 (claude default).
  2. Ask the model to run several Bash commands or Read multiple files in sequence.
  3. Within ~5–20 calls, observe one or more malformed tool call errors.
  4. Switch the same conversation to Opus 4.7 via claude --model claude-opus-4-7 --resume → errors

stop.

Impact

  • User has to copy commands manually and paste outputs back, blocking long-running work.
  • Multiple-hour development sessions become impractical on 4.8.

Workaround

  • Use Opus 4.7 (still available via --model claude-opus-4-7, though not listed in /model).

Environment

  • Claude Code CLI on macOS (Darwin 25.5.0)
  • Affected model: claude-opus-4-8 (default Opus)
  • Works fine on: claude-opus-4-7

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.158
  • Feedback ID: 537c28a3-fa17-4a4e-b33e-c310783123cd

Errors

[]

View original on GitHub ↗

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