Repository navigation
Description
Describe the bug
Superpowers v4.3.1 regressed the Windows hook fix from PR #331. The hooks.json was changed back to use run-hook.cmd
instead of calling session-start.sh directly, causing SessionStart:startup hook error on every Claude Code startup
on Windows. v4.3.0 had the correct fix ("command": "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh"), but v4.3.1 reverted to
"command": "'${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd' session-start". Additionally, v4.3.1 renamed
session-start.sh to session-start (no extension), which breaks Claude Code's auto-detection of .sh files on
Windows.
To Reproduce
- Install superpowers plugin on Windows (Claude Code v2.1.32, Windows 11)
- Start Claude Code (claude or claude --verbose)
- Observe: SessionStart:startup hook error
Expected behavior
Clean startup with no hook error, and the superpowers context injected into the session.
Logs
▐▛███▜▌ Claude Code v2.1.32
▝▜█████▛▘ Opus 4.6 · Claude Max
▘▘ ▝▝ C:\mypart_sc\postman
⎿ SessionStart:startup hook error
Additional context
- Claude Code v2.1.32, Windows 11 (MSYS_NT-10.0-26200)
- Git Bash is first in PATH (C:\Program Files\Git\usr\bin\bash.exe)
- This is the same issue as [Bug] SessionStart:startup hook error #275, which was fixed by PR fix: Windows hook execution for Claude Code 2.1.x #331 but regressed in v4.3.1
- The session-start script itself works fine when called directly via bash
- v4.3.0 hooks/hooks.json: "command": "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh" (correct)
- v4.3.1 hooks/hooks.json: "command": "'${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd' session-start" (broken)
- Attempted applying the same fix from PR fix: Windows hook execution for Claude Code 2.1.x #331 (pointing to session-start.sh) — error persisted on v2.1.32,
suggesting Claude Code may have changed how it handles hook commands since v2.1.x - Workaround: empty the hooks in hooks.json ({"hooks": {}}) — skills still work via the Skill tool, just without
auto-context injection at startup
Activity
thebtf commentedon Feb 25, 2026
Confirmed on Claude Code v2.1.58, Windows 11 Pro.
Root cause analysis:
cmd.exetreats single quotes as literal characters, not string delimiters. So the command:is interpreted as a filename starting with
'C:\..., which doesn't exist → exit 1 / "filename syntax incorrect".Workaround applied (while waiting for upstream fix):
Edit
~/.claude/plugins/cache/claude-plugins-official/superpowers/<version>/hooks/hooks.jsonand remove the single quotes:Note:
run-hook.cmditself works correctly — the issue is solely the wrapping single quotes in the hooks.json command string.The fix from v4.3.0 (
session-start.sh) was cleaner. For Windows compatibility, either approach works as long as single quotes are absent from the cmd.exe command string.jtuskan commentedon Feb 28, 2026
Confirming a fix for this on Windows 11 + Claude Code + Git Bash.
Root cause: Single quotes in hooks.json don't work as quoting characters in CMD.exe. CMD treats them as literal characters, so it tries to execute a file with
'in the filename:Fix: Change single quotes to escaped double quotes in
hooks/hooks.json:The polyglot
run-hook.cmdwrapper and extensionlesssession-startscript both work correctly once the quoting is fixed — the JSON output is produced as expected. This is consistent with the polyglot-hooks.md documentation which shows escaped double quotes in its examples.obra commentedon Mar 11, 2026
Fixed via #585 (merged to dev) — single quotes replaced with escaped double quotes in hooks.json, exactly as @thebtf and @jtuskan diagnosed in the comments here.
Verified the fix on a Windows 11 dev box (NT 10.0.26200.0) with Claude Code 2.1.72: single quotes fail in cmd.exe, escaped double quotes work universally across cmd.exe, Git Bash, and macOS bash (with and without spaces in the path).
— Claude Opus 4.6, Claude Code 2.1.72
Release v5.0.1: Windows/Linux hooks fix, Gemini CLI, spec review loop
Update changelog: add bash 5.3+ fix, link all issues/PRs
Release v5.0.1: Windows/Linux hooks fix, Gemini CLI, spec review loop
Update changelog: add bash 5.3+ fix, link all issues/PRs
Release v5.0.1: Windows/Linux hooks fix, Gemini CLI, spec review loop
Release v5.0.1: Windows/Linux hooks fix, Gemini CLI, spec review loop
Update changelog: add bash 5.3+ fix, link all issues/PRs
Squashed commit of the following:
Squashed commit of the following: