[Bug] Tool-use blocks intermittently render as literal text instead of executing
Bug Description
▎ Title: Assistant tool calls intermittently render as literal text (<invoke>…</invoke>) instead of executing
▎
▎ Symptom: During a long session, the assistant's tool-use blocks repeatedly leaked into the chat as raw text — a stray court token preceded the block and the antml: XML namespace
▎ prefix on invoke/parameter was missing, so the harness did not parse them as tool calls. Retrying with the correct antml:-prefixed tags executed normally. The failure recurred
▎ many times in one session even after correction.
▎
▎ Expected: Tool-use blocks always execute (or a clear parse error is surfaced to the model immediately on the first occurrence), never silently rendered as user-visible text.
▎
▎ Impact: Wasted turns, user confusion, broke flow of a multi-step task.
▎
▎ Env: Claude Code CLI, model claude-opus-4-8.
Environment Info
- Platform: linux
- Terminal: kitty
- Version: 2.1.185
- Feedback ID: e3047889-f544-4771-a823-476d03f3d6e2
Errors
[]