[Bug] Anthropic API Error: Tool-call tags missing antml: namespace prefix
Bug Description
Tool-call malformation bug — Claude Opus 4.8 in Claude Code.
The model repeatedly emitted tool-call tags WITHOUT the required antml: namespace
prefix (<invoke ...> / <parameter ...> instead of the antml:-prefixed tags). Such
calls are not parsed: the harness either reports "malformed and could not be parsed"
or treats the block as plain text, so no tool runs and the turn ends — looks like the
assistant freezing/disconnecting mid-task.
Counts in this session transcript: 5 explicit "malformed and could not be parsed"
errors; ~45–50 raw invoke name= text occurrences (failed attempts); vs 1166 successful
tool calls. Clustered in the long latter portion of the session. Caused hours of wasted
time. Local report: ~/work/rb5/TOOL_CALL_FAILURE_REPORT.md
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.185
- Feedback ID: a10e538a-8e6b-4ced-9e23-7bd75d280a2c
Errors
[]