Fix: Superpowers .sh hook opening in editor on Windows (Cursor)
Problem: When opening a new agent session in Cursor on Windows, the session-start bash script opens in the editor instead of executing silently. This happens because Cursor tries to run the hook file directly, and Windows doesn’t know how to execute a bash script (or extensionless file containing a bash shebang).
Root cause: The Superpowers plugin ships a hooks-cursor.json pointing to ./hooks/session-start — an extensionless bash script. On Windows, Cursor cannot execute this natively.
Fix: Create a thin PowerShell wrapper that Cursor can execute natively, then point hooks-cursor.json to it.
Step 1 — Find your plugin version folder
Open this path in Explorer and note the hash folder name:
C:\Users\YOUR_USERNAME\.cursor\plugins\cache\cursor-public\superpowers\
There may be multiple hash folders. Check which one Cursor is actually using by looking at Cursor Settings → Hooks — the path shown there tells you the active version.
Step 2 — Create session-start.ps1
Inside the hooks\ subfolder of the active version, create a file named session-start.ps1 with this content (replace the hash with your actual folder name):
& ‘C:\Program Files\Git\bin\bash.exe’ ‘C:/Users/YOUR_USERNAME/.cursor/plugins/cache/cursor-public/superpowers/YOUR_HASH/hooks/session-start’
Verify Git Bash is installed at that path, or adjust accordingly. You can find your bash path with:
where.exe bash
Step 3 — Update hooks-cursor.json
In the same hooks\ folder, open hooks-cursor.json and change:
“command”: “./hooks/session-start”
to:
“command”: “./hooks/session-start.ps1”
Step 4 — Verify it works
From PowerShell, run:
Set-Location “C:\Users\YOUR_USERNAME\.cursor\plugins\cache\cursor-public\superpowers\YOUR_HASH”
& “./hooks/session-start.ps1”
You should see a JSON blob with additional_context containing the Superpowers skill instructions.
Step 5 — Restart Cursor
Fully close and reopen Cursor. The hook will now execute silently via PowerShell.
Notes:
-
This does not affect Claude Code — only
hooks-cursor.json(Cursor-specific) is modified, nothooks.json(Claude Code format) -
The original
session-startbash script is untouched; the.ps1file is just a thin Windows wrapper that calls it -
If the Superpowers plugin updates, the plugin may create a new hash folder — you’ll need to reapply this fix to the new folder
-
Tested on Windows 11 with Cursor 2.6.x and Git for Windows