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

[BUG] Semi-infinite scrolling in terminal

Open GratefulDave opened this issue 7 months ago • 24 comments

Environment

  • Platform (select one):
    • [ ] Anthropic API
  • Claude CLI version: 1.0.24
  • Operating System: MacOS Sequoia 15.5
  • Terminal: iTerm

Bug Description

Not sure how to describe. The code randomly starts infinitely scrolling through the terminal content. It eventually stops. It seems to happen a lot when plan is enabled. After selecting Yes, it tends to scroll infinitely through the content again, but eventually stabilizes although sometimes it crashes.

Steps to Reproduce

It's random. I can't reproduce but it keeps happening. I would be surprised if this was only happening for me.

Expected Behavior

No infinite scrolling.

Actual Behavior

Infinite scrolling

Additional Context

NA

GratefulDave avatar Jun 15 '25 19:06 GratefulDave

I have this problem, too.

visionxyz avatar Jun 16 '25 04:06 visionxyz

what terminal emulator?

wolffiex avatar Jun 17 '25 23:06 wolffiex

Same here in bash / VS Code terminal

ottsch avatar Jun 17 '25 23:06 ottsch

bash/Cursor

visionxyz avatar Jun 18 '25 00:06 visionxyz

I still have the problem using WSL in vs code but i believe i have used in just plain wsl and still gett he issue

Kevsosmooth avatar Jun 19 '25 15:06 Kevsosmooth

This issue seems to be related to https://github.com/anthropics/claude-code/issues/769

LarsArtmann avatar Jun 21 '25 00:06 LarsArtmann

I have the same issue. At seemingly random times, between 3 and 10 minutes of usage, a screen full of previous text would continue to scroll for seconds and sometimes minutes. There were times I was worried that all that text would cause the token usage to exceed some quotas, so I killed the process after scrolling for minutes. Restarting Claude Code didn't seem to help.

  • Ghosty terminal
  • macOS Silicon
  • Max 200 plan
  • Claude Code Status v1.0.43

thomastthai avatar Jul 07 '25 07:07 thomastthai

Are you guys ever planning to fix this? It is a major drag on productivity and gives me a headache!

GratefulDave avatar Jul 17 '25 03:07 GratefulDave

now I am getting this error after it happens:



node:events:502
      throw er; // Unhandled 'error' event
      ^

Error: write ENOBUFS
    at afterWriteDispatched (node:internal/stream_base_commons:159:15)
    at writevGeneric (node:internal/stream_base_commons:142:3)
    at Socket._writeGeneric (node:net:969:11)
    at Socket._writev (node:net:978:8)
    at doWrite (node:internal/streams/writable:596:12)
    at clearBuffer (node:internal/streams/writable:775:5)
    at onwrite (node:internal/streams/writable:653:7)
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:105:10)
Emitted 'error' event on WriteStream instance at:
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  errno: -55,
  code: 'ENOBUFS',
  syscall: 'write'
}

Node.js v22.13.0

GratefulDave avatar Jul 25 '25 06:07 GratefulDave

This is affecting me as well. Nothing new to add to the bug report, but I'm leaving a comment to add weight to the ticket.

fabracht avatar Jul 26 '25 11:07 fabracht

This is affecting me as well. I don’t have anything new to add to the bug report, but I’m leaving a comment to support the ticket. I’m using Terminal and MCP Serena

phuongwd avatar Aug 06 '25 13:08 phuongwd

I experienced this as well, then remembered that I had set my iTerm "Scrollback lines" setting to "unlimited scrollback".

I changed that to 5,000 lines instead, and I haven't experienced the issue since. Yes, I still get little blips where I see some very fast scrolling through terminal line history. But they only last a few seconds instead of multiple minutes.

elliottbernstein avatar Aug 09 '25 03:08 elliottbernstein

My terminal is at 1,000 lines scroll back and I still have the issue.

GratefulDave avatar Aug 14 '25 03:08 GratefulDave

There are a couple of ways to recreate this. The main way is if you paste a large block of text while it is thinking. This used to crash it all the time. I learned not to do this, so I don't know if this still works, but it was reliable before.

DrMark avatar Aug 16 '25 12:08 DrMark

also happens in Claude Code in the Terminal in VSCode Remote from windows onto a Linux host with IDE integration enabled. I'm now trying a Claude app window in VSCode itself Claude Code v1.0.98

Shadyman avatar Sep 01 '25 05:09 Shadyman

This seems to be a terminal issue not a claude code issue. I have the same issue with auggie-cli....

On Mon, Sep 1, 2025 at 1:40 AM M Lange @.***> wrote:

Shadyman left a comment (anthropics/claude-code#2118) https://github.com/anthropics/claude-code/issues/2118#issuecomment-3240924154

also happens with VSCode Remote from windows onto linux. Claude Code v1.0.98

— Reply to this email directly, view it on GitHub https://github.com/anthropics/claude-code/issues/2118#issuecomment-3240924154, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACTWE74OPYO6AL44FQZYKZD3QPL4DAVCNFSM6AAAAAB7LTBVUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENBQHEZDIMJVGQ . You are receiving this because you authored the thread.Message ID: @.***>

GratefulDave avatar Sep 03 '25 02:09 GratefulDave

It seems to trigger whenever Claude displays something that's larger than the working area of the chat portion of the screen (ie, not the text box, status line, etc.)

Large MCP executions, large summaries, etc, basically anything that scrolls off the end of the screen. It seems to want to re-scroll (re-draw?) every time a new line is output or a new key is pressed until it's done whatever it does during the scroll-fest.

Shadyman avatar Sep 05 '25 23:09 Shadyman

I got the same issue

DeathmannX avatar Sep 09 '25 10:09 DeathmannX

This is a HUGE ux impediment and needs urgent fix. I also find that keystrokes including ESC do not get registered while the infinite scrolling is ongoing

AW2307 avatar Sep 10 '25 18:09 AW2307

Doing CTRL + T or CTRL + O multiple times it fixes the problem but not everytime its better than nothing i guess

X-Skoprio avatar Oct 02 '25 08:10 X-Skoprio

Everyone on my team has this problem. Any time the output is too long it seems that Claude goes nuts with scrolling until it prints the next thing. This happens all day long and it is a huge issue as I can't really type. I wouldn't be surprised if it could be medically dangerous for people who have strobe sensitivities.

I've seen this inside:

VSCode on Windows to Ubuntu PuTTY on Windows to Ubuntu KiTTY on Windows to Ubuntu

It has persisted since Claude 1.x all the way up to v2.0.21 (just updated tonight).

jgspratt avatar Oct 17 '25 04:10 jgspratt

Bump. Also seems related to https://github.com/anthropics/claude-code/issues/826

This is a significant UX issue. The only "workaround" I've found is to frequently start new sessions (entirely close out Claude Code + start in fresh sessions with no previous context).

runbgp avatar Nov 16 '25 04:11 runbgp

@bcherny @ThariqS @dhollman

ruant avatar Nov 20 '25 11:11 ruant