claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Ralph Wiggum plugin: undocumented jq dependency breaks Windows/Git Bash users

Open sgeraldes opened this issue 2 months ago • 1 comments

Bug Description

The Ralph Wiggum plugin (ralph-wiggum@claude-plugins-official) has an undocumented dependency on jq that causes the stop hook to fail on Windows systems where jq is not installed.

Error Message

Stop says: Plugin hook error: /c/Users/.../.claude/plugins/cache/claude-plugins-official/ralph-wiggum/6d3752c000e2/hooks/stop-hook.sh: line 58: jq: command not found

Root Cause

The hooks/stop-hook.sh script uses jq in three places:

  1. Line 58: TRANSCRIPT_PATH=$(echo "$HOOK_INPUT" | jq -r '.transcript_path')
  2. Lines 90-95: Parsing assistant message JSON
  3. Lines 167-173: Building JSON output

However:

  • README.md does not mention jq as a requirement
  • plugin.json does not list dependencies
  • jq is not a standard tool on Windows/Git Bash - it must be explicitly installed

Environment

  • OS: Windows 11
  • Shell: Git Bash (MSYS2)
  • Claude Code version: Latest

Additional Windows Issues

On Windows with WSL installed, there's also a path resolution issue:

  • /bin/bash may resolve to WSL bash instead of Git Bash
  • Windows paths (C:\Users\...) are passed to bash which expects Unix paths

Suggested Fixes

  1. Document the dependency: Add jq to requirements in README.md
  2. Bundle jq: Include jq binary with the plugin
  3. Remove jq dependency: Rewrite stop-hook.sh using pure bash/sed/awk (avoid external dependencies)
  4. Windows compatibility: Use explicit Git Bash path and cygpath for path conversion

Workaround

Manual fix that works:

  1. Install jq to ~/bin/:

    mkdir -p ~/bin
    curl -L -o ~/bin/jq.exe "https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-amd64.exe"
    chmod +x ~/bin/jq.exe
    
  2. Add to ~/.bashrc:

    export PATH="$HOME/bin:$PATH"
    
  3. Update hooks/hooks.json to use Git Bash explicitly with PATH set:

    {
      "command": "\"C:/Program Files/Git/usr/bin/bash.exe\" -c \"export PATH=\\\"$HOME/bin:$PATH\\\"; source \\\"$(/usr/bin/cygpath -u '${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh')\\\"\""
    }
    

This workaround gets overwritten on plugin updates.

sgeraldes avatar Dec 20 '25 03:12 sgeraldes

:(

7-of-9 avatar Jan 06 '26 00:01 7-of-9

I created a comprehensive fix for this issue. PR Ready: https://github.com/anthropics/claude-plugins-official/pull/127 - Fixes PATH, UTF-8, cygpath, output format, and race conditions. Tested on Windows 11. See #16377 for details.

oinani0721 avatar Jan 09 '26 17:01 oinani0721

The jq dependency issue is part of a larger Windows compatibility problem. The root cause is that Git Bash subprocess doesn't inherit PATH.

Fix: Add this at the beginning of your hook scripts:

export PATH="/usr/bin:/bin:/mingw64/bin:$PATH"

Full solution with all Windows 11 fixes: #9758

Related: #16377 #17257 #16560

oinani0721 avatar Jan 15 '26 09:01 oinani0721