[BUG] Stray SGR mouse-report escape codes leak into input during fullscreen TUI mode

Status Open
Reported on v2.1.207
Maintainer reply None cached
Activity 1 comment · opened Jul 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?

Random characters intermittently appear in the input line on their own, matching the pattern of xterm SGR mouse-reporting escape codes (e.g. <65;62;34M, <35;65;40M). Triggered by trackpad scroll and clicks — no keyboard input involved. Happens during fullscreen TUI sessions.

What Should Happen?

Mouse events during fullscreen TUI mode should be consumed internally and never appear as literal characters in the input line.

Error Messages/Logs

N/A — no error is thrown, the escape codes just render as visible garbage text in the input box.

Steps to Reproduce

  1. Start a Claude Code session with fullscreen TUI mode active ("tui": "fullscreen" in settings.json, or default fullscreen behavior)
  2. Connect over SSH to a remote host, using Terminal.app on macOS
  3. Scroll or click with a trackpad while a fullscreen view/interactive prompt (e.g. a multi-select menu) is open
  4. Observe stray <n;n;nM-style characters appended to the input line

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.207

Claude Code Version

2.1.209 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Changelog for 2.1.208 lists "Added mouse-click support for multi-select menus and 'Other' input rows in fullscreen mode" — this is the likely point where mouse reporting started being enabled during fullscreen sessions. Tried removing "tui": "fullscreen" from settings.json — did not resolve. Also briefly saw an unrelated SSH-passphrase-prompt overlap in the same TUI, resolved separately via ~/.ssh/config changes — not believed to be the same bug.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗