[BUG] Agent View (Linux): mouse wheel sends arrow keys instead of scrolling attached session — works on macOS, fails on all Linux terminals

Open 💬 2 comments Opened May 31, 2026 by henricook

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

  1. On Linux: claude agents
  2. Select a background agent, press Enter to attach
  3. Scroll the mouse wheel over the transcript
  4. 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
  • /tui renderer: 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-view render path, different symptom
  • #59093 — attached-session scroll buffer limited to ~10 lines

View original on GitHub ↗

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