Orbit has a rule: any loop without an exit condition is an incident waiting to happen. If you're going to let the agent run on its own, you have to be able to answer before hitting Run: what makes it stop?
An agent that calls tools in a loop is the central piece of any modern autonomous system. Sounds simple: model picks a tool, you execute, send back the result, repeat until done.
The problem: when does "done" happen? Three ways to never finish:
Designing good stop conditions is what separates an agent you can let run from one that needs constant human supervision.
max_steps. absolute counter. If it hits 10-15 without a final, exit with error. Universal safety net.{ ok: false, error: ... }). The model decides how to recover. The loop does NOT break. it only breaks if the model decides to or if the other stop conditions trigger.Implement the loop. On the right you have a starter that works on the happy path but has no stop conditions.
Same principle as Track 3, step 06: an LLM-judge reads your implementation and reasons whether it would correctly handle the 4 scenarios. That means your code has to be readable. Clear names, obvious control flow, early returns for errors.
5 LLM-judge criteria:
max_steps correctly implemented.ok boolean.