Repository navigation
Conversation
Owner
|
Hi! Thanks so much for contributing. Switching to that explicit bash call there is a no-go. run-hook.cmd is doing a bunch of heavy lifting to make Claude work correctly in Windows cmd.exe, powershell and WSL. I 100% believe that #1142 is a real issue, but we can't fix it like this. |
4 of 5 tasks
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1142
What problem are you trying to solve?
On Windows systems where the user profile path contains spaces (for example
C:\Users\Artur Sebesta\...), the SessionStart hook fails to execute.The issue report shows the command path being split at the space and Bash trying to execute a truncated path (for example
/c/Users/Artur), so Superpowers bootstrap context is not injected at session start.This is a real startup failure, not a theoretical concern: users with spaced Windows paths cannot reliably run SessionStart.
What does this PR change?
This PR updates one command in
hooks/hooks.jsonfor theSessionStarthook:"\"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd\" session-start""bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start\""No other files or behavior are changed.
Is this change appropriate for the core library?
Yes. This is core hook infrastructure used by all Superpowers users on affected harness/platform combinations.
It is not project-specific, team-specific, or tied to a third-party integration.
It improves baseline plugin startup reliability in core.
What alternatives did you consider?
run-hook.cmdand try different escaping inhooks.json.This still depends on command/argument parsing behavior across Windows execution chains and is more brittle.
This adds complexity for a one-line command-entry issue.
bash "${CLAUDE_PLUGIN_ROOT}/hooks/session-start"directly.This removes the extra wrapper+arg split at the hook entrypoint and keeps the fix minimal.
Does this PR contain multiple unrelated changes?
No. This PR contains a single, focused fix for SessionStart command invocation under spaced Windows paths.
Existing PRs
Environment tested
Evaluation
“查看这个 issue:SessionStart hook fails on Windows when username contains spaces #1142 SessionStart hook fails on Windows when username contains spaces … 复现并修复这个 issue”
.../Users/Artur ...style truncation from issue report).bashexecutable + quoted script path argument), which avoids the spaced-path executable truncation mode.Rigor
superpowers:writing-skillsandcompleted adversarial pressure testing (paste results below)
rationalizations, "human partner" language) without extensive evals
showing the change is an improvement
This is not a skill-content change; it is a hook command invocation fix in
hooks/hooks.json.Human review