[BUG] Viewport jumps to top on every interaction in browser-based terminal (regression after 2.1.64)

Status Fixed / completed
Reported on v2.1.81
Maintainer reply ✓ Yes — claude[bot]
Activity 4 comments · opened Apr 2, 2026 · closed Apr 26, 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?

When using Claude Code in a browser-based SSH terminal (NAS Docker GUI),
the viewport jumps to the top of the page on every interaction — sending
a message, approving a tool use, etc. The user has to manually scroll
back down after each action.

What Should Happen?

The viewport should stay at the bottom (latest content) after every interaction, not jump to the top of the conversation.

Steps to Reproduce

  • Environment: Node.js 22 Docker container on NAS
  • Terminal: Browser-based SSH terminal (NAS Docker management GUI, likely

xterm.js)

  • Access method: docker exec -it or NAS web terminal

Version info

  • 2.1.64: No jumping, works correctly
  • 2.1.81: Jumps briefly then auto-corrects back
  • 2.1.90: Jumps and stays at top, must manually scroll down

## What was tried

  • Custom terminfo disabling alternate screen buffer (smcup/rmcup) — didn't

help

  • tmux with mouse on — masked the issue but introduced mouse/copy conflicts
  • dtach — transparent passthrough, jumping still occurs
  • Downgrading to 2.1.64 — fully resolves the issue

Claude Model

us.anthropic.claude-opus-4-6-v1

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.90

Platform

AWS Bedrock

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

View original on GitHub ↗

4 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/38121
  2. https://github.com/anthropics/claude-code/issues/37389
  3. https://github.com/anthropics/claude-code/issues/37370

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

StarTrekking · 6 months ago
Found 3 possible duplicate issues: 1. Scroll position snaps to top of conversation when scrolling during response streaming #38121 2. Terminal viewport snaps to top of scrollback during output in long sessions #37389 3. Terminal scrollback jumps to top when scrolling up during output #37370 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

This is related but may not be an exact duplicate. My specific observations:

  • Jumping happens on every interaction (submit message, approve tool), not just during scrolling
  • Clear regression: works fine on 2.1.64, broken on 2.1.81+
  • Environment: browser-based terminal (NAS Docker GUI, xterm.js based)
  • Was unable to test short sessions separately (tested with --continue on a long session)
claude[bot] contributor · 5 months ago

This is a duplicate of #35403, which was fixed as of version 2.1.101.

github-actions[bot] · 5 months ago

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.