Skip to content

Windows native Claude Code opens app picker for .sh hook scripts #56

@0okay

Description

@0okay

Problem

On Claude Code native Windows, the Warp plugin hook commands execute shell scripts directly, for example:

"command": "${CLAUDE_PLUGIN_ROOT}/scripts/on-post-tool-use.sh"

When a PostToolUse hook fires, Windows treats the .sh path as a file to open instead of executing it with Bash. This repeatedly opens the Windows app picker dialog asking which application should open .sh files.

Reproduction

  1. Install/use the Warp Claude Code plugin on Windows native Claude Code.
  2. Trigger a tool call so PostToolUse runs.
  3. Windows opens the app picker dialog for the .sh file.

Expected behavior

Hook scripts should be invoked through Bash on Windows, so they run silently and do not trigger the app picker.

Proposed fix

Wrap the hook script commands with bash, for example:

"command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/on-post-tool-use.sh\""

I opened a PR with this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions