0
Fork 0
mirror of https://github.com/obra/superpowers.git synced 2026-09-25 22:09:05 +00:00

SessionStart hook fails on Windows due to mixed path separators #418

Closed
opened 2026-02-04 21:01:21 +00:00 by mendozagit · 0 comments
mendozagit commented 2026-02-04 21:01:21 +00:00 (Migrated from github.com)

Describe the bug
On Windows, the SessionStart hook fails with a "No such file or directory" error on every session start. The hook
eventually succeeds on retry, but displays an error message to the user each time Claude Code starts.

To Reproduce
Steps to reproduce the behavior:

  1. Install Claude Code on Windows
  2. Enable the superpowers plugin
  3. Start a new Claude Code session
  4. Observe "SessionStart:startup hook error" message in the welcome screen

Expected behavior
The session should start without displaying any hook errors.

Logs
2026-02-04T20:48:03.107Z [DEBUG] Hook SessionStart:startup (SessionStart) error:
/bin/bash: C:\Users\JesusMendoza.claude\plugins\cache\superpowers-marketplace\superpowers\4.0.3/hooks/run-hook.cmd:
No such file or directory

Additional context
The issue is caused by mixed path separators. The CLAUDE_PLUGIN_ROOT environment variable contains Windows-style
backslashes (C:\Users...), but the hook command in hooks/hooks.json appends Unix-style forward slashes:

"command": ""${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd" session-start.sh"

This creates a hybrid path like C:\Users...\4.0.3/hooks/run-hook.cmd which bash cannot resolve properly.

  • OS: Windows 11
  • Claude Code: v2.1.31
  • Superpowers: v4.0.3
**Describe the bug** On Windows, the SessionStart hook fails with a "No such file or directory" error on every session start. The hook eventually succeeds on retry, but displays an error message to the user each time Claude Code starts. **To Reproduce** Steps to reproduce the behavior: 1. Install Claude Code on Windows 2. Enable the superpowers plugin 3. Start a new Claude Code session 4. Observe "SessionStart:startup hook error" message in the welcome screen **Expected behavior** The session should start without displaying any hook errors. **Logs** 2026-02-04T20:48:03.107Z [DEBUG] Hook SessionStart:startup (SessionStart) error: /bin/bash: C:\Users\JesusMendoza\.claude\plugins\cache\superpowers-marketplace\superpowers\4.0.3/hooks/run-hook.cmd: No such file or directory **Additional context** The issue is caused by mixed path separators. The CLAUDE_PLUGIN_ROOT environment variable contains Windows-style backslashes (C:\Users\...), but the hook command in hooks/hooks.json appends Unix-style forward slashes: "command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd\" session-start.sh" This creates a hybrid path like C:\Users\...\4.0.3/hooks/run-hook.cmd which bash cannot resolve properly. - OS: Windows 11 - Claude Code: v2.1.31 - Superpowers: v4.0.3
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
skills/obra-superpowers#418
No description provided.