Wednesday, July 29, 2026

What the Hell Is a Loop, Anyway? – O’Reilly


The next article initially appeared on LinkedIn and is being republished right here with the creator’s permission.

We’re at present on the peak of the hype cycle. On June 7, Peter Steinberger posted that you shouldn’t be prompting coding brokers anymore; you ought to be designing loops that immediate your brokers. That very same week, Boris Cherny of Anthropic stated on stage that he doesn’t immediate Claude anymore: “I write loops; the loops do the work.” Addy Osmani revealed an essay known as “Loop Engineering” on June 7, swyx revealed “Loopcraft: The Artwork of Stacking Loops” on June 12, and LangChain revealed “The Artwork of Loop Engineering” on June 16. Then got here the AI Engineer World’s Honest, the place the phrase dominated the primary stage. Swyx’s keynote was about Loopcraft, a whole observe was dedicated to software program factories, speaker after speaker reached for a similar phrase, and the convention closed on July 2 with an hour-long debate about whether or not the hype behind loops has outrun what works in observe.

The issue is that the individuals speaking about loops aren’t all discussing the identical factor. I counted a minimum of 4 distinct architectures hiding behind that one phrase. So this put up is an try and map out what everybody means.

The execution loop: The agent’s personal act-observe cycle

That is the loop most individuals image once they say “agent”: name a instrument, learn the outcome, resolve the following motion, and repeat till there are not any extra instrument calls to make. It’s what Addy calls the inside execution loop, the half brokers can now run largely on their very own, and it’s the innermost loop you possibly can engineer. (swyx’s stack has a token loop, however no one designs the token loop. It’s simply a part of the mannequin.)

Swyx’s unique Loopcraft diagram

The execution loop iterates on steps inside one process. It ends on surroundings suggestions: the take a look at output, the API response, and the file contents. People are normally absent mid-loop and seem on the boundaries, approving plans or reviewing outcomes. The execution loop additionally ends every time the agent decides it’s carried out, whether or not or not it really is. The primary repair the sector discovered for that was to wrap this loop in one other one which doesn’t take the agent’s phrase for it.

The duty loop: Restart the agent till the spec is glad

This was the primary loop to get a reputation and it’s Geoffrey Huntley’s Ralph loop, which bought name-checked from the AI Engineer World’s Honest primary stage when Allie Howe of Keycard launched the software program factories observe by citing Geoffrey’s article “All the pieces Is a Ralph Loop.” A Ralph loop restarts a coding agent towards the identical specification time and again, allocating a totally contemporary context window each iteration and doing precisely one process per loop. The obvious waste is the purpose: Refeeding the complete spec every time prevents the context rot and compaction occasions that quietly degrade long-running classes.

What this loop iterates on is a single artifact. What ends the loop is spec compliance and passing assessments. The human writes the spec and judges doneness, and in Geoffrey’s telling the human has yet one more job that I’ll return to later: watching the loop, recognizing failure patterns, and fixing them so that they by no means recur. Within the closing debate on the convention’s closing day, he in contrast the position to a locomotive engineer, somebody whose complete job is holding the prepare on the rails. Zoom out from a single spec although, and a a lot larger loop comes into view: the one which runs a whole codebase.

The product loop: The software program manufacturing unit

This was the loudest model on the AI Engineer World’s Honest. Tereza Tizkova of Manufacturing facility outlined a software program manufacturing unit as “the entire loop, the entire lifecycle of creating software program with autonomy,” and Zach Lloyd of Warp bought particular about what that lifecycle is in an interview with Latent Area: triage, specification, implementation, evaluate, verification, transport, and monitoring. Zach’s declare is that software program engineering turns into manufacturing unit engineering, and that you just’ll be constructing the factor that builds the product. Warp is dogfooding this: The corporate positioned its personal open-sourced repo underneath the management of Oz, its manufacturing unit platform. Zach describes the adoption path as beginning with low-risk repos and ratcheting the automated PR merge fee upward from 20 p.c towards 60. Anthropic seems to be operating the identical experiment internally. The corporate says 65% of its product staff’s code is now created by its inner model of Claude Tag, and Mike Krieger described his staff’s use of it on the World’s Honest as delegated and proactive: not “repair this bug” however take duty for this a part of the codebase, monitor this suggestions channel, and choose up duties by yourself.

The duty loop and the execution loop have outlined exit circumstances. The product loop iterates on a codebase and its backlog, repeatedly, and its closing alerts come from outdoors the codebase fully: new points, manufacturing logs, consumer suggestions, evaluate outcomes. The human position turns into configurable. In Zach’s framing, you choose the elements of the lifecycle to automate and the factors the place people get introduced in, and organizations differ on questions like whether or not code evaluate stays human for high-risk adjustments. A manufacturing unit improves a product. The subsequent loop improves the manufacturing unit itself.

The system loop: Autoresearch

Roland Gavrilescu of Introspection calls this autoresearch. Right here’s how he framed the idea in a Latent Area interview: The inside loop is your major system doing user-facing work, and the outer loop research and maintains the first system. It iterates on prompts, harnesses, mannequin selections, and the evals themselves. His one-liner is that the loop is the product.

This sample now has actual existence proofs at each ends of the dimensions. The minimal case is Andrej Karpathy’s autoresearch from March 2026, roughly 630 traces of Python that ran 50 hypothesis-edit-evaluate experiments in a single day on one GPU. The shipped case is Meta’s Brain2Qwerty v2, introduced in late June, the place the researchers report that brokers iteratively modified the codebase to invent higher decoding architectures, producing a considerable enchancment in phrase error fee. Meta’s caveat is instructive: Remaining coaching configurations had been nonetheless chosen by hand. Even the flagship system loop retains a human on the final checkpoint.

What ends this loop is probably the most demanding sign set of the 4: evals, judges, filtered product suggestions, and, in Roland’s design, an express ask-a-human instrument by means of which the agent accumulates tacit information the best way a brand new worker does. And that’s the highest of the stack. Put the 4 collectively and the form of the entire system turns into seen.

The 4 loops facet by facet

What about Agentic MapReduce?

One well-known sample from the identical week is lacking from this map on goal. Cognition’s Devin Safety Swarm followers parallel bounded brokers out throughout a repository and aggregates their findings, a form the corporate calls Agentic MapReduce, and it will get known as a loop. I don’t suppose it’s one. Dispatch, collect, validate is a pipeline: Nothing feeds again right into a subsequent cycle, and a loop with out suggestions is only a for assertion. Fan-out is a topology you possibly can deploy inside any of the 4 loops, not a loop of its personal.

The unnamed loop on the high is the oversight loop

In swyx’s loop diagram, the outermost ring, the one above the loop that makes loops, is actually labeled “???? loop.” Its verbs are “set targets, allocate, cull.” Its exit situation is listed as none.

I feel that loop has a reputation. I’m calling it the oversight loop: It’s the place targets get set, budgets get allotted, and work will get culled, and it’s the one ring the place a human ought to stay. Addy stated on the AIEWF stage: “That inside loop is functionality. The outer loop is company.” Company is strictly what the oversight loop holds.

The loop stack, tidied up a bit.
The loop stack, tidied up a bit.

And the sharpest disagreements at AIEWF had been all, when you translate them, arguments about who runs that high ring. Zach and Roland make the case for turning the dial up: choose your checkpoints intentionally, ratchet autonomy as belief accumulates, and, in Roland’s memorable distinction, construct orchestras earlier than factories, the place an orchestra is a system that retains a human conductor. The opposite camp says the dial has a cease. Geoffrey Litt of Notion known as factories a miserable imaginative and prescient on X and argued, in a chat he has since revealed as an essay, that those that delegate understanding get changed by the agent. Paul Bakaus put it as flatly as it may be put: “There is no such thing as a auto, and there shall be no auto.” His argument isn’t solely about high quality; it’s about possession. Folks want goal, they usually need a position in what they create.

The closing debate, coated in Latent Area’s convention reporting, put each positions on one stage. Dex Horthy of HumanLayer took pains to say he isn’t anti-loop, declaring that Kubernetes is constructed on management loops, however deterministic ones. His fear is that enthusiasm has gotten forward of the engineering, and his recommendation was to step down an abstraction degree reasonably than up. Geoffrey took the opposite facet and known as loops inevitable. And Mike supplied probably the most trustworthy knowledge level of all: Even inside Anthropic, the staff operating Tag experiences being bottlenecked on opinions and on the human means to conceptualize what the system is doing. The checkpoint people saved for themselves is now the constraint.

Autonomy is a dial that exists individually on each one of many 4 loops. You may run a completely autonomous execution loop inside a closely supervised product loop. You may hand the system loop to brokers whereas holding goal-setting fully human. The fascinating engineering query isn’t “Which camp wins?”; it’s “What info do you must set every dial accurately?”

The desk above is my try and fill in these blanks. Each loop, together with the highest one, has a nameable exit situation, and the highest one is you. However naming a sign isn’t the identical as wiring it in. A loop with out its sign doesn’t converge. It simply runs till one thing exterior stops it. Realizing whether or not your loops are literally closing, at manufacturing scale, means sweeping traces and clustering failures repeatedly as an alternative of spot-checking transcripts, which is strictly the job Arize AX was constructed to do.

Which one are you constructing?

Now the loops have names, that’s the query to ask. The phrase loop is doing a number of work this month, as a result of this subject loves nothing greater than leaping on the following sizzling factor. However actual observe underlies all 4 loops, and it’s the identical observe in every: individuals are dialing up their degree of abstraction and pushing human judgment additional up the stack. That’s the precise lesson of loops. We get extra carried out by climbing up the stack, and now you’ve a map, the place you need to climb.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles