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

Terminal window in VS Code refreshes/scrolls history on each key press

Open spirefyio opened this issue 1 year ago • 11 comments

So in VS Code, terminal window, running Claude.. once I type in a bit of text where I can use the scroll bar to go back up and see my history... at some point it just does this crazy refresh cycle for every key I press. I type a key (to continue my prompt) and it scrolls tons of text fast.. like its re displaying my entire history of chat until it gets to the end where my prompt is. It still works.. I can type in my prompt, but it is quite jarring when it happens. It seems to stop AFTER I send the prompt until I fill up the prompt text again.

spirefyio avatar Jun 09 '25 16:06 spirefyio

What version of claude are you using (claude --version). Do you have a repro where you can make it happen reliably?

igorkofman avatar Jun 09 '25 20:06 igorkofman

I am running Claude 1.0.21 and I am experiencing the behaviour described. I'm on: macOS 15.5 VSCode 1.96.2 (Cursor) zsh

alexgertz avatar Jun 12 '25 10:06 alexgertz

I am on latest as of today. I dont have an open repo to share.. but this is in the terminal window. It's like when their is too many lines in history.. it "redraws" ALL the lines on every key press.. so it flashes (very fast).. like its clearing then writing out ALL the text as fast as possible. For a long session.. it takes a good 3 to 5 seconds before I see what I am typing each character. I can type "blindly" fast and each keystroke restarts the flash/rapid fire text/scroll. Once I stop typing, it goes until I see the last lines and then my input text I was typing in.

spirefyio avatar Jun 13 '25 06:06 spirefyio

Hi, Im experiencing a similar issue but not with keypresses but when its thinking, it flases past scrolls all the time.

https://github.com/user-attachments/assets/12fb461d-f5ff-4155-9fd9-325c10879101

It is also kind of difficult to scroll while its thinking as it forces the scroll. Another issue is theres a huge gap between the input and the lower part of the terminal so you almost all the time need to make it bigger or scroll (which is a problem sometimes as described above) (below there are 3 selected lines with nothing)

Image

Overall having ClaudeCode in a terminal inside VSCode doesnt feel native, isnt possible that you integrate this similarly to how Copilot itself does in a Panel?

ivnnv avatar Jun 18 '25 07:06 ivnnv

This has been happening since the beta release for me. It doesn't matter if the terminal is embedded or used as is. I'm using Windows Terminal in WSL2. From what I've seen the issue happens when the text output becomes very large and is near the limit of the context.

heyagent avatar Jun 19 '25 08:06 heyagent

I can confirm that in native terminal, or while using nomachine in to my dev box and terminal via the GUI feed via nomachine, does it. I would have thought perhaps it was an issue via feeding GUI through proxy (e.g. nomachine or when using VMware guest OS). But even directly on the dev box terminal window OR in vscode terminal, it does this. I can't pinpoint exactly when it happens. Sometimes it seems to go for some time before I see it. But usually it seems as if it might be when there has been a lot of context. The fix is to quite claude and restart. But then I lose all context. So what I do now before ending a session is have claude dump everything we've done to a .md file so I can have it read it back in to regain some context and ideally not lose our place. Same thing I do when logging out for the night.

spirefyio avatar Jun 24 '25 21:06 spirefyio

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 03 '25 10:12 github-actions[bot]

Still happening

TeddyHarnat avatar Dec 21 '25 15:12 TeddyHarnat

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Jan 22 '26 10:01 github-actions[bot]

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

However, you want to follow instead https://github.com/anthropics/claude-code/issues/769, which is the main issue about terminal flickering/scrolling.

marcindulak avatar Jan 22 '26 11:01 marcindulak

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 Jan 29 '26 14:01 github-actions[bot]