IA al Día
the efficient way to stay informed
Back to archive
Tools June 9, 2026 analysis 3 min read

The Art of Designing Loops: The New Way to Program with AI Agents

Engineers at OpenAI and Anthropic are moving away from direct prompting of code agents. Instead, they design autonomous loops with triggers and verifiable objectives. The paradigm that promises to change how we write software.

The Art of Designing Loops: The New Way to Program with AI Agents
By IA al Día

A new way of programming with artificial intelligence is emerging, and it is not about better models or longer prompts. It is about loops: designing systems where code agents call themselves in autonomous cycles until completing an objective.

Peter Steinberger, an engineer at OpenAI, summed it up in a tweet that garnered over 5 million views: “You should no longer be prompting code agents. You should be designing loops that prompt your agents.” Boris Cherny, leader of Claude Code at Anthropic, said something similar in an interview: “I no longer prompt Claude. My job is to write loops.”

What Is a Loop?

An agent loop is a system where:

  1. A trigger initiates the process (a PR created, an issue assigned, a timer)
  2. A verifiable objective defines when to finish (tests passing, PR merged, documentation updated)
  3. The agent executes, evaluates its progress, and decides whether to continue or finish
  4. The process repeats autonomously without human intervention until the objective is met

The fundamental difference from traditional prompting is that the human is no longer in the loop. The human defines the what and the why, but 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. Context is important here: 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.

But the figure illustrates an important point: loops are expensive. Not in absolute terms (a personal loop costs fractions of that number), but in that cost scales with 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. The reason is not just token cost, but 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.

However, tools like Claude Code (with its /goal command) and Cursor (with its automations) are democratizing access to this technique. You no longer need to implement an orchestrator from scratch — the tools incorporate 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 not to write code line by line, but to design code generation systems that operate semi-autonomously.

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.

More in this category