[BUG] Backslashes stripped from ${CLAUDE_PLUGIN_ROOT} in hook commands

Resolved 💬 3 comments Opened Feb 4, 2026 by cmathew654-dot Closed Feb 8, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

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

  1. Windows 11, Claude Code 2.1.31
  2. Install superpowers plugin: `/plugin install

superpowers@claude-plugins-official`

  1. Start a new Claude Code session
  2. Observe "SessionStart:startup hook error" message
  3. Check debug log in ~/.claude/debug/<session-id>.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)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗