Skip to content

fix(ralph-loop): address hook scripts via CURSOR_PLUGIN_ROOT - #524

Open
deanrie wants to merge 1 commit into
cursor:mainfrom
deanrie:ralph-loop/hooks-plugin-root
Open

deanrie wants to merge 1 commit into
cursor:mainfrom
deanrie:ralph-loop/hooks-plugin-root

Conversation

@deanrie

@deanrie deanrie commented Oct 8, 2026

Copy link
Copy Markdown

Summary

ralph-loop/hooks/hooks.json still addresses its scripts as ./hooks/capture-response.sh and ./hooks/stop-hook.sh. Plugin hooks do not run from the plugin directory, so from any other cwd those commands fail with exit 127 and the hook never runs. #315 fixed the same layout in advisor a month ago and noted that the plugin registry classifies it as public-invalid; ralph-loop kept the old form, which may be why /add-plugin ralph-loop has nothing to install (#50). This switches both commands to bash "${CURSOR_PLUGIN_ROOT}/hooks/<script>.sh", the form advisor uses.

While here, continual-learning/hooks/hooks.json already uses ${CURSOR_PLUGIN_ROOT} but unquoted; quoted it so a plugin path with spaces keeps working.

loop_limit: null on the stop hook is left as is: the docs define null as "no limit", and ralph-loop enforces its own max_iterations.

No version bump here: #499 already bumps ralph-loop to 1.0.1 and touches the scripts; this PR only changes hooks.json, so the two merge in either order.

Verification

  • node scripts/validate-plugins.mjs: All plugins validated successfully.
  • Ran both new command strings from /tmp with CURSOR_PLUGIN_ROOT=<repo>/ralph-loop and CURSOR_PROJECT_DIR pointing at an empty directory: both exit 0 with no output (no active loop). The old ./hooks/stop-hook.sh form from the same cwd: no such file or directory, exit 127.
  • git diff --check clean.

Refs #50.

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.

1 participant