[BUG] CRITICAL BUG: Claude Code keyboard input blocked after crash - Windows 11 24H2

Resolved 💬 12 comments Opened Aug 29, 2025 by NestorEdgardo Closed Jan 17, 2026

Bug Report: Claude Code - Critical Keyboard Input Blocking After System Events

Priority: CRITICAL
Status: REPRODUCIBLE
Impact: Complete application unusability
Date: August 29, 2025
Reporter: ing.nestorgil@gmail.com

Executive Summary

Claude Code suffers from a critical bug where keyboard input becomes completely blocked after certain system events. The issue persists across restarts and standard reinstallations, requiring specialized recovery procedures. This represents a complete loss of functionality for affected users.

Environment Details

  • OS: Windows 11 Home 24H2
  • Claude Code Version: 1.0.96
  • Node.js Version: v24.4.1
  • NPM Version: 11.4.2
  • Terminal: Windows CMD and VS Code integrated terminal

Problem Description

Initial Trigger

The bug manifests when Claude Code crashes or freezes during complex operations (specifically observed during Nuxt.js with PostgreSQL integration development work).

Symptoms

After the initial crash/freeze:

  1. claude command launches normally
  2. Welcome message displays correctly
  3. Complete keyboard unresponsiveness - no input is accepted
  4. Application appears functional but input interface is completely non-functional
  5. No error messages are displayed

Persistence Characteristics

  • Survives complete system restarts
  • Survives standard npm uninstall/reinstall cycles
  • Affects all terminal types (CMD, PowerShell, VS Code integrated terminal)
  • Other applications and npm packages work normally

Root Cause Analysis

Through extensive debugging, the issue was traced to corrupted .cmd files generated by npm during the installation process:

Corrupted File Content

@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
  SET "_prog=%dp0%\node.exe"
) ELSE (
  SET "_prog=node"
  SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\node_modules\@anthropic-ai\claude-code\cli.js" %*

The critical issue: Line endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% contains an invalid goto #_undefined_# statement that causes the script to fail silently, preventing proper input handling.

Reproduction Steps

  1. Install Claude Code in the specified environment
  2. Work on complex projects (triggers observed during intensive development sessions)
  3. Experience a crash or freeze during operation
  4. Restart Claude Code - input will be completely blocked
  5. Standard reinstallation will NOT resolve the issue

Failed Solutions Attempted

  • Complete system restart
  • Standard npm uninstall/reinstall
  • Cache cleaning with npm cache clean --force
  • Process killing (taskkill /F /IM node.exe)
  • Different terminal environments
  • Directory changes

Working Solution

Only this complete cleanup resolves the issue:

# 1. Force uninstall
npm uninstall -g @anthropic-ai/claude-code --force

# 2. Manual removal of corrupted files
del "C:\Users\[USERNAME]\AppData\Roaming\npm\claude"
del "C:\Users\[USERNAME]\AppData\Roaming\npm\claude.cmd"

# 3. Deep cache cleaning
rd /s /q "%APPDATA%\npm\node_modules\@anthropic-ai" 2>nul
rd /s /q "%APPDATA%\npm-cache" 2>nul
npm cache clean --force

# 4. Reinstall
npm install -g @anthropic-ai/claude-code

# 5. Manual correction of .cmd file (if still corrupted)
# Replace corrupted content with proper batch script

Secondary Issue Discovery

Even after successful recovery, the application exhibits intermittent hanging behavior:

  • Starts correctly and shows welcome message
  • Accepts initial input
  • Randomly becomes unresponsive during operation
  • Does not respond to Esc, Ctrl+C, or any keyboard input
  • Requires force-closing the terminal window

System-Specific Factors

This bug appears to be related to:

  1. Windows 11 24H2 - potentially newer Windows version incompatibility
  2. Node.js v24.4.1 - very recent Node.js version, possible compatibility issues
  3. npm's .cmd file generation - systematic corruption in file creation process

Impact Assessment

  • Productivity Loss: Complete inability to use Claude Code until specialized recovery
  • Data Risk: Potential work loss if crashes occur during important sessions
  • User Confidence: Fear of recurring crashes affects usage patterns
  • Support Burden: Complex recovery process requires technical expertise

Recommendations for Development Team

Immediate Actions

  1. Investigate .cmd file generation - Why does npm create corrupted wrapper scripts?
  2. Add integrity checks - Detect and auto-repair corrupted installation files
  3. Improve crash recovery - Better handling during complex operations
  4. Version compatibility testing - Test with Node.js v24.x and Windows 11 24H2

Long-term Improvements

  1. Self-diagnostic tools - Allow users to detect/fix corrupted installations
  2. Alternative installation methods - Reduce dependency on npm's .cmd generation
  3. Enhanced error handling - Prevent silent failures in wrapper scripts
  4. Documentation updates - Include this recovery procedure in troubleshooting guides

Workaround for Affected Users

Until this is resolved, affected users should:

  1. Use Claude via VS Code extension
  2. Use claude.ai web interface
  3. Consider downgrading Node.js to LTS version (20.x)
  4. Keep the manual recovery script available for emergencies

Technical Evidence

Corrupted .cmd File Location

C:\Users\[USERNAME]\AppData\Roaming\npm\claude.cmd

Process Verification Commands

tasklist | findstr node
tasklist | findstr claude
where claude

Installation Verification

npm ls -g @anthropic-ai/claude-code
claude --version

Contact Information

Reporter: ing.nestorgil@gmail.com
Environment: Production development setup
Availability: Available for additional testing/debugging as needed

---

Note: This bug represents a critical failure mode that makes Claude Code completely unusable in affected configurations. The combination of Windows 11 24H2 + Node.js 24.4.1 appears to be a particularly problematic environment that warrants immediate investigation.

View original on GitHub ↗

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