The cycle an agent runs in: decide, call a tool, read the result, decide again — repeating until the goal is met or a stop condition fires.
This loop is what separates an agent from a single completion. The model is called repeatedly, each time seeing the results of its last action, so it can course-correct instead of committing to a plan formed before it knew anything.
The stop condition is where loops go wrong. Vague goals produce agents that declare victory early or grind forever; verifiable ones — tests pass, a check returns green, a value crosses a threshold — let the loop terminate on evidence rather than on the model's opinion of its own work.