A new way of programming with artificial intelligence is emerging around loops: systems where code agents call themselves in autonomous cycles until completing an objective. The design work moves from the model and the prompt to the cycle that runs them.
Peter Steinberger, an engineer at OpenAI, summed it up in a tweet that garnered over 5 million views: “You shouldn’t be prompting coding agents anymore. You should be designing loops that prompt your agents.” Boris Cherny, leader of Claude Code at Anthropic, said something similar in an interview: “I don’t prompt Claude anymore. I have loops running that prompt Claude and figuring out what to do. My job is to write loops.”
What Is a Loop?
An agent loop is a system where:
- A trigger initiates the process (a PR created, an issue assigned, a timer)
- A verifiable objective defines when to finish (tests passing, PR merged, documentation updated)
- The agent executes, evaluates its progress, and decides whether to continue or finish
- The process repeats autonomously without human intervention until the objective is met
The fundamental difference from traditional prompting is that the human steps out of the cycle. The human defines the what and the why, and the agent decides the how and the when.
The Most Expensive Token Bill in the World
Steinberger also revealed that at one point he had a monthly bill of $1.3 million dollars in tokens, with 603 billion tokens processed, 7.6 million requests, and 100 agents running in parallel. Steinberger is an OpenAI employee and has free access to the models; that figure reflects the volume a high-intensity loop can consume, not the typical cost for an independent developer.
The figure also puts a price on the technique: loops are expensive. A personal loop costs fractions of that number, and the bill tracks autonomy: more autonomy = more tokens = more money.
Only for the 1%?
Matthew Berman, an AI content creator, described this technique as “only for the 1% of the 1%” of engineers. His verdict rests on the token bill and on the complexity of designing loops that don’t spin into infinite cycles, that handle errors properly, and that know when to escalate to a human.
Even so, tools like Claude Code (with its /goal command) and Cursor (with its automations) are democratizing access to this technique: the orchestrator no longer has to be written from scratch, because the tools ship it as native functionality.
What This Means
The rise of agent loops represents a subtle but profound shift in software engineering. For the first time, the engineer’s job is to design code generation systems that operate semi-autonomously, leaving the line-by-line writing to the agent.
This has implications for how we measure productivity, how we train new developers, and how we structure teams. If a loop can do the work of a junior developer for a week, what does that mean for a career in software engineering?
For now, loops remain a cutting-edge technique. But with Steinberger, Cherny, and the teams at OpenAI and Anthropic betting on them, it is only a matter of time before they become the standard.