[BUG] Terminal laggy scrolling and jumping with long history
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version: 1.0.5
- Operating System: Ubuntu 24.04/WSL2/Windows 11
- Terminal: VSCode integrated terminal, Windows Terminal
Bug Description
When there is a long terminal history, usually after quite a bit of work and a compaction or two terminal scrolling becomes incredibly slow, and claude has a tendency to cause the terminal to jump to top then scroll all the way back down slowly when presenting a diff with auto accept turned off.
Steps to Reproduce
- Do a bunch of work with auto accept either on or off
- Turn off auto accept when the terminal history is quite long
- Resize the terminal or have claude present a diff
Expected Behavior
The terminal to resize smoothly and/or present the diff normally.
Actual Behavior
The terminal jumps to the top of history then slowly jumps all the way back down.
Additional Context
It would be nice to have an option to clear the terminal while keeping the current context(Anyting post the previous compact), and/or the option for a compact to clear the terminal when running it.
I've been suffering through this problem - usually caused by me accidentally resizing the terminal window within the Cursor integrated terminal when I have a long history. I usually wait for it to finish jumping around and then go back to what I was doing, ideally in a new Claude session to clear the history.
However today I got into an endless jumping loop while having a long history and asking Claude to write it's current progress back to a Linear ticket. I had to force crash the terminal to get to stop jumping.
OSX 15.5 / Cursor 0.50.7 Terminal / devcontainer running Debian 12 / Claude Code v1.0.11
this is an issue caused by the lib they use to handle the terminal UI, Ink. In general, if you just resize the window, the problem is solved for a while.
not a fix, but helps
this is becoming a great annoyance !
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.