Gibberish/garbled output on Opus 4.7 leaves CLI unrecoverable, forced full restart (Windows)
Preflight Checklist
- [x] I have searched existing issues for related reports
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
Environment
- Claude Code: v2.1.119
- Model:
claude-opus-4-7[1m](Opus 4.7, 1M context) - Account: Claude Max
- Platform: Windows 11 Pro 10.0.26200
- Shell: bash (Git Bash) under Windows Terminal
- Date of incident: 2026-04-24
What happened
Mid-session, Claude Code began streaming gibberish/garbled text into the terminal. The session became unresponsive — I could not interact with the CLI any further (couldn't cancel, couldn't submit a new prompt, couldn't exit cleanly). I had to shut down the computer to recover; closing the terminal alone was insufficient.
This is the second time this has happened to me — a previous occurrence was also during heavy long-context work on the same repo, also on Opus.
Context at time of failure
Working on a multi-day v2 database-migration effort (SQLite → Postgres). Long conversation, 1M context window, lots of tool use (Bash, Read, Edit), interleaved with subagent spawns. The crash hit while I was in the middle of porting/dispatching pipeline stages — I don't have the exact transcript because I had to power-cycle the machine.
Why this is worse than the known garbled-output bug
I'm aware of #45712 (Opus garbled multi-script output) which describes a transient model glitch that recovers on the next prompt. My case is different in severity:
- The CLI itself becomes unresponsive — not just one bad assistant turn.
- No way to Ctrl+C out or send a new prompt to recover.
- A full OS restart was required.
It may share a root cause (Opus token-selection corruption) but the failure mode for the user is "CLI is bricked until reboot," not "model produced one bad reply."
What I'd find useful
- A timeout / watchdog that aborts the streaming render and returns the user to a working prompt if the model output goes off the rails.
- Some way to dump the in-memory transcript to disk before the session locks up, so I don't lose the conversation when forced to power-cycle.
- A confirmation of whether this is the same root cause as #45712 or a separate Windows-specific TUI issue.
Related
- #45712 — Opus garbled multi-script output (likely related model-side cause)
- #26224 — Claude Code hanging/freezing (similar user impact, different trigger)
- #30346 — Multiple sessions crash with ANSI escape codes on Windows (possibly related TUI rendering)
I don't have a transcript to attach because the session was unrecoverable. Happy to provide more detail if there's a way to surface a recent session log post-reboot.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗