[Bug] Intermittent malformed tool-call emission with stray prefix tokens and missing tag namespace
Bug Description
Title: Intermittent malformed tool-call emission (stray "court"/"curt" prefix, missing tag namespace)
Environment: Claude Code, VS Code extension · model claude-opus-4-8 · session 0be7716b-597c-460d-a8ee-3b36a42eaae0
Symptom: Intermittently, a tool-call block is emitted with a stray leading token (court / curt) before the invoke tag and/or without the required tag namespace prefix. Result is one of two failures:
Harness returns "Your tool call was malformed and could not be parsed", or
The block renders to the user as literal text and the tool silently does not execute.
Frequency / pattern: ~8+ occurrences in a single long session, intermittent, non-deterministic. Happened across both Bash and Edit calls, mid-turn. Retrying the identical call usually succeeds. One clean stretch coincided with a VS Code window reload (uncertain if related).
Impact: Wasted turns, user confusion ("знову відвалилось"), broken flow on a working coding task.
Ruled out: Not a CLAUDE.md/rule issue and not related to command content — the corruption is in the tool-call control tokens themselves, so user-side config can't prevent it. Appears to be model output or the serialization/streaming layer.
No deterministic repro. No session debug log existed at ~/.claude/debug/<session>.txt.
Environment Info
- Platform: linux
- Terminal: vscode
- Version: 2.1.205
- Feedback ID: ac345b00-638d-4e8f-8682-a78382b81476
Errors
[]