You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Terminal still scrolls to top after Claude output #2790
When using Claude Code and when Claude asks for input (or sometimes randomly), the Wave Terminal will automatically scroll all the way to the top and user has to manually scroll down. I saw another issue describing the same already open since October 2nd. Unfortunately makes Wave Terminal almost unusable for Claude Code users.
Expected Behavior
Doesn't scroll up.
Steps To Reproduce
Use a Terminal inside Wave to use Claude Code
Wave Version
0.13.1
Platform
macOS
OS Version/Distribution
Tahoe 26.2
Architecture
arm64
Anything else?
No response
Questionnaire
I'm interested in fixing this myself but don't know where to start
I would like to fix and I have a solution
I don't have time to fix this right now, but maybe later
Sorry about this, it sounds super frustrating. Been working on some potential fixes #2941 and #2944, but the big problem is I just can't seem to reproduce the issue on my mac or on my windows box. I believe it is happening since there are so many bug reports, but I'm really struggling to figure out what is causing it (been pouring through the Wave and xterm.js code looking for anything that would cause a scroll to top).
If anyone else has this bug please include what platform (macos, windows, linux) you are on. If on mac also please let me know if you have automatic or always for "show scroll bars", and if you are on Sequoia or Tahoe.
Also, are you seeing this when:
Switching Tabs
Resizing the Terminal / Window
When Claude Code asks for input
When pasting input into Claude Code
Sometime else?
The more specific with the "when" can maybe help me narrow it down or repro it. Thanks
I put a lot of instrumentation into wave and a custom built xterm.js instance. I finally understand what is going on (for the most part).
Underlying issue is that on terminal resize (or i guess auto-compact) CC will emit a CSI 3 J escape code which means clear the terminal and the scrollback. it then repaints the entire session. The timing can be weird. Sometimes that happens almost instantaneously, but if it is "thinking" there can be a larger delay (tens of ms). When it clears everything, scrollTop obviously gets set back to 0. Now it doesn't always pin to the top, because there are heuristics, especially around "if you were at the bottom of the terminal, and new output arrives, try to stay at the bottom". But even those, completely fail when the terminal is "scrolled up" a bit which can easily happen when a resize happens while output is flowing in. I have also not tracked down a specific escape sequence or signal that I can use to know when the repaint is done (if I knew this I could just restore the line back after seeing that -- although the compaction screws with that).
I still need to track down why asking for input sometimes triggers this (maybe it is the auto-compact running at that time?).
While I don't think this issue can be 100% fixed, now that I know what's going on I can do a lot of mitigation.
I've already enhanced the scroll-to-bottom detection. I might also put the terminal into a special "CC" mode when I detect that CC is running so I can enforce stronger rules that match CCs output patterns (specifically when I see this CSI 3 J escape code).
Sorry about this, it sounds super frustrating. Been working on some potential fixes #2941 and #2944, but the big problem is I just can't seem to reproduce the issue on my mac or on my windows box. I believe it is happening since there are so many bug reports, but I'm really struggling to figure out what is causing it (been pouring through the Wave and xterm.js code looking for anything that would cause a scroll to top).
If anyone else has this bug please include what platform (macos, windows, linux) you are on. If on mac also please let me know if you have automatic or always for "show scroll bars", and if you are on Sequoia or Tahoe.
Also, are you seeing this when:
* Switching Tabs
* Resizing the Terminal / Window
* When Claude Code asks for input
* When pasting input into Claude Code
* Sometime else?
The more specific with the "when" can maybe help me narrow it down or repro it. Thanks
This happens to me both in Windows 10 and in Linux Ubuntu 24 / Cinnamon 6, so it's a pretty broad issue. It typically happens the most when Claude Code is "chattering" away with lots of small output statements in the terminal. I'm scrolling up to read its context or earlier messages and I'm guessing when it outputs a new statement to console, it causes the window frame to jump up to the top of the context. It's super annoying and it happens whenever claude code is outputting/active. It never happens when Claude Code is quiet waiting for input.
this should be fixed as of v0.14.1. note that if you are scrolled up in the middle of the content, and claude code does a repaint, you will lose your place. i don't think there is a general fix for that given that CC is actually clearing all the content and then re-displaying it. but this should be fixed if you are anchored to the bottom during a repaint.
if the "keeping the place" while scrolled up is still a big bug for folks, please open a new issue for that (as it will require a different fix)
Activity
caoccao commentedon Jan 22, 2026
I met the same issue. Now I have to abandon wave when using Claude Code.
erikaflowers commentedon Jan 31, 2026
I have the same issue.
mackh commentedon Feb 1, 2026
glad its not just me, on a mac, hit shift + down arrow to jump to the bottom
Oceanswave commentedon Feb 6, 2026
sadly using another terminal until this gets resolved.
fix: terminal scroll preservation on tab switch and alt buffer exit
sawka commentedon Feb 27, 2026
Sorry about this, it sounds super frustrating. Been working on some potential fixes #2941 and #2944, but the big problem is I just can't seem to reproduce the issue on my mac or on my windows box. I believe it is happening since there are so many bug reports, but I'm really struggling to figure out what is causing it (been pouring through the Wave and xterm.js code looking for anything that would cause a scroll to top).
(also reference the duplicate bug #2384 )
If anyone else has this bug please include what platform (macos, windows, linux) you are on. If on mac also please let me know if you have automatic or always for "show scroll bars", and if you are on Sequoia or Tahoe.
Also, are you seeing this when:
The more specific with the "when" can maybe help me narrow it down or repro it. Thanks
sawka commentedon Feb 27, 2026
Linking the CC issue here as well -- anthropics/claude-code#826
I wonder why certain people and certain terminals are having more problems.
caoccao commentedon Feb 27, 2026
Hi @sawka , it usually happens when CC clears the terminal after an auto-compact context.
sawka commentedon Feb 27, 2026
I put a lot of instrumentation into wave and a custom built xterm.js instance. I finally understand what is going on (for the most part).
Underlying issue is that on terminal resize (or i guess auto-compact) CC will emit a CSI 3 J escape code which means clear the terminal and the scrollback. it then repaints the entire session. The timing can be weird. Sometimes that happens almost instantaneously, but if it is "thinking" there can be a larger delay (tens of ms). When it clears everything, scrollTop obviously gets set back to 0. Now it doesn't always pin to the top, because there are heuristics, especially around "if you were at the bottom of the terminal, and new output arrives, try to stay at the bottom". But even those, completely fail when the terminal is "scrolled up" a bit which can easily happen when a resize happens while output is flowing in. I have also not tracked down a specific escape sequence or signal that I can use to know when the repaint is done (if I knew this I could just restore the line back after seeing that -- although the compaction screws with that).
I still need to track down why asking for input sometimes triggers this (maybe it is the auto-compact running at that time?).
While I don't think this issue can be 100% fixed, now that I know what's going on I can do a lot of mitigation.
I've already enhanced the scroll-to-bottom detection. I might also put the terminal into a special "CC" mode when I detect that CC is running so I can enforce stronger rules that match CCs output patterns (specifically when I see this CSI 3 J escape code).
CC to #2384
tl;dr now that I know what's causing a lot of the CC jumpiness I can fix the bulk of the problem
science commentedon Mar 1, 2026
This happens to me both in Windows 10 and in Linux Ubuntu 24 / Cinnamon 6, so it's a pretty broad issue. It typically happens the most when Claude Code is "chattering" away with lots of small output statements in the terminal. I'm scrolling up to read its context or earlier messages and I'm guessing when it outputs a new statement to console, it causes the window frame to jump up to the top of the context. It's super annoying and it happens whenever claude code is outputting/active. It never happens when Claude Code is quiet waiting for input.
sawka commentedon Mar 12, 2026
this should be fixed as of v0.14.1. note that if you are scrolled up in the middle of the content, and claude code does a repaint, you will lose your place. i don't think there is a general fix for that given that CC is actually clearing all the content and then re-displaying it. but this should be fixed if you are anchored to the bottom during a repaint.
if the "keeping the place" while scrolled up is still a big bug for folks, please open a new issue for that (as it will require a different fix)