claude-code - 💡(How to fix) Fix [BUG] iTerm2 + tmux: mouse wheel hijacked to input history, scrollback renders broken past viewport (2.1.138 + 2.1.139)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Scrollback regression appeared on 2.1.138 and persists on 2.1.139 inside iTerm2 + tmux:

  1. Mouse wheel is hijacked — scrolling up cycles previous input history instead of the chat transcript.
  2. Option+wheel moves through scrollback, but any text past the terminal viewport height renders corrupted or disappears (partial lines, missing rows, ghost characters).
  3. PgUp / PgDn is the only mechanism that renders prior content correctly — one screen at a time, unworkable for copying long messages.

The same setup worked correctly before 2.1.138.

Root Cause

Scrollback regression appeared on 2.1.138 and persists on 2.1.139 inside iTerm2 + tmux:

  1. Mouse wheel is hijacked — scrolling up cycles previous input history instead of the chat transcript.
  2. Option+wheel moves through scrollback, but any text past the terminal viewport height renders corrupted or disappears (partial lines, missing rows, ghost characters).
  3. PgUp / PgDn is the only mechanism that renders prior content correctly — one screen at a time, unworkable for copying long messages.

The same setup worked correctly before 2.1.138.

Fix Action

Fix / Workaround

Impact

Reading and copying long outputs is the core read-loop of the tool. PgUp-only scrollback is significantly degrading day-to-day use; planning to downgrade to 2.1.123 as a workaround.

RAW_BUFFERClick to expand / collapse

Environment

  • Claude Code: 2.1.139 (reproduces on 2.1.138 too)
  • Terminal: iTerm2 on macOS 26.1
  • Multiplexer: tmux 3.6a
  • Install: native (~/.local/share/claude/versions/)

Summary

Scrollback regression appeared on 2.1.138 and persists on 2.1.139 inside iTerm2 + tmux:

  1. Mouse wheel is hijacked — scrolling up cycles previous input history instead of the chat transcript.
  2. Option+wheel moves through scrollback, but any text past the terminal viewport height renders corrupted or disappears (partial lines, missing rows, ghost characters).
  3. PgUp / PgDn is the only mechanism that renders prior content correctly — one screen at a time, unworkable for copying long messages.

The same setup worked correctly before 2.1.138.

Steps to reproduce

  1. macOS + iTerm2 + tmux 3.6a
  2. Run claude (2.1.138 or 2.1.139)
  3. Generate a multi-screen response
  4. Mouse wheel → input history cycles instead of scrolling chat
  5. Option+wheel → scrollback moves but renders corruption past the viewport
  6. PgUp → only working method, one viewport at a time

What I've tried

  • claude update (2.1.138 → 2.1.139): no improvement
  • 2.1.123 (cached locally) does not exhibit this

Impact

Reading and copying long outputs is the core read-loop of the tool. PgUp-only scrollback is significantly degrading day-to-day use; planning to downgrade to 2.1.123 as a workaround.

Possibly related

  • #56546 Fullscreen TUI janky/non-smooth scrolling
  • #56881 missing docs for CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN
  • #51393 scroll regression in Windows Terminal since 2.1.x
  • #55826 [Meta] Scrollback after compaction

May be a manifestation of alternate-screen / fullscreen TUI mode interacting badly with tmux's mouse capture — the iTerm2 + tmux combination seems to be the trigger.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING