Hooks cause input freeze on Windows when hook errors or runs

Resolved 💬 4 comments Opened Feb 5, 2026 by yunjeongiya Closed Mar 5, 2026

Description

Hooks that error or run cause Claude Code to completely freeze - no keyboard input is accepted (including Ctrl+C). The UI renders but input is completely blocked.

Environment

  • Claude Code version: 2.1.31
  • OS: Windows 11
  • Shell: Git Bash (also tested with PowerShell and CMD - same issue)
  • Node version: v24.3.0

Steps to Reproduce

  1. Add any hook to ~/.claude/settings.json:
{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "startup",
        "hooks": [
          {
            "type": "command",
            "command": "echo Hello World"
          }
        ]
      }
    ]
  }
}
  1. Run claude in any directory
  2. UI appears with SessionStart:startup hook error message
  3. Input is completely frozen - cannot type, cannot Ctrl+C, must close terminal

Expected Behavior

  • Hook errors should be handled gracefully
  • Input should remain functional even if a hook fails
  • At minimum, Ctrl+C should work to exit

Actual Behavior

  • Any hook (even simple echo commands) causes input freeze
  • The debug log shows successful startup but input never works
  • Only way to exit is closing the terminal window or killing the process

Debug Log

The debug log shows normal startup:

[REPL:mount] REPL mounted, disabled=false

But input never works after hooks run.

Additional Context

  • Hooks worked previously - I had working hooks 2-3 days ago (wrote a blog post about them)
  • Same hooks configuration, same machine
  • Removing all hooks from settings.json immediately fixes the issue
  • Tested with multiple hook types: bash scripts, inline echo, PowerShell commands - all freeze
  • The freeze happens even when the hook output appears successful
  • VS Code extension works fine in the same directory - only terminal is affected

Workaround

Remove all hooks from ~/.claude/settings.json. No known workaround to use hooks on Windows currently.

View original on GitHub ↗

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