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

[BUG] Console scrolling top of history when claude add text to the console

Open ocontant opened this issue 10 months ago • 293 comments

Environment

  • Platform (select one):
    • [ ] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [ X ] Other: Claude Code MacOs Shell
  • Claude CLI version: 0.2.74 (Claude Code)
  • Operating System: MacOS 15.3.2 (24D81)
  • Terminal: iterm2

Bug Description

Once we reach a certain level of volume of text history in the console, every time we tape a new character in the prompt or whenever the bot add a character in its console, the terminal scroll back and forth to the top and back to current level.

Steps to Reproduce

  1. Significantly long history session
  2. Reach something like 5-6 pages long scroll lenght

Expected Behavior

The interface should never scroll up to the to for any reason. It should always follow current position. When a user is manipulating the scroll, the new generated text should continue to flow down without affecting the user scroll position.

A nice feature would be to have an arrow button to move directly to current scroll position (present or latest text)

Actual Behavior

Scroll flash aggressively, because every 1/10 of a seconds the scroll move to top and back to current in a split seconds. making the image flash painfully for the eyes (stroboscope effect).

Additional Context

Unfortunately, the code is closed, I cannot provide any more information.

ocontant avatar Apr 19 '25 18:04 ocontant

this is a huge issue. love claude code but this makes it really really hard to use

davidbenhaim avatar May 06 '25 21:05 davidbenhaim

A video example of this issue occurring. I'm not pressing/touching anything here. Very frustrating when it happens and forces you to stop working for up to 30 seconds from my experience.

https://github.com/user-attachments/assets/55569d1d-4d1e-4fe2-b178-d3fb8502c4ed

rosenpin avatar May 10 '25 00:05 rosenpin

sane problem here, seems to pop up sporadically i can't pinpoint what triggers - i can sometimes work for hours with large volumes without issue, however when it starts clearing the terminal doesn't help

Bedowthefoe avatar May 30 '25 05:05 Bedowthefoe

I have the same problem with Linux. It just started a few days ago. If I scroll up to read the latest output, it will jump to the first message, and I have to scroll back down. It's as if it triggers a refresh or background process timer and scrolls to the top.

Upgraded to 1.07, no change.

https://github.com/user-attachments/assets/73cb548f-a5f4-431b-af09-9db276953341

raveinid avatar May 30 '25 16:05 raveinid

I'm experiencing the same thing on VS Code's integrated Ubuntu (WSL2) terminal on Windows 11.

sepsol avatar May 30 '25 17:05 sepsol

Same here (WSL2/Ubuntu on Windows 11), in both VS Code's integrated terminal and Windows PowerShell.

Only happens when I scroll up to read some text during a Claude prompt (like when reviewing a long diff), it will then jump to the top of the scroll buffer after some periodic delay and then I have to scroll back down.

adamjs avatar May 30 '25 23:05 adamjs

I'm fairly certain whats happening is the terminal line limit is hit in cursor/vscode and the way that claude code is managing the lines on the screen causes it to reprint everything or something. Raising the line limit in vscode/cursor didn't help but if I use claude code in just normal terminal it works great.

davidbenhaim avatar May 31 '25 02:05 davidbenhaim

Mine is doing the opposite, takes me to the bottom while I am trying to read using Ghostty

ZerkerEOD avatar May 31 '25 16:05 ZerkerEOD

I have the same problem with Linux. It just started a few days ago. If I scroll up to read the latest output, it will jump to the first message, and I have to scroll back down. It's as if it triggers a refresh or background process timer and scrolls to the top.

Upgraded to 1.07, no change. Screencast.from.2025-05-30.09-39-35.mp4

Happening to me too in IntelliJ IDE, using Claude Code in WSL 2. This is a really frustrating experience, makes reviewing whatever Claude Code is proposing to implement really difficult as it keeps just scrolling to the top while you're trying to read.

illumineawake avatar Jun 01 '25 00:06 illumineawake

A similar issue in GNOME terminal 3.44.0 GNOME 42 (Ubuntu 22.04):

The terminal scrolls up every 10-20 seconds when Claude outputs the diff file for proposed changes and then asks the question with 3 options: Do you want to make this edit to such and such file? │ │ ❯ 1. Yes │ │ 2. Yes, and don't ask again this session (shift+tab) │ │ 3. No, and tell Claude what to do differently (esc)

This only seems to happen when viewing a diff with proposed changes. This issue doesn't occur when scrolling to the very bottom of the terminal (where Claude asks I we want to make the edit).

Workaround solution: Select one of the 3 options. Then it stops scrolling up while you're reading the diff file.

NathanSmeltzer avatar Jun 01 '25 08:06 NathanSmeltzer

Same issue happens to me. As I scroll to read the output, it jumps all to the way to the top. Even in a short conversation thread. Please fix. It's in the built in terminal, VSCode or any other IDE and the terminal itself (Ghostly for me, but it's for any terminal).

kevyyar avatar Jun 01 '25 14:06 kevyyar

This is extremely annoying. The workaround mentioned by @NathanSmeltzer didn't work for me with Wezterm on macOS. For now I run Claude Code in a tmux session. Entering the copy mode to scroll in the scrollback buffer stops the constant screen refreshes.

strayer avatar Jun 01 '25 22:06 strayer

New update came out and I want to cautiously say the scroll to Top issue has disappeared. Been going for 1 hour without issue, hoping it stays this way.

illumineawake avatar Jun 03 '25 02:06 illumineawake

Same issue, WSL2 on Windows 10 inside a bash terminal in VS Code. Copy/pasted something in and it just started scrolling to top and bottom (flashing) indefinitely. Doesn't seem to be the case in a non VSC terminal - it still flashes on larger copy/pastes but not between top/bottom, instead the text just briefly flashes and then keeps working as it should.

nalienffxi avatar Jun 05 '25 12:06 nalienffxi

+1

j-standfast avatar Jun 06 '25 18:06 j-standfast

1+

ChrisshinMC avatar Jun 07 '25 13:06 ChrisshinMC

+1. Cursor in WSL

utfam2016 avatar Jun 07 '25 21:06 utfam2016

+1

benkanspedos avatar Jun 08 '25 04:06 benkanspedos

same here with macos terminal (iTerm2), if the diff is larger than terminal window frame, scrolling is super annoying

https://youtu.be/ETTTBCsqTsI

euggie2000 avatar Jun 08 '25 17:06 euggie2000

That's a very big issue making Claude Code hard to use in WSL and Visual Studio Code. It keeps scrolling all the way up and sometimes gets stuck in a scrolling loop.

couturelp avatar Jun 09 '25 06:06 couturelp

yes, here also - using Cursor as IDE

UdiMizrachi avatar Jun 09 '25 14:06 UdiMizrachi

What is the best workflow to deal with this issue until we have a fix? Claude Code in a completely separate terminal?

rvaidya avatar Jun 10 '25 01:06 rvaidya

Having same issue on SSH on cursor

Ishannaik avatar Jun 10 '25 14:06 Ishannaik

same issue, please fix

HuskyyTrzadki avatar Jun 11 '25 07:06 HuskyyTrzadki

Same issue, Windows 11, Ubuntu WSL in Cursor

Kjellmann avatar Jun 11 '25 09:06 Kjellmann

Same issue, Windows 11, Ubuntu WSL in Cursor

+1

jportiz55 avatar Jun 11 '25 17:06 jportiz55

Same problem in vscode , if you even think of touching the terminal to resize it for example its starts and running through all chat history while being unresponsive.

zzecool avatar Jun 11 '25 19:06 zzecool

Hope claude can fix this issue soon with the help of claude code.

moazam1 avatar Jun 13 '25 00:06 moazam1

I'm experiencing a similar issue, macOS latest version and iterm2. Video here, alongside more reports of people experiencing the same issue:

https://www.reddit.com/r/ClaudeAI/s/N51c3BmF6T

virgildotcodes avatar Jun 13 '25 23:06 virgildotcodes

same exact thing with iterm2, and mac osx, anyone have a fix yet?

Syazvinski avatar Jun 15 '25 18:06 Syazvinski