On Friday, Claude Code creator Boris Cherny made an appearance at Meta’s @Scale conference and, surprisingly, the first question from the audience was about loops.
“Are loops the next hype cycle,” the questioner asked, “or are they for real?”
Cherny’s answer was an emphatic, “Yes, they’re for real.”
“Two years ago, we wrote source code by hand. We started to transition so agents write the code. And now we’re transitioning to the point where agents are prompting agents that then write the code,” he continued. “As big as the step from source code to agents was, loops are just as important and as big a step.”
[embedded content]
Later in the talk (around the 32:00 mark in the YouTube video posted above), Cherny got specific about the loops he keeps running in his own work. One agent is continually looking for ways to improve the code architecture, while another looks for duplicated abstractions that can be unified. They submit pull requests like any other coder, and since the code is constantly changing, they never stop running.
It’s a powerful idea, particularly with a figure as significant as Cherny behind it. With the shift to agentic AI, the focus for most users has been managing their agents as well as possible: establish clear goals, check in on discrete units of progress, and don’t let them stray too far beyond the prompt. The loop takes it a step further by authorizing a swarm of agents to work continuously in the background, endlessly. It’s a lot of trust to place in AI — but with models getting better fast, it could be the next step in getting AI to handle real work.
The first thing to recognize is that this isn’t entirely new. 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 subagent 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 …