Preflight Checklist
What's Wrong?
When using Claude Opus 4.8 (1M context) in a project with a large constantly-loaded system context (~92KB) AND accumulating screenshots via mcp__claude-in-chrome browser automation, tool-call XML serialization degrades and produces a stray token "court" with the antml: namespace dropped from tags, causing every subsequent tool call to fail.
Error message: "Your tool call was malformed and could not be parsed. Please retry."
Reproduction conditions (all 3 required):
- Model: claude-opus-4-8 (1M context)
-
- Project with large always-loaded context (~92KB: CLAUDE.md + rules + memory files)
-
- Browser automation session with 5+ accumulated screenshots (mcp__claude-in-chrome__computer screenshot calls)
Workaround: Switching to Sonnet 4.6 resolves the issue immediately. /clear does NOT help.
What Should Happen?
When using Claude Opus 4.8 (1M context) in a project with a large constantly-loaded system context (~92KB: CLAUDE.md + rules + memory files) AND accumulating screenshots via mcp__claude-in-chrome browser automation, tool-call XML serialization degrades and produces a stray token "court" with the antml: namespace dropped from tags.
Error message:
Your tool call was malformed and could not be parsed. Please retry.
Malformed output example (simplified):
The model outputs court as a stray token, followed by raw <invoke> / <parameter> tags without the antml: namespace prefix, making them unparseable.
Reproduction conditions (all 3 required):
- Model: claude-opus-4-8 (1M context variant)
-
- Project with large always-loaded context (~92KB system prompt: CLAUDE.md + rules + memory)
-
- Browser automation session with 5+ accumulated screenshots (mcp__claude-in-chrome__computer screenshot calls)
Timeline observed:
- Screenshots 1-4: tool calls work correctly
-
- Screenshot 5+: tool-call XML starts malforming, stray "court" token appears
What does NOT cause this:
- No XML/invoke-style fragments found in project files (grep confirmed clean)
-
- Not a prompt injection issue
Workaround confirmed:
- Switching to Sonnet 4.6 resolves the issue immediately under identical conditions
-
/clear does NOT help because large project context reloads immediately
Error Messages/Logs
Your tool call was malformed and could not be parsed. Please retry.
Model output contained stray token "court" followed by raw XML tags without antml: namespace prefix (e.g., <invoke name="..."> instead of the properly namespaced form). This repeats on every retry attempt.
Steps to Reproduce
- Open Claude Code with a project that has a large always-loaded context (~92KB: CLAUDE.md + rules/.md + memory/.md)
-
- Set model to claude-opus-4-8 (1M context) via /model
-
- Start browser automation using mcp__claude-in-chrome MCP
-
- Take 5+ screenshots using mcp__claude-in-chrome__computer with action: screenshot
-
- Attempt any tool call (left_click, navigate, etc.)
-
- Observe: model outputs stray token "court" + raw XML without antml: namespace
-
- Error: "Your tool call was malformed and could not be parsed. Please retry."
-
- Retrying produces the same malformed output repeatedly
Verification: Switch to Sonnet 4.6 → resolves immediately. /clear → does NOT fix it.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Unknown — issue was first observed with claude-opus-4-8 (1M). Sonnet 4.6 does not exhibit this behavior.
Claude Code Version
2.1.181 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Context size breakdown (always-loaded on session start):
- CLAUDE.md: 6KB
-
- .claude/memory/misstake.md: 48KB
-
-
- .claude/memory/ai_memory.md: 3.7KB
-
-
-
- .claude/skills/SKILLS.md: 11KB
-
-
-
-
- .claude/agents/AGENTS.md: 2.6KB
-
-
-
-
-
- .claude/rules/*.md: ~19KB
-
-
-
-
-
-
- Total: ~92KB
The "court" stray token appears consistently at the start of every malformed tool call. Switching to Sonnet 4.6 (/model command) within the same session immediately resolves the issue without any other changes. Claude Code version: 2.1.181
Preflight Checklist
What's Wrong?
When using Claude Opus 4.8 (1M context) in a project with a large constantly-loaded system context (~92KB) AND accumulating screenshots via mcp__claude-in-chrome browser automation, tool-call XML serialization degrades and produces a stray token "court" with the antml: namespace dropped from tags, causing every subsequent tool call to fail.
Error message: "Your tool call was malformed and could not be parsed. Please retry."
Reproduction conditions (all 3 required):
Workaround: Switching to Sonnet 4.6 resolves the issue immediately. /clear does NOT help.
What Should Happen?
When using Claude Opus 4.8 (1M context) in a project with a large constantly-loaded system context (~92KB: CLAUDE.md + rules + memory files) AND accumulating screenshots via
mcp__claude-in-chromebrowser automation, tool-call XML serialization degrades and produces a stray token "court" with theantml:namespace dropped from tags.Error message:
Malformed output example (simplified):
The model outputs
courtas a stray token, followed by raw<invoke>/<parameter>tags without theantml:namespace prefix, making them unparseable.Reproduction conditions (all 3 required):
Timeline observed:
What does NOT cause this:
Workaround confirmed:
/cleardoes NOT help because large project context reloads immediatelyError Messages/Logs
Steps to Reproduce
Verification: Switch to Sonnet 4.6 → resolves immediately. /clear → does NOT fix it.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Unknown — issue was first observed with claude-opus-4-8 (1M). Sonnet 4.6 does not exhibit this behavior.
Claude Code Version
2.1.181 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Context size breakdown (always-loaded on session start):
The "court" stray token appears consistently at the start of every malformed tool call. Switching to Sonnet 4.6 (/model command) within the same session immediately resolves the issue without any other changes. Claude Code version: 2.1.181