Allow configurable conversation history display length in CLI
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:
- The terminal scrollback buffer is large enough (e.g., Ghostty with 10M line scrollback)
- The model's context window still has the full conversation (e.g., 150K of 1M used)
- 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
0orunlimitedwould 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
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗