Claude Code "tool call could not be parsed" / malformed tool call: causes and fixes (call / invoke / parameter shown as text)

Is there an outage right now?

Claude Code official status is operational. If this error persists, it is likely an implementation or environment issue on your side.

Updated: Jun 6, 2026, 3:26 AM UTC

View Claude Code status

What this error means

The model emits a tool call in the wrong format, so the harness rejects it as "tool call could not be parsed." Instead of the properly wrapped call, a bare invoke is produced and never runs—leaking "call", "<invoke name=…>" or "<parameter>" as visible text. In long sessions, once one malformed call enters the history, every later tool call keeps copying the same broken format (in-context few-shot poisoning). This is not a bug in your code—it is a known issue on the Claude Code (model/harness) side.

Common causes

  • Long session with many sequential tool calls chained back-to-back
  • Once a malformed call is in history, the model autoregressively reproduces it (few-shot poisoning)
  • Retrying in the same session anchors the broken example harder and makes it worse
  • Loading huge, XML/markup-dense files or skills dilutes control over tool-call format
  • Large context (e.g. 1M) with high effort over a long working session

How to fix

  1. 1.Run /clear (or start a new session) to drop the poisoned history—the only confirmed recovery
  2. 2.Do NOT retry in the same session (it reinforces the broken format)
  3. 3.Use /compact regularly before the conversation gets long
  4. 4.Avoid batching too many edits; add short prose/checks between tool calls
  5. 5.Avoid loading huge XML/heredoc-dense files or skills all at once
  6. 6.Update Claude Code to the latest version (fixes are ongoing)
  7. 7.Confirm at the top of this page it is not an Anthropic API outage (this is model/harness-side, separate from API outages)

When waiting helps (and when it won't)

This is a known model/harness issue (reported on GitHub; a permanent fix is still in progress) and waiting will not fix it within the same session. Switching to a fresh session with /clear is the reliable fix. To prevent recurrence, keep sessions short, /compact often, and never retry a malformed call.

Alternatives when Claude Code is down

CodexCursorGitHub CopilotClineWindsurfContinue

Related errors

FAQ

What is Tool call could not be parsed?

The model emits a tool call in the wrong format, so the harness rejects it as "tool call could not be parsed." Instead of the properly wrapped call, a bare invoke is produced and never runs—leaking "call", "<invoke name=…>" or "<parameter>" as visible text. In long sessions, once one malformed call enters the history, every later tool call keeps copying the same broken format (in-context few-shot poisoning). This is not a bug in your code—it is a known issue on the Claude Code (model/harness) side.

How do I fix Tool call could not be parsed?

Run /clear (or start a new session) to drop the poisoned history—the only confirmed recovery / Do NOT retry in the same session (it reinforces the broken format) / Use /compact regularly before the conversation gets long / Avoid batching too many edits; add short prose/checks between tool calls / Avoid loading huge XML/heredoc-dense files or skills all at once / Update Claude Code to the latest version (fixes are ongoing) / Confirm at the top of this page it is not an Anthropic API outage (this is model/harness-side, separate from API outages)

Compare Claude Code with others