Repository navigation
Description
- I searched existing issues and this is not a duplicate (checked issues mentioning
CLAUDE_PLUGIN_ROOT,run-hook.cmdand "SessionStart hook fails" — related reports are all closed as fixed, and none describe backslashes appearing inCLAUDE_PLUGIN_ROOTwhile running under WSL2/Linux, so this looks like a regression rather than a straight duplicate.)
Environment (required)
| Field | Value |
|---|---|
| Superpowers version | 6.2.0 |
| Harness (Claude Code, Cursor, etc.) | GitHub Copilot (VS Code) — plugin hooks loaded from ~/.copilot/installed-plugins/superpowers-marketplace/superpowers |
| Harness version | Visual Studio Code 1.131 |
| Your model + version | Sonnet 5 |
| All plugins installed | superpowers-marketplace/superpowers |
| OS + shell | WSL 2 under windows 11. Linux (remote/VS Code Server, /home/manu/.vscode-server), /bin/sh |
Is this a Superpowers issue or a platform issue?
- I confirmed this issue does not occur without Superpowers installed
(likely a harness bug in how GitHub Copilot Chat substitutesCLAUDE_PLUGIN_ROOTfor hook commands — filing here first since it breaks Superpowers' SessionStart hook specifically, andrun-hook.cmd's own path-handling can't work around it, see analysis below)
What happened?
On session start, the SessionStart hook fails with not found because the CLAUDE_PLUGIN_ROOT environment variable substituted into the hook command uses Windows-style backslash path separators, even though the hook is executed on Linux via /bin/sh.
The configured command in hooks/hooks.json is:
"\"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd\" session-start"
After substitution it became:
"\home\manu\.copilot\installed-plugins\superpowers-marketplace\superpowers/hooks/run-hook.cmd" session-start
Since /bin/sh treats backslashes as literal characters (not path separators) on Linux, this does not resolve to the actual file /home/manu/.copilot/installed-plugins/superpowers-marketplace/superpowers/hooks/run-hook.cmd, and the shell reports the whole string as a nonexistent command.
Steps to reproduce
- Install the Superpowers plugin in Copilot CLI on a Windows/WSL2. Start VSCode
- Start/resume a Copilot Chat session in that workspace (triggers
SessionStart). - Observe the debug log for the
SessionStarthook execution.
Expected behavior
CLAUDE_PLUGIN_ROOT should be a valid POSIX path (forward slashes) when the hook is executed on a Linux/POSIX shell, so run-hook.cmd resolves and runs correctly.
Actual behavior
CLAUDE_PLUGIN_ROOT is substituted with backslash separators, producing an unresolvable path and this error:
/bin/sh: 1: \home\manu\.copilot\installed-plugins\superpowers-marketplace\superpowers/hooks/run-hook.cmd: not found
The SessionStart hook silently fails to inject its context as a result.
Debug log or conversation transcript
2026-08-05 09:21:22.229 [info] [#0] [SessionStart] Running: {"command":"\"\\home\\manu\\.copilot\\installed-plugins\\superpowers-marketplace\\superpowers/hooks/run-hook.cmd\" session-start","cwd":{"$mid":1,"fsPath":"/home/manu/git/xxxxx","path":"/home/manu/git/xxxxx","scheme":"file"},"env":{"CLAUDE_PLUGIN_ROOT":"\\home\\manu\\.copilot\\installed-plugins\\superpowers-marketplace\\superpowers"}}
2026-08-05 09:21:22.229 [info] [#0] [SessionStart] Output: /bin/sh: 1: \home\manu\.copilot\installed-plugins\superpowers-marketplace\superpowers/hooks/run-hook.cmd: not found
Note: cwd.fsPath/cwd.path in the same log entry correctly use forward slashes (/home/manu/git/xxxxx), while CLAUDE_PLUGIN_ROOT alone uses backslashes — suggesting the plugin root path is computed on a different code path/OS context (client side?) than cwd.
Activity
fix: shell-based hooks with WSL CLAUDE_PLUGIN_ROOT backslash fix and …
arittr commentedon Aug 17, 2026
Thanks — confirmed the shape of this: the hook receives a backslashed
CLAUDE_PLUGIN_ROOTand the path lookup fails before anything runs. Fix queued on our side; we'll also report the substitution behavior upstream so it gets fixed at the source.obra commentedon Oct 22, 2026
Hi @emmaanuel, I'm Claude, an AI agent (Claude Opus 5.5, running in Claude Code 2.1.308), posting from Jesse (@obra)'s account at his direction. Jesse reviewed the finding below and asked me to close this.
Thanks for the detailed log. It made this easy to pin down. The backslashed path comes from VS Code itself, before Superpowers runs anything. VS Code computes
CLAUDE_PLUGIN_ROOTon the Windows side (URI.fsPath, which uses Windows separators) and then hands that path to/bin/shinside WSL. We rebuilt that exact command from VS Code's path code and got the same\home\...\run-hook.cmd: not found. Copilot CLI on Linux runs the same hook without trouble. Nothing in ourhooks.jsonorrun-hook.cmdcan fix this, because the wrong path is already in both the command and the environment when the shell starts. The fix mentioned earlier in this thread didn't land, and we haven't found a safe change on our side that would help.The upstream bug is tracked at microsoft/vscode#337374. An earlier report, microsoft/vscode#313201, was closed as a duplicate of it. Adding your log and VS Code version there is the best way to get it fixed. I'm closing this here as an upstream issue. If it still happens once VS Code ships a fix, please reopen and we'll take another look.
If any of the evidence above is wrong, reply here. Jesse reads these, and decisions can be revisited.
— Claude Opus 5.5, Claude Code 2.1.308, session https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba