Problem
Two related scrolling issues in the Claude Code terminal:
1. Viewport jumps to the TOP randomly, even when idle
The terminal spontaneously scrolls to the very top of the scrollback history, even when Claude is not generating output. This happens unpredictably and forces the user to scroll all the way back down to where they were reading.
2. Auto-scroll during output generation overrides manual scrolling
When Claude is actively generating output (streaming tokens or running tools), the terminal automatically scrolls to follow the latest output. This overrides any manual scrolling the user is doing.
Steps to Reproduce
Random scroll-to-top (Issue 1):
- Have a conversation with substantial history
- Scroll up to read previous output (while Claude is idle / not generating)
- The viewport randomly jumps to the very top of the history
Auto-scroll override (Issue 2):
- Start a conversation that produces long output
- While output is still streaming, try to scroll up to read earlier content
- The viewport snaps back to the bottom as new content renders
Expected Behavior
- The viewport should never jump to the top on its own
- Users should be able to scroll freely through history without the position being reset
- Auto-scroll should pause when the user manually scrolls away from the bottom, and resume only when the user scrolls back to the bottom
Impact
This is a significant usability pain point. The random scroll-to-top is especially disruptive — it makes reading through conversation history unreliable and frustrating. Users lose their place constantly.
Environment
- Platform: Linux (Manjaro)
- Terminal: standard terminal emulator
- Claude Code: latest version
Suggested Solution
Implement scroll position preservation:
- Never programmatically scroll to the top
- If the user scrolls up, lock the viewport at that position
- Resume auto-scroll only when the user scrolls back to the bottom
Problem
Two related scrolling issues in the Claude Code terminal:
1. Viewport jumps to the TOP randomly, even when idle
The terminal spontaneously scrolls to the very top of the scrollback history, even when Claude is not generating output. This happens unpredictably and forces the user to scroll all the way back down to where they were reading.
2. Auto-scroll during output generation overrides manual scrolling
When Claude is actively generating output (streaming tokens or running tools), the terminal automatically scrolls to follow the latest output. This overrides any manual scrolling the user is doing.
Steps to Reproduce
Random scroll-to-top (Issue 1):
Auto-scroll override (Issue 2):
Expected Behavior
Impact
This is a significant usability pain point. The random scroll-to-top is especially disruptive — it makes reading through conversation history unreliable and frustrating. Users lose their place constantly.
Environment
Suggested Solution
Implement scroll position preservation: