-
Notifications
You must be signed in to change notification settings - Fork 18.5k
[BUG] Input focus lost to PowerShell shell - interactive menu unresponsive (Windows) #21266
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
area:tuibugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsplatform:windowsIssue specifically occurs on WindowsIssue specifically occurs on WindowsstaleIssue is inactiveIssue is inactive
Description
Bug Description
After Claude Code completes a task (especially ones involving gh commands), keyboard input is captured by the underlying PowerShell shell instead of Claude Code's interactive interface.
Environment
- Platform: Windows 11
- Terminal: PowerShell (not Windows Terminal)
- Claude Code: Latest
Steps to Reproduce
- Run Claude Code in PowerShell
- Execute a task that runs
ghcommands (e.g.,gh issue comment) - Task completes successfully, Claude Code shows result
- Claude Code displays its prompt (❯) as if ready for input
- Try to type a new prompt or interact with menu
Expected Behavior
- Keyboard input should go to Claude Code
- Interactive menus (Yes/No confirmations) should respond to keystrokes
- Escape should work for cancellation
Actual Behavior
- Input goes to PowerShell prompt instead of Claude Code
- PowerShell prompt visible:
(env) PS C:\path> - Typing characters appear in PowerShell, not Claude Code
- Menu options (1, 2, arrow keys, Enter, Escape) don't work
- Interface appears frozen but isn't crashed
- Must force-kill terminal to recover
Variations Observed
Variation 1: Menu Confirmation Freeze
Do you want to proceed?
❯ 1. Yes
2. No
Esc to cancel · Tab to add additional instructions
Pressing 1/2/Enter/Escape - nothing happens. Input goes to shell.
Variation 2: Post-Task Input Capture
Task completes with "Done: [link]", shows ❯ prompt, but all keystrokes go to PowerShell.
Frequency
Happened twice in same session:
- After long-running task completion
- After quick
gh issue commenttask
Possibly Related
- [BUG] Keyboard number keys (1, 2, 3) not responding in tool approval dialogs on Windows #10278 (closed) - Number keys not working in approval dialogs
- [Bug] Claude Code freezes intermittently on Windows Terminal #12234 (open) - Freezes intermittently on Windows Terminal
This may be a focus/stdin management issue when returning from subprocess execution.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:tuibugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsplatform:windowsIssue specifically occurs on WindowsIssue specifically occurs on WindowsstaleIssue is inactiveIssue is inactive
Type
Fields
Give feedbackNo fields configured for issues without a type.