[Critical UX Regression] No way to access conversation history — alternate screen buffer kills all scrollback (v2.1.89+)
Environment
- Claude Code version: 2.1.90
- Terminal: Apple Terminal (macOS Sonoma 14.5)
- Model: Claude Opus 4.6 (1M context)
- Plan: Max-tier usage
Problem
Since v2.1.89, Claude Code switched to an alternate screen buffer (fullscreen TUI) that completely destroys native terminal scrollback. You cannot scroll up to see messages from even 10 messages ago. This is a severe regression from pre-v2.1.89 where everything was written to normal terminal scrollback and you could freely scroll up, use Cmd+F, etc.
What broke:
- Native scrollback gone — Terminal's scroll buffer is empty. Mouse wheel / trackpad scroll shows nothing above current view.
- Transcript mode (Ctrl+O) is insufficient — Only has
Ctrl+E(toggle expand) andq(exit). No way to export to scrollback, open in editor, or search. The documented[andvkeys do not exist. - No opt-out — There is no environment variable to disable the alternate screen buffer.
CLAUDE_CODE_NO_FLICKERcontrols flicker rendering, not the screen buffer. - Cmd+F doesn't work — Because alternate screen buffer content isn't in the terminal's search scope.
What used to work (pre-v2.1.89):
- Full native scrollback — scroll up to see entire conversation
- Cmd+F to search any message
- Copy/paste from any point in the conversation
- tmux copy mode worked normally
Impact
This makes Claude Code significantly harder to use for long sessions (which is the primary use case for power users). When working with agent teams on complex multi-file projects, you need to reference previous tool outputs, error messages, and decisions. Currently you can't.
Related issues (fragmented, none resolved)
- #2479 — Avoid clearing the terminal scrollback (2024, still open)
- #42667 — Terminal scrollback cleared at random
- #42180 — Scrollback lost in tmux
- #42024 — Scrollback lost in Ghostty
- #41965 — v2.1.89 regression: flicker-free destroys scrollback
- #42002 — Alternate screen buffer blocks scrollback
- #42340 — Scrollback wiped on redraw
- #42076 — Virtual scroll height underestimation
- #42527 — Feature request for configurable scrollback buffer
- #27242 — No mechanism to review previous context
- #18204 — Compaction clears screen
12+ open issues about the same root cause, zero resolution.
Expected Solution
At minimum ONE of:
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1— env var to opt out of fullscreen TUI and use normal terminal output (like pre-v2.1.89)- Working transcript export —
Ctrl+O→ key that actually dumps full conversation to native scrollback (the documented[key doesn't exist) Ctrl+O→ editor — key that opens full conversation in$EDITOR(the documentedvkey doesn't exist)claude historyorclaude export— CLI command to dump current session to stdout/file
Suggested Priority
This affects every single user on every terminal emulator. 12+ open issues. Basic usability regression. Should be P0.
---
Submitted via Claude Code v2.1.90
Showing cached comments. Read the full discussion on GitHub ↗
14 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Cross-posting from my comment on #28077 — these two issues are compounding.
Background
Power user running multi-hour operational sessions (1,500+ sessions, institutional memory across projects). Setup: Ghostty 1.3.2,
scrollback-limit = 10000000, macOS, Claude Code 2.1.91, tmux.My sessions involve transcript digestion, document generation, multi-step task tracking, and cross-referencing earlier outputs. I capture full conversation logs via
tmux capture-pane+save-buffer— these feed into session resume protocols, compaction recovery, and searchable archives.Two Compounding Regressions
Regression 1: Internal Render Buffer Cap (v2.1.76) — see #28077
~300 line hard cap in the Ink TUI renderer. No user-configurable fix. Compiled into the binary.
Regression 2: Alternate Screen Buffer (v2.1.89) — this issue
Completely bypasses native terminal scrollback.
tmux capture-panegets nothing.Partial fix:
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1restores native scrollback, but you're still capped at ~300 lines from Regression 1.The Combined Effect
The Ask
tui.maxScrollbackLinesin settings.json or as env varCLAUDE_CODE_DISABLE_ALTERNATE_SCREEN— it works but is undocumented$TMUX/$STY) and default to native scrollbackFull details in my comment on #28077.
Confirming this regression on v2.1.90 (macOS, Terminal.app). With the 1M context window (Opus 4.6), conversations get long fast — and losing scrollback makes it impossible to review what happened earlier in the session. Ctrl+O transcript mode helps but it's not discoverable and not a substitute for native scrollback. Would appreciate an env var opt-out like
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1or a setting insettings.json.Still experiencing this on v2.1.90 with macOS Terminal.app.
CLAUDE_CODE_NO_FLICKER=0is set and confirmed loaded in the shellThe env var doesn't appear to prevent the scrollback wipe triggered by the TUI re-render when agent status indicators appear.
I am experiencing the same issue using iTerm2, so I don't think it has to do with Terminal.app specifically. This basically removes my ability to see conversation history, especially since even transcript mode no longer shows anything.
same exact issue on iTerm2, works for a bit and then stops working after I unplug my secondary screen, which is weird
I created https://github.com/drorm/claude-screen mostly to deal with issues with claude in GNU screen, but now it also addresses this issue.
Instead of clearing the screen it outputs
If that bothers you, change the code :-).
v2.1.114 — the return, by another path
Origin. The April 9-10 filings (vadimdemedes/ink#935, comments on #16310 and #2479) named the chain: Ink's render-loop
clearTerminalexpanding toeraseScreen + CSI 3J + CSI H. 2.1.101 struck theCSI 3J. That part holds — byte-level measurements on 2.1.114 confirm zeroCSI 3Jacross multiple session-length samples.The loss returned through what remained.
Mechanism. Ink still emits
CSI 2J + CSI Hper render cycle. The VT spec is ambiguous on whetherCSI 2Jtouches scrollback. Emulators disagree. On ConPTY, on xterm.js, on the affected pipelines,CSI 2Jbehaves as scrollback-destructive. The bytes are individually legal; the damage is cumulative and emulator-specific.Evidence (aggregate byte-counts across session-length samples on 2.1.114):
| Sequence | Count |
|---|---|
|
CSI 3J| 0 || Alt-screen toggles (1049/1047/47 h/l) | 0 |
|
RIS(\ec) | 0 ||
CSI 2J + CSI H| per-render cadence (dozens per long sample) ||
CUUdistribution | varies sample-to-sample — content-dependent Ink redraw strategy |Mitigations attempted:
CSI 3J, alt-screen variants, andRIS— no-op on 2.1.114 as the counts predictCLAUDE_CODE_NO_FLICKER=1— scrollback survives; wheel-scroll degrades to approximately five events per rendered line, unusableCLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1— no effect on the tested pipelinesCUU) rewriting or clamping toward absolute positioning — caps renderable UI height, reproduces the symptom by constructionCondition observed (single observation, not yet falsified). Scrollback survives when the terminal viewport is scrolled above the bottom of the buffer at the moment of an Ink redraw; destroys when the viewport is at the bottom. Consistent with microsoft/terminal#7019 grid-overwrite semantics under ConPTY.
Environments tested:
Practical impact on this pipeline: Claude Code interactive use has declined substantially since the 2.1.114 update. Engineering time invested in investigation and mitigation over the last two weeks has been significant. Development of Claude-Code-specific internal tooling has been paused. Alternative agent products are under evaluation; we have not observed comparable scrollback-destruction behaviour on those.
The fix point. Ink's render loop remains the primitive. ink#935 laid out three concrete options. Below that layer, emulator-by-emulator mitigation will continue to produce recurrences of this class.
Working workaround for 2.1.114 (WSL2/Win11 pipeline)
Following the earlier evidence that 2.1.114 drops
CSI 3Jbut retains theCSI 2J + CSI Hrender-loop pattern, a two-part workaround now produces a usable interactive experience on this pipeline:Part 1 — enable alt-screen via
CLAUDE_CODE_NO_FLICKER=1Puts Claude Code in alternate-screen mode. Main-buffer scrollback is preserved across the session; Claude's redraws touch only the alt buffer.
Tradeoff: Claude enables full mouse tracking (SGR mode
\x1b[?1006hplus legacy 1000/1002/1003), so mouse wheel events are captured by the app instead of the terminal's native scrollback scrolling. In-app wheel handling scrolls far fewer lines per click than a typical OS setting — roughly 0.2 lines/click vs. ~3 lines/click in the tested environment — which makes wheel scroll unusably slow on its own.Part 2 — amplify SGR wheel events on stdin
Intercept SGR wheel press sequences on the way from terminal to Claude and write each sequence N times. Effectively multiplies wheel sensitivity N-fold.
Target format (SGR mouse, mode 1006):
Only pure wheel (
Cb == 64orCb == 65) should be amplified. Modifier-held wheel (Shift/Alt/Ctrl,Cb68/72/80/etc.) and all non-wheel events must pass through unchanged — amplifying modifiers risks unintended behavior bound to those keys.Implementation is roughly 150 lines of C in a small PTY-pair proxy (stdin → SGR parser → amplifier → child pty). Default amplification factor off; env-gated.
Multiplier tuning by bisect: 8 was too fast, 6 slightly fast, 4 settled as usable in the tested environment.
Result
With both parts active:
CLAUDE_CODE_DISABLE_MOUSE=1, which kills those)This is not a fix — the underlying render-loop behavior remains as described in earlier comments. It gives a functional interactive experience while the upstream question is worked out.
Remaining symptoms on this workaround
Both appear to originate in Ink's layout/redraw strategy for dynamic elements, not in the scroll-destruction mechanism. Out of scope for a terminal-side mitigation.
iTerm2 user, "tui": "default" works but flickers — please add a third mode that does alt-screen rendering but still emits lines to main-screen scrollback.
using v2.1.138 still having this problem
Any fix for this yet?
Core cause (for anyone arriving here looking for a client-side fix): Claude Code's TUI (Ink-based) enables the alternate screen buffer and performs a full-screen clear (
CSI 2J + CSI H) every render. All output is painted onto the alternate screen and never written to the terminal's main buffer — so there is nothing in scrollback to recover. No client-side workaround (tmux, PgUp/PgDn, terminal shortcuts) can bring back content that was never written there in the first place. The fix has to happen upstream in the render loop.Environment:
Environment
Repro
Expected
Actual
This looks like the alternate-screen-buffer scrollback regression (#42670 / #41965) combined with the large-output whitespace issue (#14683). The v2.1.191 changelog mentions scroll-position and agent-panel fixes, but the problem persists when many large sub-agent outputs accumulate in one session.
Workarounds that help but don't fix it
Ctrl+O(transcript mode) to view full history.CLAUDE_CODE_NO_FLICKER=0to disable the alternate screen buffer (restores older scrollback behavior).I've just hit this today for the first time