[Bug] Windows Terminal Input Stream Loss After Command Execution

Resolved 💬 3 comments Opened Oct 31, 2025 by jc-yap89 Closed Nov 4, 2025

Bug Description
[BUG] Critical: Complete Loss of Terminal Text Input After Specific Operations on WindowsSummaryUsers of the Claude Code CLI experience an intermittent but critical bug where the underlying terminal text input stream is lost or blocked following specific state transitions (e.g., after a slash command completes, or an operation is cancelled with Esc). As a result, the user cannot type or edit any text, while the program's internal shortcut functions remain active.Affected PlatformsThis issue has been reproduced across all major Windows command-line environments:OS: Windows [Please insert your Windows version, e.g., Windows 10/11]Node.js Version: [Please insert your Node.js version, e.g., v20.x.x]Claude Code CLI Version: [Please insert your Claude Code version]Terminal Types (All Affected):Windows Command Prompt (CMD)Windows PowerShellGit BashSteps to ReproducePlease try either of the following methods, as both may trigger the input failure:Method A: After a Slash Command Completes/ClosesLaunch the Claude Code CLI.Input and execute a slash command (e.g., /compact, /doctor, or any other task-executing command).Wait for the command to finish, and the program returns to the main input prompt.Attempt to type any regular text.Method B: After Cancelling a Running Operation with EscLaunch the Claude Code CLI.Input a lengthy prompt, allowing Claude to start running and generating a response.While Claude is running, press the Esc key to cancel the operation.The program stops running and returns to the main input prompt.Attempt to type any regular text.Expected ResultThe program should immediately restore normal terminal text input functionality after the operation completes or is cancelled, allowing the user to type a new query or command.Actual ResultAfter the operation completes or is cancelled, the program exhibits the following behavior:Text Input is Completely Lost: The user cannot type any characters, nor can they perform editing operations like Backspace.Shortcuts/Control Signals Work:The Tab key still correctly toggles "Thinking" mode.Alt+M still correctly switches modes (e.g., Plan/Bash mode).Rapidly pressing Esc three times enters the history recall mode, and the Enter key successfully sends the selected previous conversation content.Failed Recovery Attempts:Pressing Esc (to exit CMD selection mode) is ineffective.Pressing Enter is ineffective.Pressing Ctrl+C is ineffective (cannot interrupt or restore input).Root Cause Analysis (Community Speculation)This behavior suggests a failure in the Node.js I/O implementation on Windows. When transitioning from the "task execution" state back to the "user interaction" state, the program fails to properly reset or remount the terminal's input stream (TTY/Readline) for standard keyboard input. It retains responsiveness to internal control signals (shortcuts) but drops standard character input.Temporary WorkaroundsCurrently, the only effective workaround is:Upon loss of input, the user must immediately close the current terminal window and relaunch the Claude Code CLI in a new window.Thank you for your attention. We hope this critical bug can be resolved quickly to improve the CLI experience for Windows users.

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 2.0.30
  • Feedback ID:

Errors

[]

View original on GitHub ↗

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