[BUG] Agent View (Linux): mouse wheel sends arrow keys instead of scrolling attached session — works on macOS, fails on all Linux terminals
What happens
When I attach to a background session in Agent View (claude agents → select an agent → Enter), the mouse wheel emits cursor up/down keys (it walks the prompt input) instead of scrolling the session transcript. Claude shows the warning:
Scroll wheel is sending arrow keys · use PgUp/PgDn to scroll
PgUp/PgDn do work for scrolling. The mouse wheel scrolls correctly in normal foreground sessions (classic renderer) — only the attached fullscreen Agent View is affected.
This is platform-specific, not a terminal issue
| | Result |
|---|---|
| ❌ Linux (Ubuntu, Wayland), Terminator / VTE 0.84 | wheel → arrow keys |
| ❌ Linux (Ubuntu, Wayland), kitty 0.47.1 | wheel → arrow keys |
| ❌ Linux (Ubuntu, Wayland), Ghostty 1.3.1 | wheel → arrow keys |
| ✅ macOS, Ghostty | wheel scrolls the transcript correctly |
Same Ghostty codebase behaves differently per-OS, and three different Linux terminals fail identically — so the terminal is ruled out. This is Linux-specific.
Likely cause (from inspecting the 2.1.158 build)
The attached/focus fullscreen view sends DECSET ?1000h / ?1006h (mouse tracking) plus ?1007h (alternate-scroll). On Linux the wheel is delivered as arrow keys (the ?1007h path) rather than as SGR mouse-wheel events — i.e. mouse-wheel capture isn't taking effect for this view on Linux. The internal tengu_scroll_arrows_detected path fires the warning. On macOS the wheel is captured as mouse events and scrolls.
Steps to reproduce
- On Linux:
claude agents - Select a background agent, press Enter to attach
- Scroll the mouse wheel over the transcript
- Observe: the prompt/input moves (arrow keys) and the "Scroll wheel is sending arrow keys" warning appears; the transcript does not scroll. PgUp/PgDn does scroll.
Expected
The mouse wheel scrolls the attached session transcript on Linux, exactly as it does on macOS.
Environment
- Claude Code 2.1.158
- Linux, Ubuntu, Wayland session
- Terminals tested: Terminator (VTE 0.84), kitty 0.47.1, Ghostty 1.3.1
/tuirenderer:default(the attached view forces fullscreen regardless)
Related
- #59901 — Agent View attached scroll completely broken on macOS (all scroll incl. PgUp dead); same
area:agent-viewrender path, different symptom - #59093 — attached-session scroll buffer limited to ~10 lines
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗