Scroll position resets to top when switching windows during plan mode dialog

Resolved 💬 3 comments Opened Jan 17, 2026 by mhafeezhq-dot Closed Jan 20, 2026

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 in plan mode with a dialog open (e.g., the plan approval dialog), if you scroll up to read previous content and then switch to another window (Alt+Tab), the scroll position resets to the top of the terminal when you return.

This loses your place in the conversation and requires re-scrolling to find where you were.

What Should Happen?

The scroll position should be preserved when switching windows. The terminal should return to the same scroll position when the window regains focus.

Error Messages/Logs

Steps to Reproduce

  1. Start Claude Code and enter plan mode (or trigger a dialog that keeps the input area active)
  2. Have enough conversation history that scrolling is required
  3. Scroll up to read previous content
  4. Switch to another window (Alt+Tab or click another window)
  5. Switch back to the Claude Code terminal
  6. Observe: scroll position has jumped to the top instead of staying where you scrolled to

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.11

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

This may be related to how the Ink TUI handles focus events when the terminal window loses and regains focus. The issue seems more pronounced when a dialog/modal is active (like the plan approval buttons).

Tested with PowerShell 7.5.4 in Windows Terminal with shell integration enabled.

Note: I experimented with disabling useAcrylic in the terminal's unfocused appearance settings, but this did not resolve the issue.

View original on GitHub ↗

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