fix(linux): use loop_limit null instead of osascript#1
Open
advancegabrielguihurt wants to merge 1 commit into
Open
fix(linux): use loop_limit null instead of osascript#1advancegabrielguihurt wants to merge 1 commit into
advancegabrielguihurt wants to merge 1 commit into
Conversation
Cursor caps followup_message chains at 5 unless loop_limit is null. The previous macOS-only osascript workaround silently failed on Linux at iteration 5, stopping the loop. - Add hooks/hooks.json.example with loop_limit: null - Simplify stop hook to always emit followup_message - Add optional continue-linux.sh keyboard fallback for legacy configs - Document Linux requirements in README and ralph command Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks
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
The Ralph loop stopped on Linux after 5 iterations because the stop hook used macOS-only
osascriptto continue the loop. On Linux,osascriptis missing; the hook exits without emittingfollowup_message, so the loop dies silently.Fix: register the stop hook with
"loop_limit": nullinhooks.json(documented inhooks/hooks.json.example). Cursor then accepts unlimitedfollowup_messagechains — the same approach used by ericzakariasson/ralph-loop-plugin.This PR also:
ralph-loop-stop.shto always emitfollowup_message(removessession_iterations+osascriptpath)continue-linux.sh(xdotool/ydotool/wtype) for legacy installs that cannot setloop_limit: null/ralph-loopcommand docsRoot cause
followup_messagefollowup_messageosascripttypes/ralph-loop --continueosascriptfails → loop stopsCursor's default stop-hook
loop_limitis 5 (hooks docs). Setting it tonullremoves the cap on all platforms.Test plan
hooks/hooks.json.exampleinto project.cursor/hooks.jsonwith correct script pathchmod +x hooks/ralph-loop-stop.sh/ralph-loop "echo iteration test" --max-iterations 8and confirm iterations continue past 5Made with Cursor