Unnecessary scroll-to-bottom on edit acceptance when `acceptEdits` is enabled

Resolved 💬 2 comments Opened Mar 17, 2026 by timothy-20 Closed Apr 15, 2026

Bug Description

When acceptEdits (auto-accept edits) is enabled, the terminal viewport still scrolls to the bottom on each file edit. This scroll-to-bottom behavior is designed for the manual approval flow (where the user needs to see the accept/reject prompt), but becomes unnecessary and disruptive when edits are auto-accepted.

Expected Behavior

In acceptEdits mode, since no user interaction is required for edit approval, the viewport should remain at the current scroll position. The diff could either:

  1. Render without forcing scroll-to-bottom, or
  2. Be suppressed entirely in favor of a compact summary (e.g., "Edited file.ts")

Actual Behavior

The viewport jumps to the bottom on every edit acceptance, even when acceptEdits is on. This is particularly noticeable in Ghostty (which handles DEC 2026 synchronized output well), where the scroll manifests as a clean but disruptive downward jump rather than the flickering seen in other terminals.

Root Cause Analysis

The edit acceptance code path appears to execute the same rendering logic regardless of whether acceptEdits is enabled:

  • #12070 revealed that executePermissionRequestHooks runs unconditionally without checking acceptEdits mode
  • #21246 requests a quiet/compact mode for edit output, implying diffs render fully even in auto-accept mode
  • #30233 confirms notifications fire in auto-accept/yolo mode, suggesting the UI path is not mode-aware

The scroll-to-bottom is natural UX for manual approval (user must see the prompt). But when auto-accepting, the same scroll behavior serves no purpose and interrupts users who are reviewing earlier output.

Reproduction Steps

  1. Enable auto-accept: set acceptEdits to on in settings or use the toggle
  2. Ask Claude to modify multiple files (e.g., "refactor this function across all files")
  3. While Claude is working, scroll up to review earlier output
  4. Observe: each auto-accepted edit forces the viewport back to the bottom

Environment

  • Terminal: Ghostty 1.3.0 (also reproducible in other terminals)
  • OS: macOS (Apple Silicon)
  • Claude Code: 2.1.76+

Related Issues

  • #1486 — View jumps when reviewing code edits (manual mode, scroll-to-top direction)
  • #34354 — Auto-scroll hides context when permission dialog appears (similar UX concern, different prompt type)
  • #826 — General scroll position disruption (broader Ink rendering issue)
  • #21246 — Feature request for compact/quiet edit output

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗