// Ralph loop

Keep nudging the agent until the goal is provably done.

The Ralph loop is an Atlas-style "ralph wiggum" pattern: a judge model evaluates progress after each turn and decides whether the agent should keep going. PasClaw wires it into /goal so long-horizon tasks can self-drive to a verifiable end state without an operator pressing enter.

Judge modelAuto-continueMET / FAILED / CONTINUEJSON condenser
01

Judge-driven continuation

After every turn, the configured judge model reads the transcript and returns one of MET, FAILED, or CONTINUE. The loop terminates on a terminal verdict and re-prompts the agent otherwise.

02

Wired into /goal and --goal

Operators trigger the loop with the /goal slash command in the interactive agent, or seed it from a plan with pasclaw build --goal so the Ralph loop runs unattended.

03

JSON-aware condensation

A tool-output condenser collapses MCP search responses into structural summaries that preserve keys, so long-running judge loops stay within context budget while keeping the shape the model needs to reason about.

From the documentation

Technical details

Implementation notes drawn from the PasClaw repository documentation.

Three terminal verdicts

After each turn, the judge model classifies progress as MET, FAILED, or CONTINUE. The loop halts on a terminal verdict and re-prompts the agent otherwise.

  • /goal triggers the loop interactively.
  • pasclaw build --goal seeds it from PLAN.md's ## Goal heading.
  • A JSON-aware condenser keeps MCP search responses inside the budget.

Source documentation

Common questions

Frequently asked questions

Keep exploring

See how the rest of PasClaw fits together.

Heartbeat daemon