[BUG] iTerm2: Scroll position resets while model is generating output
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 using Claude Code in iTerm2, if I scroll up to review previously
generated code while the model is still producing output, the scroll
position suddenly jumps back to the top of the buffer. This forces me
to manually scroll down again repeatedly to find where I was reading.
This happens consistently whenever new text is being streamed and I
attempt to scroll through earlier output. It makes it very difficult
to review code that was generated moments ago while waiting for the
model to finish its current response.
Environment:
- Terminal: iTerm2
- OS: macOS 15.x (Sequoia)
- Claude Code: latest version
What Should Happen?
Expected behavior: Scroll position should remain stable while
reviewing previous output, even if new content is being appended
at the bottom.
Actual behavior: Scroll jumps to the top of the terminal buffer
as soon as new output is rendered, losing the current reading position.
Error Messages/Logs
Steps to Reproduce
Trying to scroll
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
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗