Tool calls occasionally leak as literal <invoke> text (missing namespace prefix) instead of executing
What happened
During a long session with multiple background (dynamic) workflows running, the assistant intermittently emitted tool calls as plain Markdown text instead of executing them. The rendered text looked like:
court
<invoke name="Bash">
<parameter name="command">git merge ...</parameter>
<parameter name="description">...</parameter>
</invoke>
Note: the tags are missing the namespace prefix (<invoke> instead of the proper namespaced form), and a stray token (court) is prepended. Because the parser only recognizes the correctly-namespaced invocation tags, this output is treated as message content and rendered verbatim — the command never runs, yet the model proceeds as if it had.
Impact
- Commands silently do not execute; the model believes they did.
- The user cannot tell a real failure from a no-op; had to repeatedly say "it's broken again".
- Recovered only by the model re-issuing the call correctly on a later turn.
Suspected contributing factors
- Very long context (Opus 4.8 1M-context model)
- Several concurrent background workflows; frequent
Waiting for N dynamic workflows to finishinterrupts - Happened on multiple consecutive turns, each time recovering on retry
Expected
Malformed tool-call output should either be (a) caught and auto-corrected/retried by the harness rather than rendered as content, or (b) surfaced as an explicit error so the user/model knows the call did not execute — instead of being silently shown as text.
Environment
- Model: claude-opus-4-8 (1M context)
- Claude Code CLI, Linux
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗