claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Terminal laggy scrolling and jumping with long history

Open PinkishCow opened this issue 6 months ago • 1 comments

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

  1. Do a bunch of work with auto accept either on or off
  2. Turn off auto accept when the terminal history is quite long
  3. 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.

PinkishCow avatar May 29 '25 16:05 PinkishCow

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

michaelcox avatar Jun 05 '25 00:06 michaelcox

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

letanure avatar Jul 08 '25 10:07 letanure

this is becoming a great annoyance !

misterdojo777 avatar Jul 23 '25 09:07 misterdojo777

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.

github-actions[bot] avatar Aug 01 '25 14:08 github-actions[bot]