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:
- Line 58:
TRANSCRIPT_PATH=$(echo "$HOOK_INPUT" | jq -r '.transcript_path')
- Lines 90-95: Parsing assistant message JSON
- 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
- Document the dependency: Add jq to requirements in README.md
- Bundle jq: Include jq binary with the plugin
- Remove jq dependency: Rewrite stop-hook.sh using pure bash/sed/awk (avoid external dependencies)
- Windows compatibility: Use explicit Git Bash path and cygpath for path conversion
Workaround
Manual fix that works:
-
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
-
Add to ~/.bashrc:
export PATH="$HOME/bin:$PATH"
-
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.
Bug Description
The Ralph Wiggum plugin (
ralph-wiggum@claude-plugins-official) has an undocumented dependency onjqthat causes the stop hook to fail on Windows systems where jq is not installed.Error Message
Root Cause
The
hooks/stop-hook.shscript usesjqin three places:TRANSCRIPT_PATH=$(echo "$HOOK_INPUT" | jq -r '.transcript_path')However:
Environment
Additional Windows Issues
On Windows with WSL installed, there's also a path resolution issue:
/bin/bashmay resolve to WSL bash instead of Git BashC:\Users\...) are passed to bash which expects Unix pathsSuggested Fixes
Workaround
Manual fix that works:
Install jq to
~/bin/:Add to
~/.bashrc:Update
hooks/hooks.jsonto 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.