[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
4 Comments
This _might_ be fixed in 2.1.159 but release notes don't mention it - did you already start work here @bogini 🙏🏻 or did one of the various workarounds I'd tried start working?
same issue on linux
Workaround found: running Claude Code inside GNU
screenFor anyone hitting this on native Linux — running
claudeinside ascreensession works around the issue, though it's not automatic:screen, then runclaudeas usualCtrl+AthenEscto enter screen's copy modeEscagain to exit copy mode and go back to typing prompts to ClaudeSo it's an extra couple of keystrokes each time, but it reliably restores scrolling without needing PgUp/PgDn.
Environment: Claude Code 2.1.220,
Linux Fedora release 42 (Adams)Not a real fix, but a solid workaround until this is addressed.
Also hitting this on Linux/Wayland.
Symptom: scrolling the mouse wheel while focused in the input recalls previous prompts (Up-arrow history) instead of scrolling the transcript — i.e. the wheel is being delivered as arrow keys.
Confirmed at the compositor level with
wev: a plain wheel scroll emits onlywl_pointer.axis/axis_value120events and no button events (noBTN_MIDDLE), so this is not a stray middle-click / primary-selection paste — the wheel→arrow-key translation is happening downstream in the alt-screen mouse handling.PgUp/PgDnscroll correctly, matching the reported workaround.