fresh install on windows, not working , Hooks Not Running
SessionStart hooks are not executing automatically when starting a new Claude session on Windows, despite being correctly configured in settings.json.
Also, docs/QUICKSTART.md file doesnt exist !
Expected Behavior
When running claude to start a new session, the SessionStart hooks should execute automatically, specifically:
- load-core-context.ts should run
- CORE skill context should be injected via system-reminder
- User should see behavioral changes (response format, personality settings)
Actual Behavior
- Starting a new Claude session shows no indication that hooks ran
- CORE context is not loaded automatically
- No visible or behavioral changes
Root Cause
Two issues with Windows hook configuration:
Issue 1: Unix-style path format
The setup script generated Unix-style paths that don't work on Windows: "command": "/c/Users/username/.claude/Hooks/load-core-context.ts"
This is Git Bash / WSL path notation (/c/...).
Issue 2: Missing interpreter on Windows
TypeScript files can't execute directly on Windows. The shebang #!/usr/bin/env bun only works on Unix systems.
Hook commands generated by setup: "command": "/c/Users/username/.claude/Hooks/load-core-context.ts"
Manual workaround that works: "command": "bun C:/Users/username/.claude/Hooks/load-core-context.ts"
Evidence
- Hook Works When Run Manually
PS C:\Users\username.claude\Hooks> bun run load-core-context.ts ✅ Read 10381 characters from CORE SKILL.md ✅ CORE context injected into session
- Generated settings.json Configuration
{ "hooks": { "SessionStart": [ { "hooks": [ { "type": "command", "command": "/c/Users/username/.claude/Hooks/load-core-context.ts" } ] } ] } }
- All Hooks Affected
All hook paths generated by setup wizard use the same Unix-style format:
- /c/Users/username/.claude/Hooks/load-core-context.ts
- /c/Users/username/.claude/Hooks/initialize-session.ts
- /c/Users/username/.claude/Hooks/capture-all-events.ts
- etc.
Steps to Reproduce
- Install PAI on Windows via bootstrap script
- Check .claude/settings.json
- Observe Unix-style paths (/c/...) in hook commands
- Run claude to start new session
- Observe: hooks don't execute
Additional Context
Hook Script Header
#!/usr/bin/env bun
import { readFileSync, existsSync } from 'fs'; import { join } from 'path'; import { PAI_DIR, SKILLS_DIR } from './lib/pai-paths';
Questions
- Does Claude Code respect shebangs on Windows?
- Should hooks be invoked as bun run
- Are there any logs showing hook execution failures?
- Should the setup script detect Windows and use proper path format?
Thank you!