Allow configurable conversation history display length in CLI

Resolved 💬 5 comments Opened Apr 1, 2026 by stevenfreedman Closed May 10, 2026

Problem

When running long Claude Code sessions (especially with 1M context windows), the CLI renderer truncates visible conversation history. Users cannot scroll back to see earlier parts of the conversation, even though:

  1. The terminal scrollback buffer is large enough (e.g., Ghostty with 10M line scrollback)
  2. The model's context window still has the full conversation (e.g., 150K of 1M used)
  3. No compaction has occurred

This creates a confusing experience where the user knows the context is intact but cannot visually review earlier exchanges.

Expected Behavior

A configurable setting (e.g., conversationDisplayLimit or visibleHistoryLines) that controls how much conversation history the CLI renderer keeps visible in the terminal output. Ideally:

  • Default could remain as-is for performance
  • Power users with large terminals/scrollback can increase it
  • Setting it to 0 or unlimited would disable truncation entirely

Environment

  • Claude Code CLI (latest)
  • 1M context window (CLAUDE_CONTEXT_WINDOW=1000000)
  • Ghostty terminal with 10M line scrollback
  • Ubuntu 24.04

Use Case

Long-running sessions involving multi-project operations, audits, and iterative work where reviewing earlier conversation turns is valuable for continuity.

🤖 Generated with Claude Code

View original on GitHub ↗

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