[CRITICAL] Tool call failures are destroying usability — silent errors, wasted tokens, broken workflows
Severity: CRITICAL — This is destroying the product experience
Tool call failures have become a daily, multi-occurrence problem that makes Claude Code unreliable for any serious work. This is not a minor annoyance — it is actively destroying trust in the tool.
The Three Failure Modes
1. "Your tool call was malformed and could not be parsed. Please retry."
This error appears on virtually every session now. The model issues a valid Edit/Bash/Grep call, the tool executes successfully (confirmed by visible output/diff), yet the system injects a system message claiming the call was malformed. This forces the model to retry, burning 2-5x the expected tokens and often causing the session to hang for minutes with no output. I have observed this happening even on simple single-file Edit calls (added 2 lines, removed 1 line — confirmed in the diff shown in the UI).
2. "API Error: The socket connection was closed unexpectedly"
This kills extended thinking sessions entirely. When a socket drops during an extended thinking turn (5-20 seconds of computation), ALL the thinking tokens are discarded and the model has to restart from scratch. On /effort xhigh, this means losing 10K-50K+ tokens per failure. For users behind proxies (which is the majority of users outside the US), this happens multiple times per session.
3. Loading spinner freeze with no output
Correlated with failure mode #1. The spinner freezes, the model produces no output for 60-120 seconds, and the user has to send a follow-up message ("what are you doing?") to discover the agent is stuck. During this time, API credits are being consumed with zero visible progress.
Impact
- Massive token waste: 30-50% of daily API quota is burned on failed tool calls and retries
- Session kill: A session that hits these errors repeatedly becomes unusable and must be restarted
- User trust destroyed: When the tool cannot reliably execute the simplest operations (single Edit call), users cannot trust it with any real work
- No error transparency: The "malformed tool call" error provides zero diagnostic information — no indication of which tool failed, why, or what the malformed output was
Environment
- Claude Code version: 2.1.169
- Model: Opus 4.8
- Effort level: high (also occurs on normal)
- macOS 15.7.1
- All 24 official plugins enabled
Request
- Surface the raw tool response when a "malformed tool call" error occurs so developers can diagnose the actual problem
- Fix the retry logic — do NOT silently retry malformed calls and burn tokens; surface the error to the user
- Fix extended thinking socket handling — dropped connections should be recoverable, not discard all progress
- The spinner freeze is unacceptable — if the model is stuck, show an error within 5 seconds, not after 2 minutes of silent token consumption
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗