Intermittent malformed tool_use: model emits bare <invoke>/stray tokens instead of valid tool-call syntax
What happened
In an interactive session (model: claude-opus-4-8), the assistant intermittently emitted malformed tool calls — a bare <invoke name="..."> block, or a stray leading token ("court") — instead of the harness's valid function-call format. The harness rejected each with "Your tool call was malformed and could not be parsed. Please retry." Recurred ~4-5 times in one long session, each wasting a turn and breaking a multi-step browser-automation flow.
Tools involved: happened while calling mcp__claude-in-chrome__* (navigate, tabs_context_mcp, computer), but the malformation is in the call envelope, not tool-specific.
Frequency: intermittent, several times within a single long session (many sequential tool calls).
Impact: wasted turns, broken automation flow, user-visible errors.
Environment
- Claude Code (CLI), model claude-opus-4-8
- Platform: darwin 24.6.0
- MCP server: claude-in-chrome
Note: raw malformed output isn't in the transcript (rejected pre-parse). Observed forms: <invoke name="..."> with plain angle brackets, and a stray "court"/"<invoke" prefix. Looks like a tool-call serialization lapse, more frequent in long multi-tool sessions.
Expected: tool calls always emitted in valid parseable format.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗