The loops we run and what stops them.
In June Addy Osmani wrote up an idea several people building coding agents had been circling, after Peter Steinberger said publicly that developers should stop prompting their agents and design the loops that prompt them. The name stuck. An arXiv paper from August gives the tightest definition: loop engineering is designing automated control structures that repeatedly invoke coding agents, triggered on a schedule or by events, with each run bounded by a stop condition a machine can check.
IBM and others place it as the next layer after prompt engineering, context engineering and harness engineering. The harness is the environment the agent works in. The loop decides when the agent runs, what it may touch, who checks the result and when everything stops.
Definitions are easy to find. Loops that have run for months are harder to find written down, so here are ours.
The seven decisions every loop needs
Each loop below answered the same seven questions before it ran unattended.
- Trigger. A schedule, an event (a failing build, a new ticket, a production error) or a person pressing a button.
- Scope. What the agent may change, in which repositories, with which credentials.
- Check. What decides whether the output is right. Never the agent's own report.
- Stop condition. Success, a retry cap, or a budget limit, whichever comes first.
- State. What carries over between runs, so the loop does not repeat last week's work or last week's mistake.
- Handoff. Where a person enters, and what evidence they get.
- Budget. Spend per run and per day, recorded and capped.
The arXiv paper lists almost the same concerns: persisting state, verifying independently of the implementing agent, bounding cost, restricting unattended changes and defining when humans step in. They are the questions that come up as soon as nobody is watching the terminal.
Loops in a production multi-agent product
For most of 2026 Carlos, who founded Vindler, worked inside the AI engineering team of a SaaS platform used by millions, on its production multi-agent assistant. Several loops came out of that work.
Production failure to pinned regression
A production log entry or a failing evaluation starts it. The trace is matched to the conversation, Claude Code proposes a patch, the flow is re-run in a browser against the real product, and the case becomes a new evaluation example so it cannot come back quietly. The agent triages and drafts; an engineer merges. The stop condition is the re-run passing in the browser. The state is the evaluation set, which grows with every incident.
Validate, revise, commit, inside the agent
Inside the product itself, an editing agent proposes a change as a structured patch, validates it with a dry run, revises if validation fails, and commits only a patch that passes, with a retry cap. A destructive change waits for the user's approval. This is a loop at the smallest scale, and it is what stopped the agent from reporting work as done when the product disagreed.
Generate, critique, fix
For generated output a person would judge by eye, such as a landing page, the loop we designed for the team builds the result, renders a screenshot, runs a static check and a vision check against the brief, and sends the critique back to the generator, bounded to one or two fix passes. The rule behind it: the model that wrote the page must not be its only judge. We proposed it as a tool the agent calls first, promoted to a mandatory step if the evaluations show the agent skipping it.
Evaluations as a merge gate
Every pull request that touches an agent runs several hundred evaluation examples in CI, and the evaluators read the end state back from the product. The gate blocks on new failures compared with the main branch, because an absolute failure budget with no baseline makes a green run meaningless. This turns the evaluation set from a report into a gate, and it is what makes the other loops safe to automate: a loop can propose anything, and the gate still decides.
The model upgrade loop
New model versions arrive every few weeks. The upgrade became a packaged skill: swap the model in a branch, run the evaluation suites, price the run, and produce a comparison an engineer can approve or reject. A stricter new model also turned out to be a bug finder: it surfaced two silent production bugs before the switch shipped.
Production errors mined into evaluations
Failures from production feed back into the agent's own instructions and the test set. In one case, putting a capabilities reference back into the prompt clearly raised the share of tasks completed on the first try and cut the patches the validator rejected, for a small increase in prompt tokens. The point is the direction of the loop: production teaches the test set, and the test set protects production.
We also turned individual coding-agent licences on that team into a shared practice: shared skills, one review rubric that runs locally and in CI, and agent-driven browser tests.
A loop in a game studio pipeline
For Voodoo we built an autonomous Unity pipeline that takes a one-paragraph brief to a designed, built and tested feature in a live game. The full write-up is in An Autonomous Unity Pipeline from Brief to Playable Feature. Two of its decisions matter here.
The first is that a single long agent run does not work. The pipeline splits into stages, each with its own managed context, so no stage carries the noise of the ones before it. The second is the handoff: one human approval gate between design and build, and five independent layers of verification after it. The agent that builds the feature never decides that it works.
Loops in our own operation
Vindler runs on scheduled agent jobs on an always-on machine. A few of them show the seven decisions at small scale.
An hourly job scans a freelance marketplace for projects that fit our work. The trigger is the clock, the scope is read only, and the check is a scoring gate: a project that does not pass the gate produces nothing, and one that does opens a thread for a person, who decides whether to apply. Nothing automated ever submits a proposal.
A watchdog runs several times a day and reports any job that is late or missing. Every evening another job compares the schedule we declared in a file with what is actually registered on each machine, and reports the drift. A loop you cannot see failing is worse than no loop.
What we learned
The check is the product. Every loop we trust has a check that looks at the end state: the product in a browser, the evaluation score, the test result. Every loop that went wrong trusted something the agent said about itself.
Bound everything. Retries, passes, spend and scope. An unbounded review loop between two agents will trade comments until the budget runs out.
Make the handoff cheap. If the person at the end needs twenty minutes to understand what the agent did, the loop saves nothing. The handoff should carry the evidence: the diff, the check results, the trace and the cost.
Start where a machine can say pass or fail. Dependency bumps, lint fixes, failing tests, regressions with a reproduction. Loops on tasks that need taste come later, with a stronger check.
Keep state outside the agent. The evaluation set, the trace store and the instructions file are what make next week's run better than this week's. The agent itself remembers nothing.
Where this goes next
A set of loops with shared checks, shared state and a review gate is what the industry now calls a software factory. We wrote about what that takes in What Is an AI Software Factory. If you want help building the first loops for your team, the details are on our AI software factory page.
Sources
- Loop Engineering, Addy Osmani, June 2026.
- Loop Engineering: Building Blocks, Adoption, and Impact, arXiv.
- What is loop engineering?, IBM.
- Harness engineering for coding agent users, Birgitta Böckeler on martinfowler.com.
- Agent Harness Engineering, Addy Osmani.




