ralph-loop-pi
v1.0.2
Published
Ralph loop extension for pi-coding-agent - looped subagent execution
Maintainers
Readme
Ralph Loop Extension
Looped subagent execution via the ralph_loop tool.
Installation (ralph-loop only)
pi install npm:ralph-loop-pi
pi configEnable only ralph-loop in pi config. Dependencies are installed automatically during pi install.
Features
- Runs single or chain subagent tasks until a condition returns false
- Takes a prompt and exit condition (exit condition optional)
- Can supply max iterations and minimum delay between each
- Optionally supply model and thinking
- Interactive steering + control commands when running in UI mode
Interactive Controls
While ralph_loop is running in interactive mode:
/ralph-steer <message>to append steering instructions (--oncefor one-off)/ralph-follow <message>to queue a follow-up message/ralph-clearto clear queued steering messages/ralph-pause//ralph-resumeto pause/resume the currently running iteration/ralph-stopto abort the loop/ralph-statusto show loop status
Tool results render with the rich UI by default (no collapsed trim). Ctrl+O still expands nested tool outputs. Steering and follow-up messages are sent to the current iteration when possible, otherwise queued for the next iteration; queued/sent messages show in the UI.
Example prompt: "Use ralph loop to check the current time five times, sleeping 1s between iterations."
Examples
- Use chain ralph loop to implement a quick fix, then write a brief self-review of the patch.
- Use chain ralph loop to summarize
README.md, thenCONTRIBUTING.md.
Notes
conditionCommandmust printtrueto continue; any other output stops the loop.maxIterationsdefaults toNumber.MAX_SAFE_INTEGERwhen omitted.- Includes a built-in
workerfallback; user/project agents override it if present. - Defaults to agent
workerand the latest user prompt whenagent/taskare omitted.
