DEV Community

edhiblemeer
edhiblemeer

Posted on

Claude Code (Opus 4.8) Silently Corrupts All Tool Calls — An Unfixed Bug Easy to Trigger in Japanese Environments

After running Claude Code on long, always-on sessions, you may suddenly find every tool call is broken. I hit this while running multiple sessions for hours in a Japanese environment. Here's what I found.

What happens

  • Function call opening tags get corrupted into nonsense tokens like count / court
  • Arguments leak into chat as raw text (filenames appear inline)
  • MCP connection is fine (/mcp shows Connected) — not a tool/server issue
  • It does not self-heal once it starts. The model imitates the corrupted output already in history as if it were the correct format (in-context self-reinforcing loop, not learning)
  • The model itself does not notice the failure — it acts as if everything succeeded. Only a human watching from the outside catches it.

Trigger (observed)

GitHub issue anthropics/claude-code #63875 (OPEN, unfixed) reports the same symptoms, and the conditions match:

  • Model: Opus 4.8 (does not occur on 4.7; the analogous 4.7 bug #61133 is closed/fixed)
  • OS: Windows (issue carries platform:windows label)
  • Long turns / accumulated context
  • Non-ASCII (Japanese) characters in tool arguments

→ In short, "Opus 4.8 + Windows + Japanese + long-running" is the easiest path to hitting this.
Despite that, the English-language GitHub issue has almost no reports from Japanese users. Probably under-reported through the English channel rather than rare. Writing this for the next person stuck on the same thing.

Recovery (after corruption)

  • /rewind (Esc twice also works) — roll back to a checkpoint before the corrupted turn. Lighter than /compact.
  • /compact — replaces history with a summary, removing the corrupted examples (breaks the imitation loop).
  • --continue makes it worse — restores raw history, which brings back the corrupted examples.
  • For deep corruption (orphaned tool_result etc.) where the above don't reach, /clear (new session).

Prevention (root)

1. Downgrade to Opus 4.7

The bug is specific to 4.8. Switching to 4.7 (fixed) avoids it. Default in /config, per-session in /model. Capability gap is practically negligible for the version difference.

2. Decompose tasks (the real fix)

4.8's advantage shows up when you throw a single huge task at it. But that throw itself has a low success rate, and bumping the model isn't the solution.
If you decompose, 4.7 handles it reliably, and turns stay short and context stays light — exactly the conditions that don't trigger this bug.
= higher success + less corruption, two birds with one stone. Isolating heavy work into subagents keeps the main session's context clean.

3. Compact early + CLAUDE.md

CLAUDE.md is always loaded and survives summarization. Put critical constraints and decision rules in CLAUDE.md (not chat) and you can compact frequently without losing them.

Takeaway

"Brute-force with a stronger model" loses to "decompose and run on a stable model."
Until Anthropic ships a fix for the 4.8-specific bug, Opus 4.7 + task decomposition is enough. If you're running long sessions in Japanese and something feels off lately, this is the first thing to check.


Originally published in Japanese on Zenn.

Top comments (0)