Skip to content
RALPH LOOP

Support

The ralph.sh script is designed to be hackable. It is configured to use Claude Code in Docker Sandboxes by default, and you can select another supported agent with --agent. Each run uses a deterministic sandbox name in the form ralph-<agent>-<current-dir>-<hash8>, so different agents get separate sandboxes for the same project. On exit or double Ctrl+C, Ralph stops only the named sandbox for the current invocation.

NB: skills and AGENTS.md work across all major agentic AI CLIs (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Copilot, Amp, etc.) via two symlinked skills dirs.

Ralph uses semantic tags to communicate status:

  • <promise>COMPLETE</promise> - All tasks finished successfully
  • <promise>BLOCKED:reason</promise> - Agent needs human help
  • <promise>DECIDE:question</promise> - Agent needs a decision

Ralph reads these tags only from the end of the agent’s final message, so a tag that shows up in tool output (for example when the agent reads PROMPT.md) never stops the loop. Claude’s final message is read exactly. Other agents don’t report a separate final message, so Ralph uses the last tag in the last 20 lines of their output instead.

CodeMeaning
0COMPLETE - All tasks finished
1MAX_ITERATIONS - Reached limit
2BLOCKED - Needs human help
3DECIDE - Needs human decision (or decisions to review)
4DOCKER_ERROR - Docker daemon not ready
5AUTH_ERROR - Agent not logged in inside the sandbox
6SBX_MISSING - sbx CLI not installed
7AGENT_FAILED - Agent failed several iterations in a row