[BUG] Agent View (via double-click left arrow) Esc exit causes CLI hang and terminal misalignment
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 running Claude Code in Windows 11 CMD, after entering the CLI via the claude command, double-clicking the left arrow key to open the Agent View and then pressing Esc causes Claude to hang for several seconds on the normal transcript before exiting entirely. Additionally, CMD exhibits terminal rendering/display misalignment artifacts after this sequence. However, launching directly into Agent View via claude agents and then exiting does not reproduce the display misalignment issue.
<img width="1722" height="153" alt="Image" src="https://github.com/user-attachments/assets/e569816d-16b6-4705-88e6-01084102a38a" />
What Should Happen?
Pressing Esc in Agent View launched by claude should dismiss the view and return to the normal chat interface without exiting Claude Code or causing any terminal rendering corruption.
<img width="1713" height="96" alt="Image" src="https://github.com/user-attachments/assets/6f61fcc9-14cc-4091-b303-b2bfafc7e2ca" />
Error Messages/Logs
Steps to Reproduce
- Open CMD on Windows 11
- Run
claudeto enter interactive CLI - Double-click left arrow key to navigate into Agent View
- Press
Escto exit Agent View - Observe: Claude hangs on the chat interface for several seconds, then exits completely
- Observe: CMD displays terminal misalignment/rendering artifacts after exit
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.161 (Claude Code)
Platform
Other
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
- The display misalignment only occurs when entering Agent View from the standard
claudecommand flow, not fromclaude agentsdirectly - Suspected root cause may be incomplete terminal state restoration (e.g., cursor position, alternate screen buffer) when transitioning between views via the
claudeentry point
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗