Tool-use tags intermittently omit `antml:` namespace → silent malformed no-op (Opus)
Summary
During a long Claude Code session (model: Opus), the assistant repeatedly (~7-8 times) generated tool-use invocation tags without the antml: namespace — i.e. <invoke name="Bash"> / <parameter ...> instead of the correct <invoke> / <parameter>.
Impact
Malformed tags are not parsed, so no tool actually executes, yet the assistant's surrounding response text renders normally. From the user's side it looks like the assistant "responds but does nothing / keeps stalling." This repeatedly broke a time-sensitive on-device (iPhone) test workflow where each step depends on running a shell command — the user grew increasingly frustrated ("why does it keep stopping", "how many times now") because there was no visible error, just silent no-ops.
Steps / Pattern
- Happens intermittently mid-session, more often after the conversation grows long.
- Once it starts, it tends to recur on subsequent calls until explicitly self-corrected.
- The very next correctly-namespaced call works fine, confirming it's a generation/formatting slip rather than an environment issue.
Expected
Tool-use blocks should consistently use the correct antml: namespace, or malformed tags missing the namespace should be auto-corrected / retried rather than silently dropped (ideally surfaced as an error so the user/model notices).
Environment
- Claude Code (CLI)
- Model: Opus
- Long single session; reproduced multiple times