claude-code - 💡(How to fix) Fix [BUG] Agent window focus lost after navigating with arrow keys, causing scroll deadlock

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…

Error Message

Error Messages/Logs

No error messages shown. The bug is purely a focus/input-routing issue in the terminal UI.

Code Example

No error messages shown. The bug is purely a focus/input-routing issue in the terminal UI.
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?

After opening an agent sub-window and pressing the left arrow key (←) to navigate, returning to the main chat view causes the panel to become scroll-locked. Scroll input is incorrectly routed to the chat history inside the dialog instead of the outer viewport.

What Should Happen?

After closing the agent window, focus should return to the main panel and scrolling should work normally on the outer panel.

Error Messages/Logs

No error messages shown. The bug is purely a focus/input-routing issue in the terminal UI.

Steps to Reproduce

  1. Open Claude Code in a terminal
  2. Trigger an agent window (e.g., ask it to accomplish a multi-step task)
  3. While the agent window is active, press the left arrow key (←)
  4. The agent window closes and you return to the main chat
  5. Try to scroll the main panel — scrolling is dead, input goes to inner chat history instead

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

2.1.153

Claude Code Version

2.1.153

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Platform: CLI (npm global install)

Operating System: Windows 10 Pro 10.0.19045

Terminal/Shell: Windows Terminal / PowerShell 7+

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