[BUG] Terminal uncontrollably scrolling even in fresh session
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?
There were many issues (specifically, #3648 - but in different context) with seizure-inducing scrolling previously, which were reportedly recently fixed. Unfortunately, in my case it is still very much present.
It can be reproduced in fresh, clean claude-code session in any terminal, both on Ubuntu (Terminator) and in Windows (Windows Terminal, Putty).
During heavy scrolling, when there is a lot of previous text present - one can notice high SSH CPU load + high network traffic. A lot of random data is being sent. If you are on slow network it might be hard to recover.
What Should Happen?
Print ends on 1009, no random scrolling.
Error Messages/Logs
Steps to Reproduce
- Start fresh Claude code (in most of cases I run it remotely via SSH via various terminal emulators - latency to server <2ms, bandwidth >10Gbit).
- Issue request: Write a python program that prints 1 prime number every 0.25 seconds. Run it and watch the results. As soon as printed value is above 1000 - terminate the program. Make sure both you and me can see every printed value. Also, make sure to flush to avoid issues with buffering.
Observe that as soon as more than 1 screen of text is printed - it starts scrolling uncontrollably.
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
No response
Claude Code Version
2.0.76 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
I've noticed that some old versions of Claude Code limited output of running commands to 5 lines (essentially, always showing last 5), but now - it is unlimited, which causes the issue.