Skip to main content
Close-up of a computer screen displaying complex recursive loops in code, illustrating how AI research increasingly depends o

Editorial illustration for AI research increasingly relies on recursive loops, a staple of CS basics

AI research increasingly relies on recursive loops, a...

AI research increasingly relies on recursive loops, a staple of CS basics

2 min read

On Friday, Boris Cherny, the mind behind Claude Code, took the stage at Meta’s @Scale conference and was immediately hit with a question that cut to the core of his recent work: “Are loops the next hype cycle, or are they for real?” His reply was unambiguous—“yes, they’re for real.” Cherny traced a two‑year arc from hand‑written source code to agents that now generate code, and further to agents prompting other agents to do the same. He called that transition “as big as the step from source code to agents,” and added that loops represent an equally significant leap.

Around the 32‑minute mark of his talk, Cherny detailed the loop he runs in his own projects. One agent constantly scouts for architectural improvements; another hunts duplicated abstractions to merge. Both submit pull requests, and because the codebase never settles, the agents never stop. The idea extends the usual advice of setting clear goals and monitoring progress—now a swarm of agents works in the background, iterating endlessly.

Recursive loops -- functions that call themselves in order to repeat an action, along with a condition that stops the loop -- are a mainstay of intro computer science courses. These loops are following a non-deterministic logic -- that is, it's a sub-agent that chooses when to stop the loop instead of a clear condition -- but the same basic approach is at work. As soon as programmers started using AI to complete tasks, some version of the recursive loop, with AI overseeing AI, was bound to come up. Unlike classic computing, agentic loops can be maddeningly simple.

Why this matters

Loops are familiar to anyone who has taken an intro CS class, yet their resurgence in AI pipelines now feels less like a nostalgic throw‑back and more like a structural shift. A new loop. We heard Boris Cherny affirm that recursive loops are “for real,” pointing to a workflow that has moved from hand‑written code to agents writing code, and now to agents prompting other agents to produce code.

This layering suggests a non‑deterministic logic where a sub‑agent decides when to terminate, a nuance that could complicate debugging and safety guarantees. For developers, the promise of self‑referential agents may reduce low‑level coding effort, but the opacity of termination decisions raises questions about predictability. Founders might see an efficiency narrative, yet the lack of clear metrics on performance or error rates makes the business case tentative.

Researchers are left to verify whether these loops genuinely improve iteration speed or simply add another abstraction layer. In short, the technology is real, but whether it delivers consistent value remains uncertain.

Further Reading