Multiple sessions crash simultaneously with ANSI escape codes like [I
Bug Description
Multiple Claude Code sessions crash simultaneously, displaying garbled ANSI/ASCII escape codes like [I in the terminal. The session appears to still be running (process alive) but becomes completely unresponsive -- no typing or interaction is possible.
Steps to Reproduce
- Have multiple Claude Code sessions open in separate terminals
- At some point (trigger unclear), all sessions bomb out at the same time
- Terminal shows stray escape sequences like
[I - Sessions become frozen -- cannot type or continue
Expected Behavior
Sessions should remain interactive and not dump raw escape codes to the terminal.
Observed Behavior
- All open sessions crash simultaneously (suggests a shared trigger, not per-session)
- Terminal shows raw ANSI/escape sequences (e.g.
[Iwhich is the "focus in" CSI sequence) - Session process may still be alive but input is completely dead
- Only option is to kill and restart
Environment
- Platform: Windows 10 (win32)
- Shell: Git Bash
- Multiple sessions open concurrently
- Claude Code CLI (latest)
Notes
[I is the CSI focus-in event sequence (CSI I) that terminals send when the window gains focus (part of "focus tracking" mode enabled by CSI ? 1004 h). It seems like Claude Code may be enabling focus tracking but not properly consuming/filtering these sequences, causing them to leak into the input/output stream and corrupt the session state.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗