Skip to content

SessionStart hook fails on Windows: bash cannot resolve path to session-start.sh #431

Closed

Description

@puneet1409

Bug Description

The SessionStart hook fails on Windows with the error:

/bin/bash: C:/Users/<user>/.claude/plugins/cache/claude-plugins-official/superpowers/4.1.1/hooks/session-start.sh: No such file or directory

This occurs on every session start, resume, clear, and compact event.

Environment

  • OS: Windows 11
  • Claude Code version: 2.1.32
  • Superpowers version: 4.1.1
  • Shell: Git Bash (C:\Program Files\Git\bin\bash.exe)

Root Cause

In hooks.json, the hook command is set to the bare path of session-start.sh:

"command": "C:/Users/<user>/.claude/plugins/cache/claude-plugins-official/superpowers/4.1.1/hooks/session-start.sh"

Claude Code 2.1.x auto-detects .sh files and prepends bash on Windows. However, the resulting invocation fails because /bin/bash (Git Bash) cannot resolve the C:/... forward-slash Windows path in this context.

The file does exist on disk — it's purely a path resolution issue at execution time.

Relevant Debug Log

2026-02-06T00:32:27.743Z [DEBUG] Hook SessionStart:resume (SessionStart) error:
/bin/bash: C:/Users/<user>/.claude/plugins/cache/claude-plugins-official/superpowers/4.1.1/hooks/session-start.sh: No such file or directory

Notes

  • The deprecated run-hook.cmd polyglot wrapper in the hooks directory documents the Claude Code 2.1.x behavior change that caused this.
  • A local workaround is to edit the cached hooks.json to explicitly call bash with a properly escaped Windows path, but this gets overwritten on plugin updates.

🤖 Generated with Claude Code

Activity

  1. puneet1409 commented on Feb 6, 2026

    @puneet1409
    Author

    Closing as duplicate of #420 — same root cause (Claude Code path handling on Windows).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions