SessionStart hooks freeze the UI on Windows
Description
Any SessionStart hook configured in settings.local.json completely freezes Claude Code on Windows. The cursor becomes unresponsive and no input is accepted. This happens regardless of the hook command — even a trivial echo {} causes the freeze.
Steps to Reproduce
- On Windows (tested via Git Bash / MINGW64), add any SessionStart hook to
.claude/settings.local.json:
{
"hooks": {
"SessionStart": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "echo {}"
}
]
}
]
}
}
- Open Claude Code (
claude) in the project directory. - The UI renders but the cursor is stuck — no keystrokes are accepted.
Expected Behavior
SessionStart hooks should execute and return without blocking user input, same as other hook types (PreToolUse, PostToolUse, Notification, PreCompact) which all work correctly.
Actual Behavior
The UI freezes completely. The only way to recover is to kill the process and remove the SessionStart hooks from the config.
Environment
- OS: Windows 10/11 (Git Bash / MINGW64)
- Shell: bash (via Git for Windows)
- Claude Code version: latest (as of 2026-02-06)
Debugging Done
Systematically isolated the issue by disabling components one at a time:
| Component | Causes freeze? |
|-----------|---------------|
| MCP servers (memory, taskflow) | No |
| PreToolUse hooks | No |
| PostToolUse hooks | No |
| Notification hooks | No |
| PreCompact hooks | No |
| SessionStart with Python script | Yes |
| SessionStart with echo {} | Yes |
| SessionStart with empty array [] | No (works) |
Workaround
Set "SessionStart": [] (empty array) in settings.local.json. All other hook types work fine on Windows.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗