Terminal scrollback not working in long sessions (alternate screen buffer)

Open 💬 1 comment Opened Apr 1, 2026 by smeehan67

Description

Unable to scroll back through conversation history in long CLI sessions. The terminal viewport only retains a limited portion of the session output, making it impossible to review earlier parts of the conversation by scrolling up.

Environment

  • OS: macOS (Darwin 25.3.0, Apple Silicon M3)
  • Terminal: Terminal.app
  • Claude Code versions tested: 2.1.87, 2.1.88, 2.1.89 (same behavior on all three)
  • Shell: bash

What I've tried (none of these helped)

  1. Terminal.app scrollback set to "Limit to available memory" (effectively unlimited)
  2. Freed up system memory (plenty available)
  3. Set CLAUDE_CODE_NO_FLICKER=1 environment variable
  4. Tested on versions 2.1.87, 2.1.88, and 2.1.89 (identical behavior)
  5. Rolled back versions via symlink

Reproduction

  1. Start a long CLI session with significant output (e.g., multiple browser automation tool calls, reading large files, filling web forms)
  2. After ~30-60 minutes of active use, try scrolling up to the beginning of the session
  3. Scrollback stops well short of the beginning; earlier conversation turns are inaccessible

Expected behavior

Full session output should be scrollable in the terminal, as it was in earlier versions of Claude Code.

Likely cause

Claude Code uses the alternate screen buffer, which bypasses the terminal emulator's normal scrollback buffer. The alternate screen's internal viewport appears to have a limited size that doesn't scale with session length.

Impact

This makes it impossible to review earlier parts of a session, which is important when resuming work after a break or verifying what actions were taken. The conversation context is preserved internally (Claude can still reference earlier turns), but the user cannot visually review them.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗