Escape characters appearing in a predictable way when running multiple terminal session within the same folder

Resolved 💬 3 comments Opened Mar 13, 2026 by antiresonant Closed Mar 17, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Subject: Possible terminal input corruption when running multiple Claude CLI instances

Hi,

I encountered a terminal input issue that may be related to running multiple Claude CLI sessions simultaneously.

Environment

  • OS: Windows 10
  • Terminal: (Firefox terminal / PowerShell / Windows Terminal — fill in whichever applies)
  • Claude CLI running in multiple subfolders within the same parent directory
  • One instance was launched with administrator privileges

Observed behavior

When switching focus back to one of the terminals after clicking elsewhere, characters began appearing automatically in the terminal without any keyboard input:

[O[I[I[O[I[I[O[I...

These characters continued to appear whenever the terminal regained focus.

Key observation

The issue disappeared immediately once I closed the additional Claude CLI terminal and left only a single instance running.

Possible cause

It appears that multiple Claude CLI processes may be manipulating terminal modes (raw input / mouse tracking / escape sequence handling) simultaneously, leaving the terminal in a corrupted state where escape sequences are printed directly.

What Should Happen?

Running multiple CLI instances should not interfere with terminal input handling or cause escape sequences to be printed automatically.

Workaround

Closing extra Claude CLI terminals resolved the issue.

Happy to provide additional details or help reproduce if needed.

Error Messages/Logs

n/a, just the escape characters appearing in a predictable fashion after i click on a terminal window after clicking on another terminal or non-terminal window

Steps to Reproduce

In a bunch of sub-folders within a common folder, start claude --dangerously-skip-permissions

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.75

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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