[BUG] CLI crazy scrolling
Resolved 💬 18 comments Opened Mar 14, 2026 by nedlern Closed Apr 20, 2026
💡 Likely answer: A maintainer (claude[bot], contributor)
responded on this thread — see the highlighted reply below.
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
❯ do you know you have a terrible bug. You routinely scroll the Claude CLI window back to
the top, making it impossible for me to read stuff above or copy it. And shame on you for not having a claude UI on top of bug reporting.
What Should Happen?
Claude CLI should scroll only when it's 'at the bottom', not when the user has 'taken control' of the scroll bar.
Error Messages/Logs
Steps to Reproduce
use claude CLI with big copy and pastes
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.75 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
18 Comments
We hit this too and collected working workarounds into a repo: claude-code-scroll-fix
Quick fix (Windows Terminal): Add
"snapOnOutput": falseto yourprofiles.defaultsinsettings.json. Reduces jumping ~60-70%.Complete fix: Run Claude inside tmux — it completely decouples your scroll position from Claude's cursor repositioning. The repo has a one-click installer that sets up WSL + tmux + a Windows Terminal profile.
Root cause: Claude Code uses CSI escape sequences to rewrite the thinking spinner in-place, and terminals follow the cursor position back up.
snapOnOutputonly fixes output-triggered scrolling, not cursor repositioning — tmux fixes both.Unfortunately running in tmux is not working for me.
reproduced on Ubuntu 22.04.5 with Claude Code 2.1.77
Any update on this?? Getting this for the last few days on Mac M4 26.2, with Claude 2.1.77. I am using it in Iterm
A fix for this is available as a Claude Code plugin: https://github.com/anthropics/claude-code/pull/35683
The scroll-fix plugin clamps cursor-up sequences within synchronized output blocks to the viewport height, preventing the terminal from scrolling to the top. Also includes Ctrl+6 freeze toggle for manual scroll control. Works on all platforms and terminals.
A fix is available as a Claude Code plugin: scroll-fix
Install:
Root cause: both Ink renderer AND readline/prompt system emit cursor-up sequences exceeding viewport height. The plugin clamps all cursor-up per write call. Also includes Ctrl+6 freeze toggle.
PR: https://github.com/anthropics/claude-code/pull/35683
Your solution injects minified code 🤔
Currently facing this issue on MacOS Tahoe 26.3.1 with Claude 2.1.78, I'm hoping this bug gets more traction.
I have the exact problem and it affects my workflow. I hope it gets fixed very very soon!
@ashwin-ant Please fix this urgently. It's so annoying.
Still broken as of v2.1.81:
https://github.com/anthropics/claude-code/issues/36582
https://github.com/anthropics/claude-code/issues/35403
https://github.com/anthropics/claude-code/issues/36816
https://github.com/anthropics/claude-code/pull/35683
https://github.com/anthropics/claude-code/issues/33814
https://github.com/anthropics/claude-code/issues/34845
https://github.com/anthropics/claude-code/issues/33367
https://github.com/anthropics/claude-code/issues/34400
https://github.com/anthropics/claude-code/issues/826
https://github.com/anthropics/claude-code/issues/36621
https://github.com/anthropics/claude-code/issues/36128
https://github.com/anthropics/claude-code/issues/35766
https://github.com/anthropics/claude-code/issues/34242
https://github.com/anthropics/claude-code/issues/18299
+1 — experiencing this on GNOME Terminal (same behavior as IntelliJ terminal). Cursor randomly scrolls up during streaming output.
this really is a terrible bug. it interrupts workflow so much, my pinky is tired of flexing to the page down key. this is a breaking bug. if you wish to prevent users from using other agents (opencode) then please stay critically alert to your own product. sorry for the tone but this is super frustrating and i've been forced to try and use the desktop app, as this bug hits me every single session in the cli.
This also happens in the integrated terminal in VS Code and there's no
"terminal.integrated.scrollOnOutput": falseoption valid in the user configs there to use, so not sure what the quick fix is for that.👍 We're experiencing the same issue embedding xterm.js 6.0.0 in a Tauri app. The scroll position jumps when Claude Code redraws its TUI while the user is scrolled up. Confirmed root cause: cursor-up sequences exceeding viewport height + ESC[2J/ESC[3J.
hey. it's fixed at the terminal level here
https://github.com/Dcouple-Inc/Pane/pull/120
open source, using xtermjs which is the same terminal as VS Code. feel free to copy this fix or download the latest release to run claude code on any operating system with the fix in place. i was so mad and frustrated at this that I had to fix it myself.
yeah i had to switch off cursor/vscode and build myself an ide that managed xtermjs (the library they both use) well enough for the complex TUIs to not break.
works great and i have a fix for the scroll jump i just implemented rn here
https://github.com/Dcouple-Inc/Pane/pull/120
This is a duplicate of #35403, which was fixed as of version 2.1.101.
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.