What problem does it solve?
Ralph removes the need for manual multi-turn repetition by repeatedly re-running the same agent task with a fresh context until a verifiable completion signal appears.
Core Features & Use Cases
- Self-referential completion loop: Uses an AfterAgent-style hook to continue executing the original prompt across turns until a completion promise is detected.
- Safety controls: Enforces a configurable maximum iteration cap and provides a cancellation command to stop runaway loops.
- Platform-aware operation: Works natively on Gemini-CLI/Claude Code/OpenCode, and includes a Codex-specific setup helper when native hooks are not guaranteed.
Use cases include long-running implementation work that often stops early, iterative refactors that need repeated verify-debug cycles, and TDD workflows where you want the agent to keep going until tests pass and a completion token is emitted.
Quick Start
Run /ralph "Refactor the authentication module using a test-driven workflow, and output <promise>DONE</promise> only after all tests pass" --completion-promise="DONE" and the loop will keep iterating until it sees the completion promise.