superpowers/docs/windows
Jesse Vincent 0a4d60db4f fix(hooks): add a powershell form of the SessionStart command for Copilot on Windows (#2189)
GitHub Copilot on Windows (Copilot CLI and VS Code Copilot) runs a hook's
command through PowerShell and ignores shell:"bash". PowerShell parses
"<root>/hooks/run-hook.cmd" session-start as a string expression followed
by a bareword, fails with "Unexpected token 'session-start'", and the
using-superpowers bootstrap never reaches the session.

Copilot prefers a hook's powershell key over command when it is present, so
add one that runs the same wrapper with the & call operator. Claude Code
ignores the key and keeps dispatching command through Git Bash.

Verified on Windows 11 in a VM: Copilot CLI 1.0.103 logged the ParserError
and sent no bootstrap before the change, and ran the hook and sent the
bootstrap after it. Claude Code 2.1.308 ran the hook and sent the bootstrap
both before and after.

The new test in test-run-hook-cmd-windows.sh runs the hooks.json powershell
value through powershell.exe against a plugin root with a space in its path.

Co-authored-by: Tugrul Guner <tugrulguner@users.noreply.github.com>
Co-authored-by: Serge ARADJ <orty@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
2026-10-22 20:56:46 +00:00
..
polyglot-hooks.md fix(hooks): add a powershell form of the SessionStart command for Copilot on Windows (#2189) 2026-10-22 20:56:46 +00:00