Scrolling during thinking/streaming jumps to top of conversation
Description
When Claude Code is thinking or streaming output, attempting to scroll through the conversation in iTerm2 causes the viewport to jump to the very top of the chat history instead of staying at the current scroll position. You then have to scroll through the entire conversation to get back to the bottom.
Steps to Reproduce
- Start a Claude Code session and have a conversation with some history
- Send a prompt that triggers extended thinking or a long response
- While Claude is thinking/streaming, try to scroll up to read a previous message
- The viewport jumps to the very top of the conversation
Expected Behavior
Scrolling should stay at the position the user scrolled to, regardless of whether Claude is actively rendering output.
Actual Behavior
The scroll position resets to the top of the conversation history during re-renders, forcing the user to scroll through the entire conversation to get back to the current output.
Environment
- Claude Code v2.1.81
- iTerm2 on macOS (Darwin 25.3.0)
- Terminal: zsh
Notes
This appears to be related to how Ink (the React-based terminal renderer) redraws the UI. Full-screen redraws during thinking/streaming seem to reset the terminal's scroll position. Running inside tmux partially mitigates this since tmux manages its own scroll buffer.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗