claude-code - 💡(How to fix) Fix [BUG] VSCode extension: auto-scroll during streaming prevents scrolling up [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58767Fetched 2026-05-14 03:40:00
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×2

Error Message

Error Messages/Logs

Root Cause

Root cause appears to be in webview/index.js (v2.1.140). The "is user at bottom?" check uses a 50px threshold:

Fix Action

Fix / Workaround

Patching the threshold locally to < 2 fully resolves the issue: scrolling up during streaming now works as expected, and stick-to-bottom re-engages once the user manually scrolls back to the bottom.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

While Claude is streaming a response, the chat panel auto-scrolls to the bottom every time a new line/token is appended. Any attempt to scroll up with a trackpad is immediately overridden — within a frame the view snaps back to the bottom. This makes it impossible to re-read earlier content (or copy from it) until the stream finishes.

Root cause appears to be in webview/index.js (v2.1.140). The "is user at bottom?" check uses a 50px threshold:

let v5 = scrollHeight - scrollTop - clientHeight;
A.current = v5 < 50;

A single trackpad scroll tick on macOS produces a delta of ~10–40px, which keeps v5 < 50 true, so the next streamed chunk re-triggers Bk(Q) and snaps to the bottom. The user can never get out of the "near bottom" window with normal trackpad use.

Patching the threshold locally to < 2 fully resolves the issue: scrolling up during streaming now works as expected, and stick-to-bottom re-engages once the user manually scrolls back to the bottom.

What Should Happen?

Stick-to-bottom should follow the standard contract:

  • If the user is exactly at the bottom, snap to the bottom on new content.
  • As soon as the user scrolls up by any amount, suspend auto-scroll until they manually return to the bottom.

Suggested fix: reduce the threshold from 50 to ~2 pixels, or check scrollHeight - scrollTop - clientHeight <= 1. Most stick-to-bottom libraries (e.g. use-stick-to-bottom) default to a near-zero threshold for exactly this reason.

Error Messages/Logs

Steps to Reproduce

  1. Install Claude Code VSCode extension v2.1.140 (anthropic.claude-code).
  2. Open the Claude Code panel in VSCode.
  3. Send any prompt that produces a long streaming response.
  4. While the response is still streaming, try to scroll up with the trackpad to re-read earlier content.

Expected: the view stays where the user scrolled. Actual: the view immediately snaps back to the bottom on the next streamed chunk.

Environment:

  • VSCode extension: anthropic.claude-code v2.1.140 (also reproduces on 2.1.139)
  • VSCode: 1.119.0 8b640eef5a6c6089c029249d48efa5c99adf7d51 arm64
  • OS: macOS 15 (Darwin 25.0.0)
  • Hardware: MacBook Pro 14" M4 (built-in Liquid Retina XDR, default scaled resolution)
  • Input: built-in trackpad (smooth scroll)

Note: I initially suspected a HiDPI/scaling issue, but after inspecting the bundled webview code the root cause is the 50px threshold combined with macOS smooth-scroll deltas — it's not display-specific.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Other

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] VSCode extension: auto-scroll during streaming prevents scrolling up [2 comments, 2 participants]