Skip to content

[Bug] Terminal auto-scrolls to buffer start when model writes output during scroll-up #35415

Closed

Description

@carldebilly

Bug Description
In a windows console (Windows 11 "new" terminal), if we scroll up a little bit to sneak what recently happend in the session while the model is working, as soon something new is written by the model, the terminal is getting scrolled all the way up to the very beginning of the buffer. That's extremely annoying.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.77
  • Feedback ID: aad02164-1782-428e-9db9-161ecaa70ecc

Activity

  1. added
    bugSomething isn't working
    duplicateThis issue or pull request already exists
    platform:windowsIssue specifically occurs on Windows
    on Mar 17, 2026
  2. github-actions commented on Mar 17, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] Terminal scrolls to top during agent execution (Windows Terminal + PowerShell) #34794
    2. Chat scrolls to top when Claude sends a message while user is scrolled mid-conversation #34673
    3. Scrolling during streaming output jumps to top of session #35403

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  3. yurukusa commented on Mar 17, 2026

    @yurukusa

    Two things happening here:

    1. Auto-scroll to bottom on output — Windows Terminal has a setting for this: Settings → Profiles → Defaults → Advanced → toggle off "Automatically scroll to bottom on output". This stops the terminal from chasing new output when you are scrolled up reading history.

    2. Scroll to buffer start — this is a different issue. Claude Code uses cursor positioning escape sequences (\e[H cursor home, \e[s/\e[u save/restore cursor) during status line updates and streaming. Some of these can reset the viewport position to the top of the scrollback buffer rather than just the bottom. This is the more disruptive of the two behaviors.

    For (2), the most reliable workaround is running Claude Code inside tmux or Windows Terminal tabs with separate scroll buffers. tmux isolates the escape sequences to the inner pane, so your outer scrollback is not affected. You can scroll the tmux buffer with prefix + [ while Claude keeps working.

    # Quick tmux setup
    tmux new -s claude
    # Inside tmux, run claude
    # Scroll: Ctrl+B then [ then arrow keys
    # Exit scroll: q
    
  4. self-assigned this
    on Mar 19, 2026
  5. ashwin-ant commented on Apr 19, 2026

    @ashwin-ant
    Collaborator

    This was fixed in v2.1.101 — Stopped emitting ERASE_SCROLLBACK (CSI 3J) on full resets in non-fullscreen mode, so terminal scrollback is preserved instead of being wiped (which made the view appear to jump to the top of the session) during streaming. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.

  6. github-actions commented on Apr 26, 2026

    @github-actions

    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.

  7. locked as resolved and limited conversation to collaborators on Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:tuibugSomething isn't workingduplicateThis issue or pull request already existsplatform:windowsIssue specifically occurs on Windows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions