TUI redraws force scroll-to-bottom, ignoring terminal scroll-to-bottom=no-output setting

Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Mar 22, 2026 · closed Mar 25, 2026

Description

Claude Code's TUI output forces the terminal viewport to scroll to the bottom during long conversations, overriding the terminal's scroll-to-bottom = no-output configuration. This makes it impossible to review earlier output while Claude is actively streaming or redrawing.

Behavior

  • Works correctly at the start of a conversation
  • After the conversation reaches a certain length, the viewport is forced to the bottom on every TUI redraw (status line animation, streaming text)
  • The terminal's scroll-to-bottom setting is completely bypassed
  • Survives terminal restart — tied to conversation length, not session state

Reproduction

  1. Configure terminal with scroll-to-bottom = no-output, no-keystroke (tested in Ghostty, but also confirmed in iTerm2 and Terminal.app)
  2. Start a Claude Code session
  3. Have a conversation long enough (several back-and-forth exchanges)
  4. Scroll up to review earlier output
  5. Observe: viewport is yanked back to the bottom on every Claude Code redraw

Root Cause

Claude Code's TUI appears to use terminal escape sequences (cursor repositioning / screen redraws) that force scroll-to-bottom regardless of terminal configuration. This is not regular PTY output — it bypasses the terminal's no-output scroll behavior.

Expected Behavior

When the user has scrolled up to review previous output, Claude Code should not force the viewport back to the bottom. The terminal's scroll-to-bottom configuration should be respected.

Related

  • ghostty-org/ghostty#10456 — Ghostty discussion confirming this is a Claude Code issue, not terminal-side
  • #35208 — Related scroll-to-bottom issue on edit acceptance

Environment

  • Claude Code CLI (latest)
  • macOS (Darwin 25.3.0, Apple M4 Pro)
  • Tested in: Ghostty (tip channel), iTerm2, Terminal.app

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/33624
  2. https://github.com/anthropics/claude-code/issues/36358
  3. https://github.com/anthropics/claude-code/issues/36582

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

evolsb · 6 months ago

Also hitting this on Ghostty (macOS). Can confirm scroll-to-bottom = no-output, no-keystroke has zero effect — the root cause is Ink's cursor-repositioning escape sequences, not regular PTY output, so terminal-side config can't help.

This is a duplicate of #33814 (the canonical issue with 27+ comments). Adding my +1 there as well. Linking so this doesn't get auto-closed without a trail — the Ghostty-specific detail about why terminal config doesn't work is useful context for the fix.

asgeirtj · 6 months ago
Also hitting this on Ghostty (macOS). Can confirm scroll-to-bottom = no-output, no-keystroke has zero effect — the root cause is Ink's cursor-repositioning escape sequences, not regular PTY output, so terminal-side config can't help. This is a duplicate of #33814 (the canonical issue with 27+ comments). Adding my +1 there as well. Linking so this doesn't get auto-closed without a trail — the Ghostty-specific detail about _why_ terminal config doesn't work is useful context for the fix.
  1. #33814 Is actually opposite problem - Forces scroll to top. This is forces scroll to bottom.
  2. Can confirm this is resolved in v2.1.83. Three separate fixes landed that address this:
  • Reduced scrollback resets in long sessions from once per turn to once per ~50 messages
  • Fixed scrollback jumping to bottom when collapsed read/search groups finish after scrolling offscreen
  • Fixed scrollback jumping when the model starts or stops thinking

Tested on macOS Tahoe, M4 Pro, Ghostty — no more viewport being yanked to the bottom during streaming or TUI redraws. You can actually scroll up and read now.

github-actions[bot] · 6 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.