[BUG] Input focus lost to PowerShell shell - interactive menu unresponsive (Windows)

Resolved 💬 4 comments Opened Jan 27, 2026 by ThatDragonOverThere Closed Mar 1, 2026

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

  1. Run Claude Code in PowerShell
  2. Execute a task that runs gh commands (e.g., gh issue comment)
  3. Task completes successfully, Claude Code shows result
  4. Claude Code displays its prompt (❯) as if ready for input
  5. 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:

  1. After long-running task completion
  2. After quick gh issue comment task

Possibly Related

  • #10278 (closed) - Number keys not working in approval dialogs
  • #12234 (open) - Freezes intermittently on Windows Terminal

This may be a focus/stdin management issue when returning from subprocess execution.

View original on GitHub ↗

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