claude-code - 💡(How to fix) Fix Regression in 2.1.150-2.1.158: malformed tool_use blocks not parseable, retry-resistant

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…

Starting in 2.1.150 (and severely in 2.1.158), the model frequently emits malformed tool_use blocks that the CLI cannot parse — Your tool call was malformed and could not be parsed. Please retry. The single automatic retry usually also fails, aborting the turn. On 2.1.158 this fires constantly and makes interactive work largely unusable.

Root Cause

Starting in 2.1.150 (and severely in 2.1.158), the model frequently emits malformed tool_use blocks that the CLI cannot parse — Your tool call was malformed and could not be parsed. Please retry. The single automatic retry usually also fails, aborting the turn. On 2.1.158 this fires constantly and makes interactive work largely unusable.

Fix Action

Workaround

Downgrade to 2.1.149 (pre-regression, 0 events) or 2.1.156 (near-clean: 1/25 sessions).


Filed from local session-log analysis. Counts are reproducible via grep -c "malformed and could not be parsed" over ~/.claude/projects/*/*.jsonl, bucketed by each transcript's version field.

RAW_BUFFERClick to expand / collapse

Summary

Starting in 2.1.150 (and severely in 2.1.158), the model frequently emits malformed tool_use blocks that the CLI cannot parse — Your tool call was malformed and could not be parsed. Please retry. The single automatic retry usually also fails, aborting the turn. On 2.1.158 this fires constantly and makes interactive work largely unusable.

Environment

  • Claude Code native install, macOS (Darwin 25.x)
  • Models: claude-opus-4-7 and claude-opus-4-8
  • Affected CLI versions: 2.1.150 – 2.1.158

Version bisection (from ~430 local session transcripts)

VersionSessions affectedMalformed events
2.1.37 – 2.1.1480 (hundreds of sessions, months)0
2.1.150first occurrence1
2.1.1525 / 1619
2.1.1561 / 255
2.1.1587 / 1268 (~9 per affected session)

Everything at or below 2.1.148 is completely clean across hundreds of sessions and months of use; the regression is clearly introduced in the 2.1.150 line and peaks at 2.1.158.

Characteristics

  • Cross-model: occurs on both opus-4-7 and opus-4-8
  • Not correlated with compaction (isCompactSummary = 0 in failing sessions), session length, or payload size
  • Tool-agnostic: failures hit Read (12), Edit (13), Bash (7), TaskUpdate, ToolSearch, WebSearch, Write, Skill, and MCP calls. Even a minimal Read (single path argument) fails — so it is not a payload/serialization-size issue.
  • ~50% of malformed events do not recover on the injected retry (retry also failed).

Impact

On 2.1.158, skill invocations frequently die at the first step, and agentic / ultracode workflows (high tool-call volume) are hit hardest — they break repeatedly within a single session.

Workaround

Downgrade to 2.1.149 (pre-regression, 0 events) or 2.1.156 (near-clean: 1/25 sessions).


Filed from local session-log analysis. Counts are reproducible via grep -c "malformed and could not be parsed" over ~/.claude/projects/*/*.jsonl, bucketed by each transcript's version field.

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…

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 Regression in 2.1.150-2.1.158: malformed tool_use blocks not parseable, retry-resistant