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

Resolved 💬 3 comments Opened May 13, 2026 by GalCustoMed Closed May 27, 2026

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 ↗

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