Configurable scrollback buffer size for TUI alternate screen

Resolved 💬 2 comments Opened Mar 24, 2026 by edimuj Closed Mar 24, 2026

Problem

Claude Code's TUI uses the alternate screen buffer with a scrollback limit of ~2000 lines. This is not configurable. In long-running sessions (10+ hours, multiple subagents via the Agent tool), important output — tool results, diffs, earlier conversation — scrolls out of reach.

This is especially painful in tmux, where the user expects large scrollback (I have history-limit 200000) but the alternate screen buffer bypasses it entirely.

Requested solutions (any of these would help)

  1. maxScrollbackLines setting in settings.json — let users control the TUI buffer size
  2. --no-alternate-screen flag — opt out of the alternate screen entirely, letting the terminal/tmux manage scrollback natively
  3. Increase the default — 2000 lines is very low for a tool that outputs verbose diffs, tool results, and multi-agent workflows

Environment

  • Claude Code v2.1.81
  • tmux 3.5a with history-limit 200000
  • Ubuntu Server (remote dev via SSH/JetBrains Gateway)
  • Sessions regularly run 4-10+ hours with heavy tool use

Related issues

  • #28077 — Allow scrolling back to view full conversation history
  • #2479 — Avoid clearing the terminal scrollback
  • #24705 — Context compaction should not reset/clear the terminal
  • #16310 — Tmux scrollback buffer cleared during autocompact
  • #4851 — Terminal scrollback buffer rewind lag after extended use

View original on GitHub ↗

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