Drill: should this loop continue?

Lesson 5 of 5 in The Agent Loop: One Turn at a Time.

You now hold every piece: turns, the transcript, the exits, the wire anatomy. Time to sit in the runtime’s chair. After every model response, the runtime answers exactly one question — continue or exit? — and it answers by walking a checklist, not by having opinions. Walk it yourself.

Should this loop continue?

Interactive decision tree — outcomes:

  • Natural stop — deliver the answer

    The loop exits and the response goes to the user. The only ending that means done rather than stopped — every other outcome on this tree is the runtime protecting you.

  • Kill switch — halt now

    Stop mid-plan, and do not finish executing queued calls first. A kill switch that politely completes the current batch is a kill switch that sends the wrong emails anyway.

  • Budget exhausted — exit and report

    Exit and say exactly what was and wasn’t done. Partial results with an honest status report beat both silent overruns and silent abandonment — downstream systems and humans need to know where the work stopped.

  • Circuit breaker — break the retry spiral

    Repeating a failing call is the loop’s most common infinite pattern. Break out and escalate rather than burning the remaining budget discovering the same error a dozen more times.

  • Approval gate — pause for a human

    Not an exit — an exit ramp that rejoins the road. The loop pauses, a human reviews the requested call, and on approval the runtime executes it and the loop continues. This is human-in-the-loop oversight attached to exactly the calls that can’t be undone.

  • Continue — turn N+1 begins

    Execute the calls, append the results, call the model again. The default outcome — and now you know every check that stands between it and trouble.

Interactive flashcard deck.

Tool: Agent Loop Lab — Run the loop yourself: set budgets, break a tool mid-run, watch the turns accumulate — and find out which backstop saves you.