[BUG] View scrolls to top when context becomes large (possible compaction trigger)
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?
When the conversation context grows beyond a certain size, the terminal view automatically scrolls to the very top of the conversation instead of staying at the bottom
(latest message). This is very disruptive as I have to manually scroll back down every time.
What Should Happen?
The view should stay at the bottom, showing the latest messages.
Error Messages/Logs
The view scrolls to the very top of the conversation.
Steps to Reproduce
Steps to reproduce
- Start a Claude Code session in Windows Terminal
- Have a long conversation or work on a task that generates significant context
- At some point (likely when context compaction is triggered), the view jumps to the top of the conversation
## Expected behavior
The view should stay at the bottom, showing the latest messages.
## Actual behavior
The view scrolls to the very top of the conversation.
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.81
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
## Environment
- OS: Windows 11 Pro (10.0.26200)
- Terminal: Windows Terminal
- Claude Code version: 2.1.81
- Shell: bash
- Model: claude-opus-4-6 (1M context)
## Additional context
This seems to correlate with context size rather than a specific action. It does not happen in short conversations. My guess is it's related to context compaction or TUI
re-rendering when the conversation history is large.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗