superpowers
superpowers copied to clipboard
SessionStart hook fails on Windows: bash cannot resolve path to session-start.sh
Bug Description
The SessionStart hook fails on Windows with the error:
/bin/bash: C:/Users/<user>/.claude/plugins/cache/claude-plugins-official/superpowers/4.1.1/hooks/session-start.sh: No such file or directory
This occurs on every session start, resume, clear, and compact event.
Environment
- OS: Windows 11
- Claude Code version: 2.1.32
- Superpowers version: 4.1.1
- Shell: Git Bash (
C:\Program Files\Git\bin\bash.exe)
Root Cause
In hooks.json, the hook command is set to the bare path of session-start.sh:
"command": "C:/Users/<user>/.claude/plugins/cache/claude-plugins-official/superpowers/4.1.1/hooks/session-start.sh"
Claude Code 2.1.x auto-detects .sh files and prepends bash on Windows. However, the resulting invocation fails because /bin/bash (Git Bash) cannot resolve the C:/... forward-slash Windows path in this context.
The file does exist on disk — it's purely a path resolution issue at execution time.
Relevant Debug Log
2026-02-06T00:32:27.743Z [DEBUG] Hook SessionStart:resume (SessionStart) error:
/bin/bash: C:/Users/<user>/.claude/plugins/cache/claude-plugins-official/superpowers/4.1.1/hooks/session-start.sh: No such file or directory
Notes
- The deprecated
run-hook.cmdpolyglot wrapper in the hooks directory documents the Claude Code 2.1.x behavior change that caused this. - A local workaround is to edit the cached
hooks.jsonto explicitly callbashwith a properly escaped Windows path, but this gets overwritten on plugin updates.
🤖 Generated with Claude Code
Closing as duplicate of #420 — same root cause (Claude Code path handling on Windows).