Preflight Checklist
What's Wrong?
On Windows, plugin hooks using ${CLAUDE_PLUGIN_ROOT} fail because backslashes are stripped from the path during variable substitution.
What Should Happen?
The ${CLAUDE_PLUGIN_ROOT} variable should be properly escaped or converted to Unix-style paths (/c/Users/...) before being passed to bash on Windows.
Error Messages/Logs
Hook SessionStart:startup (SessionStart) error: /bin/bash: C:UsersCyril.claudepluginscacheclaude-plugins-officialsuperpowers4.1.1/hooks/session-start.sh: No
such file or directory
Steps to Reproduce
- Windows 11, Claude Code 2.1.31
- Install superpowers plugin:
/plugin install superpowers@claude-plugins-official
- Start a new Claude Code session
- Observe "SessionStart:startup hook error" message
- Check debug log in ~/.claude/debug/.txt
for the mangled path
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.31
Platform
Other
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Workaround: Using a hardcoded Unix-style path
(/c/Users/Cyril/...) instead of
${CLAUDE_PLUGIN_ROOT} works correctly.
The issue appears to be in how Claude Code substitutes
the variable before passing to bash - Windows
backslashes aren't escaped or converted.
Plugin affected: superpowers
(https://github.com/obra/superpowers)
Preflight Checklist
What's Wrong?
On Windows, plugin hooks using
${CLAUDE_PLUGIN_ROOT}fail because backslashes are stripped from the path during variable substitution.What Should Happen?
The ${CLAUDE_PLUGIN_ROOT} variable should be properly escaped or converted to Unix-style paths (/c/Users/...) before being passed to bash on Windows.
Error Messages/Logs
Steps to Reproduce
/plugin install superpowers@claude-plugins-officialfor the mangled path
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.31
Platform
Other
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Workaround: Using a hardcoded Unix-style path
(
/c/Users/Cyril/...) instead of${CLAUDE_PLUGIN_ROOT}works correctly.The issue appears to be in how Claude Code substitutes
the variable before passing to bash - Windows
backslashes aren't escaped or converted.
Plugin affected: superpowers
(https://github.com/obra/superpowers)