Loops at Work

A goal holds an open session until its exit criteria are met, a loop repeats on a cadence inside your session and dies when the session does, and a schedule runs on a recurrence rule that outlives the session entirely.

Three words get used as if they were interchangeable ways to make an AI agent repeat itself. They are not, and reaching for the wrong one produces the two failures people actually hit: a run that never terminates, and a routine that dies silently with the session.

Open Loops at Work on Testing Titbits Playground · 3-4 min · AI Orchestration · Free, no sign-up

How to read it

  1. Start with the orchestration ladder: prompt, context, harness and loop engineering as four nested containers, not four stages.
  2. Act 1 is your calendar. Goal is a war room, loop is a daily standup, schedule is a recurring invite.
  3. Compare all three side by side on when work starts, when it stops, and whether it survives the session.
  4. Act 2 is your org chart. The four loop types become a developer, a tester, a scheduler and a coach.
  5. See the four fields every loop requires, with the stop condition left blank and the form blocked because of it.
  6. Read the bill: 30 days of running that loop, itemised as verification, context and improvement debt, with an illustrative total of 1,283,000 tokens.

What you will learn

Frequently asked questions

What is the difference between a goal, a loop and a schedule?

A goal runs until its exit criteria are met and then stops. A loop repeats on a cadence inside your session and ends when that session ends. A schedule runs on a recurrence rule and keeps running whether or not you are present.

What is loop engineering?

Loop engineering is deciding how an agent repeats work: the stop condition that bounds the run, the context policy that keeps it from drowning, the tool allowlist it works within, and the independent check that says the output is good. It wraps harness, context and prompt engineering rather than replacing them.

How do you stop an agent loop from running forever?

Give it an explicit stop condition before you start it. Max iterations, a budget cap, or a success state the loop can actually detect. An unbounded loop is the primary failure mode, and it is caused by leaving that field blank.

Why should a different model verify the output?

Because a model grading its own work carries the same blind spots that produced the work. It is the reason a tester is not the developer, applied to agents.

More free games and infographics for testers

Created by Rahul Parwal · TestingTitbits.com