Skip to content

SessionStart hook fails on Windows: session-start.sh not found #504

@HYPERLYNQ

Description

@HYPERLYNQ

Problem

On Windows, the session-start.sh hook fails every time Claude Code starts:

Hook SessionStart:startup (SessionStart) error:
/bin/bash: C:/Users/<user>/.claude/plugins/cache/claude-plugins-official/superpowers/4.3.0/hooks/session-start.sh: No such file or directory

Cause

Windows Claude Code uses Git Bash (C:\Program Files\Git\bin\bash.exe) to execute shell hooks. The ${CLAUDE_PLUGIN_ROOT} variable resolves to a Windows-style path (C:/Users/...), which /bin/bash (Git Bash) can't resolve when used as a script path.

The hooks.json uses:

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

Environment

  • Windows 11
  • Claude Code v2.1.45
  • Superpowers v4.3.0
  • Git Bash as the shell executor

Impact

Shows SessionStart:startup hook error on every Claude startup on Windows. Cosmetic but confusing — users may think something is broken.

Possible fix

Either:

  1. Add a session-start.cmd equivalent for Windows
  2. Use run-hook.cmd (which already exists in the hooks directory) as the entry point on Windows
  3. Convert the path to a Git Bash-compatible format (e.g., /c/Users/...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions