GUIDE · LOOPS

Loop engineering and the Ralph loop: what a loop still needs to become a control plane

Short answer: A loop keeps an agent iterating. It does not decide what the project needs next, remember what was already rejected, recover a run that stopped, or check the result from outside the session. Those four are what turn a loop into a control plane.

What people mean by a loop

Three public descriptions cover most of what is called a loop around a coding agent today:

  • The Ralph loop. Geoffrey Huntley describes Ralph as a technique that, “in its purest form”, is a Bash loop feeding the same prompt file to a coding agent again and again. In his description it works in a single repository as a single process, does one task per loop, and each loop starts with a new context window, so the plan and the specifications are loaded again every time.
  • /loop in Claude Code. The Claude Code documentation on scheduled tasks describes session-scoped tasks that re-run a prompt on an interval inside a session. They fire only while Claude Code is running and idle, and closing the terminal or ending the session stops them.
  • /goal in Claude Code. The documentation for /goal describes a completion condition that Claude keeps working toward without a prompt at each step. After each turn a model checks whether the condition holds, from the conversation: the same page says this check does not run commands or read files independently.

Addy Osmani’s essay on loop engineering gives the practice its name: replacing yourself as the person who prompts the agent, by designing the system that does it instead.

What a loop gives you

Iteration without a person typing. For one bounded task with a clear specification, that is often what was missing: the agent keeps going, and a fresh context on every pass avoids carrying a long, confused conversation forward. The descriptions above are honest about the scope: one repository, one process, one session, one condition.

What a loop leaves to you

  • State between runs. A loop that starts each pass with a new context knows only what is in the files it reads. Rejected revisions, failed checks and their causes have to be written somewhere on purpose, or the next pass repeats them.
  • The choice of work. The loop runs the prompt it was given. Which eligible work the project needs next, and whether the agent is allowed to do it, is decided before the loop starts, by you.
  • Recovery. A session-scoped loop stops when its session does. Something outside the session has to notice and resume the same job. Our guide on keeping Claude Code and Codex working for days lists what that takes.
  • A check from outside. A condition judged from the conversation is judged from what the agent said it did. A clean install, a request to the released endpoint or a test the agent never ran are outside it. See agents that say “done” while tests fail.

From a loop to a control plane

Add those four and the loop is no longer the system; it is one part of it. The part that holds the state, selects the work, recovers interrupted runs and verifies results is a control plane, and the loop becomes the way it hands one bounded task to an agent. The definition and the full list of components are in what a control plane for coding agents is.

None of this makes a loop the wrong tool. A single task with a specification you trust and a check you will run yourself is a good fit for a loop. A project that continues across days, with more than one piece of work and a result that has to hold in production, needs the rest.

How Orchestro handles it

Orchestro coordinates your existing coding agents around a project goal. A configured local loop selects and executes authorized work while its host and providers are available, keeps the work history across sessions, and a worker’s report triggers an independent check instead of closing the work. Individual worker runs still have limits, and a missing permission or credential waits for the owner. The loop model describes the parts, how Orchestro works shows the loop from the owner’s side, and the 64-second simulation plays a rejected completion and a recovery with sample data, no signup needed.

Apply for an assisted pilot

All articles