SessionStart hooks not firing on Windows (startup or /new)
Resolved 💬 3 comments Opened Mar 21, 2026 by jarkillo Closed Mar 21, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
SessionStart hooks configured in ~/.claude/settings.json do not fire on Windows, neither on initial claude launch nor on /new.
The hook script works perfectly when executed manually from the shell. Other hooks (PreToolUse, PostToolUse, SubagentStop) fire correctly — only SessionStart is affected.
What Should Happen?
The SessionStart hook should fire when:
- Claude Code is launched (
claudein terminal) - A new conversation is started with
/new
Evidence
Hook counter file (axon_hook_counters.json) after a full session shows:
{"counts": {"post_tool_use": 6, "pre_tool_use": 1, "subagent_stop": 1}, "alerted": false}
Note: session_start is completely absent — the hook never ran.
Manual execution of the same script works:
echo '{"cwd":"E:/Proyectos/jarkoterminal"}' | python ~/.claude/hooks/axon/axon_session_start.py
# Returns valid JSON with additionalContext — exit code 0
Hook Configuration
{
"hooks": {
"SessionStart": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "PYTHONUTF8=1 AXON_URL=https://example.com AXON_API_KEY=xxx python \"C:\Users\user\.claude\hooks\axon\axon_session_start.py\""
}
]
}
]
}
}
Environment
- Claude Code version: 2.1.81
- Platform: Windows 11 Pro (10.0.26200)
- Shell: Git Bash
- Python: 3.x (works fine for all other hooks)
Related Issues
- #34431 — SessionStart:resume missing
cwdon Windows - #34072 — SessionStart not firing on /clear
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗