# Loop engineering replaces prompt engineering as agents are being taught to work in loops

- URL: https://syn.by/en/technology/artificial-intelligence/loop-engineering-replaces-prompt-engineering/
- Published: 2026-11-21T20:11:12+00:00
- Updated: 2026-11-22T05:05:04+00:00
- Section: Artificial Intelligence
- Language: en
- RU edition: https://syn.by/ru/tekhnologii/iskusstvennyj-intellekt/lup-inzhiniring-prompt-inzhiniring.md
- BE edition: https://syn.by/technalohii/shtuchny-intelekt/lup-inzhynirynh-zmiena-prompt-inzhynirynh.md

> The term "loop engineering" took hold in June 2026 after remarks by the creators of Claude Code and OpenClaw. Andrew Ng described three loops that run at different speeds.

![](https://syn.by/wp-content/uploads/2026/11/illustration-9062-1024x585.webp)

Loop engineering is called the successor to prompt engineering in 2026. It is the design of the loop inside which an AI agent works: what it does between tool calls, when it checks its own work and how it decides the task is done. Individual prompts are not written by hand in this approach.⁠[[1]](#sob-ref-1)

In July 2026 IBM described loop engineering as the design of agentic workflows that lead AI agents step by step toward a user-defined goal with minimal human involvement. According to the same publication, the practice underlies a number of coding agents, among them IBM Bob, Claude Code and OpenAI's Codex. Prompt engineering, in its definition, looks for the single most effective instruction, while loop engineering builds systems that form their own requests and evaluate the result until the goal is reached.⁠[[2]](#sob-ref-2)

Addy Osmani, an engineer on the Google Chrome team, put the essence this way: it means replacing yourself as the person who prompts the agent, and designing a system that does it in your place.⁠[[3]](#sob-ref-3)[[4]](#sob-ref-4)

## Who fixed the term

The term was proposed independently in June 2026 by Peter Steinberger, Boris Cherny and Addy Osmani, and Osmani put it in writing. According to other accounts, the phrase appeared about a year ago, and developers settled on it in mid-2026.⁠[[3]](#sob-ref-3)[[5]](#sob-ref-5)

Boris Cherny, head of Claude Code at Anthropic, said in June 2026 that he no longer prompts Claude himself: he has loops that do it and decide what to do next, and his job is to write loops. Steinberger, the creator of [OpenClaw](https://www.openclaw.org/), said at the same time that there is no longer any need to prompt coding agents; you need to design loops that prompt the agents.⁠[[4]](#sob-ref-4)

Steinberger created OpenClaw, an open personal AI agent that became the most-starred project on GitHub. The project is now maintained by an independent foundation, OpenClaw Foundation. Since February 2026 Steinberger has worked at OpenAI.⁠[[6]](#sob-ref-6)

Andrew Ng wrote in his Batch letter of 26 June 2026 that "loop engineering" became a buzzphrase after mentions by Cherny and Steinberger that drew a wide response on social media. In his words, loops have become a key part of how agents are made to write software iteratively over long stretches.⁠[[7]](#sob-ref-7)

## Three loops and how they work

Ng described a model of three loops running at different speeds. The agentic coding loop runs every few minutes: the agent writes code, tests and fixes until there are no errors and the specification is met. The developer feedback loop takes tens of minutes to hours: a person looks at the product, steers the agent and updates the specification. The outer loop is rarely shorter than a few hours and sometimes lasts days and weeks: alpha testers, A/B tests, production data.⁠[[1]](#sob-ref-1)

Ng believes the idea of "closing the loop" gained strength toward the end of last year and let agents work longer without a human. The typical template of an agent loop is goal, action, observation, correction.⁠[[2]](#sob-ref-2)[[7]](#sob-ref-7)

In June 2026 the Claude Code team defined loops as repeating work cycles of an agent until a stop condition is met. It classifies them by how they start, how they stop, which Claude Code primitive they use and the type of task. A turn-based loop is started by a user request and stops when Claude decides the task is done or more context is needed.⁠[[8]](#sob-ref-8)

In any loop the bottleneck is the verifier, not the model.⁠[[1]](#sob-ref-1)

## What it looks like in practice

The author of an AI Builder Club piece says he typed one sentence into Claude Code, and by the time he came back about forty agents had written code, checked each other, discarded failed attempts and left three pull requests for review. According to the Claude Code authors, on some mornings they no longer write prompts themselves: another model does it, and they manage hundreds and even thousands of agents.⁠[[1]](#sob-ref-1)

Ng said in June 2026 that over a weekend he built a typing-practice app for his daughter. His agent worked on its own for about an hour and checked the result in the browser several times.⁠[[7]](#sob-ref-7)

The video's speaker reports that the evening before, around one in the morning, pull requests from various agent loops were arriving automatically in their codebase. His loop in Go, he says, ran two days in a row and produced 20–40 pages daily that bring traffic to his company. The material also says that in Stripe's corporate pipeline more than 1300 machine-written pull requests are merged every week.⁠[[3]](#sob-ref-3)

## Predecessors and tools

Sources claim the mechanics of the loop were described earlier by Andrej Karpathy, when he introduced the notion of "vibe coding". In his Software 3.0 talk at Y Combinator AI Startup School he named as the basic unit of work a loop in which AI generates and a human verifies, and advised shortening the verification time.⁠[[5]](#sob-ref-5)

Osmani considers loop engineering to sit one level above harness engineering, which describes the environment of a single agent. In his words, the components of the practice are now built into the Codex app and Claude Code, so loops can be designed independently of the tool.⁠[[4]](#sob-ref-4)

In June 2026 the Ralph technique was popularised by Geoffrey Huntley with the phrase that Ralph is a Bash loop. Its practical implementation is the open script ralph.sh, a single Bash file that runs an AI agent in a loop until a task list is completed. The script adds to the basic idea a task system, a verification gate, a stop condition, a choice of agent backend and a sandbox boundary.

Sources

- [aibuilderclub.com](https://www.aibuilderclub.com/blog/loop-engineering-guide-2026)

- [ibm.com](https://www.ibm.com/think/topics/loop-engineering)

- [asixiv.org](https://asixiv.org/pdf/curated/2606.00001)

- [addyosmani.com](https://addyosmani.com/blog/loop-engineering/)

- [aibuilderclub.com](https://www.aibuilderclub.com/blog/loop-engineering-karpathy)

- [steipete.me](https://steipete.me/about)

- [deeplearning.ai](https://www.deeplearning.ai/the-batch/three-key-loops-for-building-great-software)

- [claude.com](https://claude.com/resources/articles/getting-started-with-loops)
