Malformed tool-call syntax leaks raw parameter fragments into the visible transcript
Summary
When the assistant emits a tool call with incorrect tag syntax (e.g. bare invoke/call instead of the namespaced antml:invoke/antml:parameter), the UI shows Your tool call was malformed and could not be parsed, but it also renders the half-parsed fragments — parameter values such as 1, 1.3, true, and the text body — to the user as plain markdown content.
Expected
Unparseable tool-call output should be suppressed or cleanly errored, not displayed to the user as assistant content.
Actual
The malformed call's internal fragments leak into the rendered transcript, e.g.:
⏺ call
<message text here>
1
1.3
true
Environment
- Claude Code, model
claude-opus-4-8(1M context) - Platform: macOS
- Reproduced repeatedly when invoking an MCP tool (
mcp__voicevox__speak) mid-response.
Notes
The trigger is model-side (the model emitting the wrong tag namespace). The reported defect is the rendering/robustness behavior: a tool call that fails to parse should not surface its raw fragments to the user.