[BUG] Conversation history truncated in TUI — older messages invisible before compaction
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
During long sessions, older parts of the conversation become invisible in the
terminal.
This is separate from auto-compaction — the messages are still in context but can't
be
scrolled back to in the UI. Terminal scrollback settings have no effect since Claude
Code
uses the alternate screen buffer.
This is especially painful when doing planning followed by implementation. You can't
scroll
up to reference earlier discussion, and if the session runs long enough,
auto-compaction
kicks in mid-implementation and makes lossy decisions about what to keep.
What Should Happen?
Full conversation history should remain visible and scrollable within a session. At
minimum,
a virtual scroll mechanism or configurable render limit should be available so users
can
reference earlier parts of the conversation.
Error Messages/Logs
Steps to Reproduce
- Start a Claude Code session
- Have a long planning conversation (20+ back-and-forth exchanges)
- Begin implementation based on the plan
- Try to scroll up to reference earlier planning discussion
- Observe that older messages are no longer visible — they've been dropped
from the terminal's visible buffer
- Terminal scrollback settings (e.g., increasing buffer size) have no effect
because Claude Code uses the alternate screen buffer
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
unsure — sometime before 2.1.81
Claude Code Version
2.1.83
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Related: #28077 (feature request for virtual scrolling / configurable render limit).
The workaround of using /compact proactively helps but shouldn't be necessary.
The previous behavior where the full conversation remained visible was preferable.
A recent update reduced scrollback resets from once per turn to once per ~50
messages,
which helps but doesn't solve the core problem.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗