News

Loop Engineering Emerges as Developers Put AI Coding Agents on Repeat

Loop engineering, a new phrase circulating among AI developers, is becoming a way to describe how software teams are trying to get more value from coding agents: not by writing better one-off prompts, but by designing repeatable cycles that let agents build, test, revise, and continue working with less direct human intervention.

The term has gained attention after mentions by Boris Cherny, creator of Anthropic’s Claude Code, and Peter Steinberger, creator of OpenClaw, went viral on social media, according to Andrew Ng, founder of DeepLearning.AI. Ng wrote on X that “loops are now a key part of how we get AI agents to iterate at length to build software.”

Ng described three loops he uses for building what he called “0-to-1 products”: an agentic coding loop, a developer feedback loop, and an external feedback loop. The framework helps explain why loop engineering is gaining attention as coding agents become more capable of working across longer tasks.

In the agentic coding loop, Ng wrote, a developer can give an AI agent a product specification and, optionally, a set of evals, meaning a dataset against which performance can be measured. The agent can then write code, test its work, and continue iterating until the code is bug-free and meets the specification.

“This idea of closing the loop took off around the end of last year, and it has been a game changer in enabling coding agents to work longer productively without human intervention,” Ng wrote.

Ng said the loop can run quickly, with a coding agent building and testing new software versions every few minutes. He cited a personal example of building an app for his daughter to practice typing, saying his coding agent “could easily work for around an hour, using a web browser to check what it had built multiple times before getting back to me, without needing my intervention.”

The developer feedback loop operates more slowly. In that loop, a developer reviews the product and steers the agent toward improvements. Ng said developers previously spent much of their time acting as quality assurance for coding agents, manually finding bugs and asking agents to fix them. As agents have become better at testing their own code, he wrote, developers can spend more time on higher-level product decisions, including features, user interface choices, and user flow.

Ng argued that humans still play a critical role because they often know more than the AI system about users and the context in which a product will operate. “Many people describe this human contribution as ‘taste,’ but I prefer to think of it as humans having a context advantage,” he wrote.

The third loop, external feedback, includes feedback from friends, alpha testers, production users, or A/B tests. Ng said these loops are slower, sometimes taking days or weeks, but they shape the developer’s product vision, which then drives the specification given to the coding agent.

The concept is not limited to Ng’s framework. Addy Osmani, an engineering leader at Google Cloud, wrote in a June 7 post that “Loop engineering is replacing yourself as the person who prompts the agent. You design the system that does it instead.” Osmani described a loop as “a recursive goal where you define a purpose and the AI iterates until complete.”

Business Insider reported that the term has spread among developers working with tools such as OpenAI Codex, Anthropic Claude Code, Cursor, and OpenClaw. The publication quoted Steinberger as writing, “You should be designing loops that prompt your agents.” It also quoted Cherny as saying, “I don’t write the prompt anymore. Claude writes the prompt, and now I’m talking to that new Claude that is kind of coordinating.”

At a technical level, the idea reflects how agentic coding tools already work. Anthropic’s Claude Code documentation says the agent loop evaluates a prompt, calls tools, receives results, and repeats until the task is complete. OpenAI’s Codex documentation says Codex can run subagent workflows, spawn specialized agents in parallel, route follow-up instructions, wait for results, and return a consolidated response.

Those capabilities are changing what developers need to design. Prompt engineering focuses on shaping a single interaction with a model. Loop engineering focuses on the operating system around the agent: triggers, tools, context, worktrees, evals, test runs, permissions, subagents, review steps, and stopping conditions.

The shift could be especially important for enterprise development teams. A coding agent that suggests a function is one kind of tool. A coding agent that can inspect a repository, modify files, run tests, open a pull request, and call other agents is closer to an automated software worker. That requires clearer rules about what the agent can do, how its work is reviewed, how costs are controlled, and when a human must intervene.

Cost is one concern. OpenAI’s Codex documentation says subagent workflows consume more tokens than comparable single-agent runs because each subagent does its own model and tool work. That makes loop design not only a productivity issue, but also an infrastructure and spending issue.

Reliability is another concern. Osmani warned that “a loop running unattended is also a loop making mistakes unattended.” For production teams, that means loop engineering must include verification, logging, approval gates, and failure limits, not just automation.

Academic work on agentic coding systems points in the same direction. A 2026 arXiv paper analyzing Claude Code described the core of the system as “a simple while-loop that calls the model, runs tools, and repeats,” while noting that much of the engineering work sits around that loop, including permissions, context management, extensibility, subagent delegation, and storage.

For software teams, the emerging lesson is that the hard part of AI-assisted development may be moving up a level. Developers still need to write specifications, understand architecture, evaluate outputs, and make product decisions. But they may increasingly do that by designing systems that keep agents moving through cycles of work.

Ng’s framing puts the human role at the center of that shift. Coding agents may speed up implementation, but product direction still depends on human context, user understanding, and external feedback. “So long as the human knows something the AI does not,” Ng wrote, “human-in-the-loop is needed to inject that knowledge into the system.”

Loop engineering is still a young term, and it may prove to be more of a developer shorthand than a formal discipline. But the problem it describes is real: as AI agents become more autonomous, teams need to engineer not only what agents are asked to do, but also how they repeat, verify, escalate, and stop.

The promise is faster software development. The risk is faster mistakes. The work of loop engineering is to get more of the first without losing control of the second.

About the Author

John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS.  He can be reached at [email protected].