Skip to content

Reading chat history during LLM responses still re-snaps the viewport (re-open of #4196) #29094

Closed

Description

@divitkashyap

Description

Scrolling up to read history during an active LLM response causes the viewport to snap back to the bottom on every token. Reading older messages mid-response is effectively impossible.

This is a re-open of #4196, which was auto-closed after 60 days of no activity. Multiple users continued reporting it on that thread after the close (in Ghostty, xfce4-terminal, WezTerm). The cause is that the message scrollbox is set to `stickyScroll={true}` unconditionally, so any height change snaps back to bottom regardless of user scroll state.

OpenCode version

Latest `dev` (reproduced against the current branch I'm submitting a fix from)

Steps to reproduce

  1. Start a session and trigger a long LLM response.
  2. While the response is still streaming, press Page Up / scroll up.
  3. The viewport jumps back to the bottom on the next streamed token.

Operating System

macOS (also confirmed by other users on Linux + various terminals — see thread on #4196)

Terminal

Ghostty, WezTerm, xfce4-terminal (per #4196 commenters)

Note

PR #21343 had a fix for this and was auto-closed by the same cleanup that closed the issue. I've rebased it onto current `dev` and will link the new PR here.

Activity

  1. febergs commented on Jul 20, 2026

    @febergs

    Still reproducing on opencode 1.18.4 (latest release), macOS. This is by far my biggest complaint with opencode. Everything else has been essentially flawless. This one thing is the daily annoyance that actually disrupts my workflow.

  2. 817811770 commented on Aug 3, 2026

    @817811770

    A fix for the desktop/web scroll-snap issue has been submitted: #40323 (Closes #40322). Verified locally on Windows: scroll up during a streaming response now holds position, and auto-follow resumes when returning to the bottom. If you are affected by this bug, a reaction or comment on the PR helps it stay open.

  3. tupo2 commented on Aug 23, 2026

    @tupo2

    Important bug in the TUI.

  4. Lauri-Nomme commented on Aug 23, 2026

    @Lauri-Nomme

    Important bug in the TUI.

    @tupo2 maybe you'd like to test this fix? #41247

  5. simonklee commented on Aug 23, 2026

    @simonklee
    Member

    Yeah, this is super irritating … on my list.

  6. simonklee commented on Aug 23, 2026

    @simonklee
    Member

    Thanks for the repro, @Lauri-Nomme, I don't know if your compensate thing is the right approach, but it at least makes it apparent what happens.

  7. lkonga commented on Aug 24, 2026

    @lkonga

    this really irritating, thought it was something specific to my terminal, really looking forward for this fix, kinda hard to believe is not possible to lock the scroll...

  8. simonklee commented on Aug 24, 2026

    @simonklee
    Member
  9. tupo2 commented on Aug 24, 2026

    @tupo2

    I have fixed this in the next version of OpenCode https://opencode.ai/v2/docs

    Does not work here with opencode2, still autoscroll when LLM responds.

  10. arut commented on Sep 15, 2026

    @arut

    Fresh install, same problem.

  11. tupo2 commented on Sep 20, 2026

    @tupo2

    Fixed for me since some versions (current 2.0.10), Xfce terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions