Bug
The SessionStart hook (run-hook.cmd) fails on Windows when the user's home directory path contains spaces (e.g., C:\Users\Artur Paprocki\).
Error
SessionStart:clear hook error
Failed with non-blocking status code: bash: /c/Users/Artur: No such file or directory
Root Cause
In hooks/hooks.json, the command is:
"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd\" session-start"
When Claude Code expands ${CLAUDE_PLUGIN_ROOT} and passes the result to bash, the quoting is lost and bash word-splits the path on the space, trying to execute /c/Users/Artur as a command.
Environment
- OS: Windows 11
- Claude Code: v2.1.101
- Superpowers: v5.0.7
- Username:
Artur Paprocki (space in name)
Suggested Fix
Either:
- Bypass the
.cmd polyglot and invoke bash directly: bash "${CLAUDE_PLUGIN_ROOT}/hooks/session-start"
- Or ensure proper quoting survives Claude Code's variable expansion on Windows
Workaround
Manually edit the cached hooks.json to use bash "${CLAUDE_PLUGIN_ROOT}/hooks/session-start" instead of the run-hook.cmd wrapper.
Bug
The
SessionStarthook (run-hook.cmd) fails on Windows when the user's home directory path contains spaces (e.g.,C:\Users\Artur Paprocki\).Error
Root Cause
In
hooks/hooks.json, the command is:When Claude Code expands
${CLAUDE_PLUGIN_ROOT}and passes the result to bash, the quoting is lost and bash word-splits the path on the space, trying to execute/c/Users/Arturas a command.Environment
Artur Paprocki(space in name)Suggested Fix
Either:
.cmdpolyglot and invoke bash directly:bash "${CLAUDE_PLUGIN_ROOT}/hooks/session-start"Workaround
Manually edit the cached
hooks.jsonto usebash "${CLAUDE_PLUGIN_ROOT}/hooks/session-start"instead of therun-hook.cmdwrapper.