fix(ralph-loop): fix hooks matcher and stdin handling - #388
Merged
Conversation
Critical bugs that prevented /ralph-loop from working: 1. hooks.json: Change matcher from "ralph-loop-active" to "*" - The invalid matcher prevented hooks from ever executing - Wildcard matcher allows hooks to run, with state file check inside 2. session-start-hook.sh: Read SESSION_ID from stdin - Add </dev/stdin to jq command to read JSON input - Without this, SESSION_ID was empty causing early exit 3. session-start-hook.sh: Fix RALPH_SESSION_ID file writing - Handle both existing files and newly-created files - Previous logic only wrote to existing files, missing the just-created case Tests: Added 12 new tests (54 total, all passing) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
baleen37
enabled auto-merge
February 4, 2026 23:27
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis change removes ralph-loop plugin documentation files, updates hook configuration matchers from "ralph-loop-active" to wildcard matching, enhances session-start-hook.sh to persist session IDs to an environment file, and adds comprehensive test coverage for these modifications and related behavior. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/ralph-loopcommand from working"ralph-loop-active"to"*"Bug Fixes
1. hooks.json matcher (Critical)
"ralph-loop-active"is not a valid matcher pattern"*"wildcard, hooks check state file existence internally2. session-start-hook.sh stdin reading
jq -r '.session_id'reads nothing without stdin redirect</dev/stdinto read JSON input3. session-start-hook.sh ENV_FILE writing
elifbranch to handle newly-created filesTest Coverage
Test Plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Changes
Tests
Documentation