Multiple sessions crash simultaneously with ANSI escape codes like [I

Resolved 💬 4 comments Opened Mar 3, 2026 by rweijnen Closed Apr 1, 2026

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

  1. Have multiple Claude Code sessions open in separate terminals
  2. At some point (trigger unclear), all sessions bomb out at the same time
  3. Terminal shows stray escape sequences like [I
  4. 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. [I which 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.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗