Mouse-tracking escape sequences leak into prompt input from new agent view

Status Fixed / completed
Reported on v2.1.140
Maintainer reply ✓ Yes — bogini
Activity 4 comments · opened May 13, 2026 · closed May 27, 2026
💡 Likely answer: A maintainer (bogini, collaborator) responded on this thread — see the highlighted reply below.

Summary

In the "new agent" / agent transcript view, scrolling with the mouse wheel inserts raw SGR mouse-tracking escape sequences into the prompt input box as literal characters. The agent panel also renders in a dim/low-contrast style that looks like an inactive-pane state even while in use.

Environment

  • Claude Code: 2.1.140
  • Terminal: Apple_Terminal 452 (macOS Terminal.app)
  • TERM: xterm-256color
  • OS: macOS (Darwin 23.2.0)

Repro

  1. Open Claude Code, switch to the new agent view (tab showing a running/recent agent transcript).
  2. Move/scroll the mouse wheel over the agent transcript pane.
  3. Look at the prompt input box at the bottom.

Expected

Mouse scroll events scroll the transcript (or are ignored). Nothing is typed into the prompt.

Actual

The prompt input fills with raw SGR mouse-event escape codes, e.g.:

<64;56;56M<64;55;55M<64;55;55M<64;52;59M

These are CSI < button ; col ; row M sequences — button 64/65 = scroll wheel up/down. They're being passed through to the input field instead of being consumed by the agent-view UI.

Additional observation

The agent transcript itself renders very faded / low-contrast in this view (looks like a "dimmed inactive pane" treatment) even when the pane has focus. Unclear if it's the same bug or a separate rendering issue, but worth flagging together since both showed up in the same view.

Screenshot

User reported via screenshot showing the escape sequences in the input box and the dimmed transcript above.

Workaround

Avoid scrolling inside the agent view with the mouse wheel; click into the pane first and use keyboard scrolling.

View original on GitHub ↗

4 Comments

bogini collaborator · 4 months ago

Addressed by a merged fix. Please reopen with a fresh repro if you still see this on a current version.

stazcp · 4 months ago

I'm on latest and still get this issue https://github.com/anthropics/claude-code/issues/66289

orbitrod · 4 months ago

I am having this same problem in Ghostty on Mac.

github-actions[bot] · 2 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.