SessionStart hook fails on Windows: CLAUDE_PLUGIN_ROOT path separators stripped

Resolved 💬 3 comments Opened Feb 14, 2026 by muto0124 Closed Feb 17, 2026

Bug Description

On Windows, SessionStart hooks fail because ${CLAUDE_PLUGIN_ROOT} path loses backslashes and colons when passed to bash, resulting in an invalid path.

Environment

  • OS: Windows 11 Home 10.0.26200
  • Shell: Git Bash
  • Claude Code: Latest (CLI)
  • Plugin: superpowers 4.3.0 (also affects learning-output-style, explanatory-output-style)

Error

From debug log (~/.claude/debug/*.txt):

Hook SessionStart:clear (SessionStart) error:
/bin/bash: C:Usersyohei.claudepluginscacheclaude-plugins-officialsuperpowers4.3.0/hooks/session-start.sh: No such file or directory

Expected Behavior

${CLAUDE_PLUGIN_ROOT} should resolve to a valid path like:

C:/Users/yohei/.claude/plugins/cache/claude-plugins-official/superpowers/4.3.0/hooks/session-start.sh

Actual Behavior

Path separators (\) and colon (:) are stripped, producing:

C:Usersyohei.claudepluginscacheclaude-plugins-officialsuperpowers4.3.0/hooks/session-start.sh

Reproduction

  1. Install Claude Code CLI on Windows with Git Bash
  2. Enable a plugin with SessionStart hooks (e.g., superpowers)
  3. Start or resume a session
  4. Observe "SessionStart:resume hook error" message
  5. Check ~/.claude/debug/*.txt for the full error

Notes

  • Running the hook script manually with a correctly set CLAUDE_PLUGIN_ROOT works fine
  • The hook error appears on every session start/resume/clear but does not block functionality
  • The issue is in how Claude Code expands ${CLAUDE_PLUGIN_ROOT} before passing the command to /bin/bash on Windows

View original on GitHub ↗

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