How to use this checklist
Work through the phases in order. A loop that skips design and jumps straight to monitoring has nothing well-formed to monitor. Each phase assumes the previous one is solid.
Design — the shape of the loop
1. Write the termination condition as a checkable statement
Not 'when the task is complete' but the specific, testable state that means it's complete. If you can't write a check for it, the loop can't reliably detect it either.
2. Set a hard step ceiling
Pick a maximum number of iterations before the loop ships. A loop that hasn't converged by the ceiling stops and escalates — it never just keeps trying.
3. Decide what state carries across steps
Full history, rolling summary, or last N steps. This is the single biggest lever on both cost and whether the agent can still see what it needs several steps in.
Cost — bound what the loop can spend
4. Design failure handling per tool, not generically
For each tool the loop can call: retry with backoff, try an alternative, or escalate to a human. Don't leave this to framework defaults — that's how infinite retries happen.
5. Add a circuit breaker on steps, tokens, and wall-clock time
A hard limit that forcibly stops the loop once crossed, independent of whether the loop believes it's making progress. This is the backstop for design flaws testing didn't catch.
6. Measure cost per completed workflow, not per request
Sum tokens and compute across every step of a session and divide by whether the task actually finished. A loop that looks cheap per-call can be expensive per completed task.
7. Route steps to the cheapest model that clears the bar
Not every step in a loop needs the frontier model. Classify sub-steps by complexity and route accordingly — this is often the single biggest cost lever in a long-running loop.
Safety — govern what each step can do
8. Wrap every tool call in a policy gate
The loop decides what to try next; the harness decides whether it's allowed. No tool call should execute against a real system without passing through an explicit policy check.
9. Add a human approval checkpoint for high-risk steps
Design it as a step type the loop can pause on and resume from — not a separate process that breaks the loop's state. High-risk actions (writes, deletions, spend) should never execute without this.
See: AI agent governance
Operations — keep the loop honest over time
10. Log every step, not just the final result
What was planned, which tool was called, what was observed, why the loop continued or stopped. When something goes wrong, this is what lets a human reconstruct exactly where it diverged.
11. Monitor for silent drift, not just crashes
A standing loop can keep running correctly-formed steps after its assumptions about the environment stop being true. Alert on output patterns that look stale or repetitive, not just on errors.
12. Run a dry-run before the first unattended execution
Let the loop run to completion against a non-production copy of its target systems first. If it can't finish cleanly there, it isn't ready to run unattended against production.
Where most teams are in practice
| Stage | Typical checklist coverage | Common result |
|---|---|---|
| First standing loop | 1–4 (termination and retries defined, no cost bounds yet) | Works in testing, cost surprises show up in week one of production |
| Active operation | 1–8 (design + cost control) | Spend is predictable; safety still relies on manual review |
| Mature loop | 1–10 (+ policy gates + approvals) | Unsafe actions blocked before execution; audit trail exists |
| Compounding reliability | 1–12 (full checklist + monitoring) | Drift caught automatically; incidents traceable to the exact step |
The one thing to do today
If you're not sure where to start: take the loop you already have running and write down, in one sentence, what "done" means for it. If you can't write that sentence precisely, that's the gap to close first — everything else on this checklist assumes the loop knows when to stop.
Related reading: What Is Loop Engineering?, Loop Engineering: 25 Questions Answered, and the Harness Engineering Checklist.