Skip to content

Conversation

@clowerweb
Copy link

Summary

  • Replace all 3 jq calls in stop-hook.sh with python3 equivalents
  • Add Requirements section to README.md documenting the python3 dependency

The ralph-wiggum stop hook uses jq for JSON parsing, but jq is not available by default on Windows/Git Bash, causing command not found errors. Python 3 is far more universally available and handles JSON natively via json module.

Replacements:

  1. Line 58: jq -r '.transcript_path'python3 -c "import sys,json; print(json.load(sys.stdin).get('transcript_path',''))"
  2. Lines 90-95: Complex .message.content extraction → equivalent Python with error handling
  3. Lines 167-174: jq -n --arg JSON construction → python3 -c "import json; print(json.dumps(...))" with proper escaping via sys.argv

Test plan

  • Verify stop hook correctly extracts transcript path from hook input JSON
  • Verify stop hook correctly parses assistant message text from JSONL transcript
  • Verify stop hook outputs valid JSON with decision/reason/systemMessage fields
  • Verify ralph-loop iteration cycle works end-to-end (start → iterate → complete)
  • Test on Windows/Git Bash where jq is not installed

Fixes #14817

🤖 Generated with Claude Code

The stop hook used jq for JSON parsing, but jq is not available by
default on Windows/Git Bash. Replace all three jq calls with python3
equivalents (python3 is universally available on modern systems).

Also add a Requirements section to README.md documenting the python3
dependency.

Fixes anthropics#14817

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@pypetey
Copy link

pypetey commented Feb 9, 2026

On Windows frequently python is called via python instead of python3 so a lot of people would still have issues.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants