What Is Loop Engineering? Why Is It Trending? And Why Loops Are Not New

Loop engineering is everywhere right now. It is the practice of designing the system that prompts an AI agent, instead of prompting it yourself. Addy Osmani,...

6 min read LinkedIn
What Is Loop Engineering? Why Is It Trending? And Why Loops Are Not New

Loop engineering is everywhere right now. Here is what it actually means, why it took off in the last few weeks, and why the loop underneath it has been there all along.


What is loop engineering?

Loop engineering is the practice of designing the system that prompts an AI agent, instead of prompting it yourself. Addy Osmani, who gave the practice its name, defines it this way: “Loop engineering is replacing yourself as the person who prompts the agent. You design the system that does it instead.”

In concrete terms: instead of typing each instruction to an AI agent by hand, you build a system that decides what to run, checks the output, and decides what to run next. It runs on a schedule, with stopping conditions you define.


Three things converged in June 2026.

Boris Cherny, head of Claude Code at Anthropic, said on stage:

“I don’t prompt Claude anymore. I have loops that are running. My job is to write loops.”

Watch the talk on YouTube: I don’t prompt Claude anymore

Peter Steinberger, creator of OpenClaw, posted:

“You shouldn’t be prompting coding agents anymore. You should be designing loops that prompt your agents.”

Check out the post on X: You shouldn’t be prompting coding agents anymore

Millions of views. Then Addy Osmani wrote an essay naming it “loop engineering”.

The deeper reason it resonates now: models can run on their own for hours. When that happens, the person typing each prompt becomes the bottleneck. The highest-leverage skill shifts from writing the prompt to designing the system that manages the whole run.


Why loops are not new

Every AI agent has always run on a loop. The loop is the mechanism, not a new technique.

The pattern goes back to the ReAct paper (Princeton and Google, 2022): reason about the next step, take an action, observe the result, repeat. Anthropic’s own documentation describes agents as “LLMs using tools based on environmental feedback in a loop.”

What changed is which layer of loop we operate at. We are not inventing something new. We are looping at a higher abstraction layer than before. Each new layer wraps the one below it. The agent does not change. What changes is how many decisions you hand off to the system instead of making yourself.

There are 4 layers. Here is how they stack.


Layer 1: The Agentic Loop

This is the base. Every AI agent runs on this loop.

Anthropic’s own framing describes agents as “LLMs using tools based on environmental feedback in a loop.” Claude Code puts it even more plainly: gather context, take an action, verify the result. Repeat.

Read Anthropic’s guide: Building Effective Agents

The loop looks like this:

  1. The agent reads the current state (files, context, instructions)
  2. It decides what to do next
  3. It takes an action (writes code, runs a command, reads a file)
  4. It observes the result
  5. It loops back to step 1

No loop, no agent. This is the foundation everything else is built on.


Layer 2: The Reflection Loop

Layer 1 is the engine. Layer 2 is the steering.

In a reflection loop, the agent is given a task and a way to check its own work. After each step, it asks: Is this done? Is this correct? If not, it adjusts and tries again.

Anthropic’s work on long-running agent harnesses makes the case for this directly. Without self-verification, agents declare tasks done too early. With it, the agent can run much longer without a human checking in at every step.

Read Anthropic’s guide: Effective Harnesses for Long-Running Agents

In practice, this can be as simple as running tests after writing code. If the tests fail, the agent reads the output and tries again. The human sets the criteria. The agent loops until the criteria are met.

This is the same idea as the generator-evaluator pattern, where one role produces the work and another checks it before it ships. I wrote about how to use it to push AI output from average to good, beyond just coding.

Read the full article: How to Push AI Output Quality Using the Generator-Evaluator Pattern

This is how an agent completes a task end to end without you holding its hand.


Layer 3: The Ralph Loop

Geoffrey Huntley’s “Ralph Wiggum” pattern takes things a step further.

The idea is simple: a script keeps re-running the agent with a fresh copy of the spec on every iteration. The agent does not carry memory between runs. All state lives in files and git, not in the context window.

The agent forgets. The loop remembers.

This might sound like a limitation. It is actually a feature. By keeping the loop stateless, Huntley found the agent stays focused. It cannot drift from the original goal because the goal is re-injected fresh each time. The spec is the memory.

The pattern is now an official plugin in the Claude Code repository, which tells you something about how much it has influenced how practitioners think about this.

Read the write-up: Geoffrey Huntley on the Ralph Wiggum pattern


Layer 4: The Orchestration Loop (what we now call Loop Engineering)

This is the outermost layer. The one Boris and Peter are describing. The one Addy named.

In the layers below, a human still decides when to start the loop, what task to give it, and when to review the output. At Layer 4, you hand off even that.

Loop engineering is the practice of designing the system that prompts the agent on a schedule, checks whether the result meets the criteria, decides what to run next, and escalates to a human only when something is genuinely outside the loop’s ability to resolve.

You stop being the person who prompts the agent. You become the person who designs the system that does.

This is not a small shift. At Layer 1, your job is to write good prompts. At Layer 4, your job is to define the goal, the stopping condition, the verification criteria, and the failure modes. The prompts still exist. You just no longer write them by hand each time.


Where does this leave you?

The term loop engineering is new. The practice underneath it is not. What is new is that the tooling has caught up to the point where building at Layer 3 and Layer 4 is practical for most developers, not just the people building the tools themselves.

If you are still prompting manually for every task, you are at Layer 1. That is fine. That is where everyone starts.

If you are thinking about how to give the agent a way to check its own work, you are moving toward Layer 2.

If you are writing scripts that re-run the agent on a spec, you are at Layer 3.

If you are designing the system that decides what to run, verifies the output, and loops until a goal is met, you are at Layer 4. That is what loop engineering means.

The loop was always there. We are just learning to build higher on top of it.


If you are a business professional looking to 10x yourself with AI, I run a Foundations of Claude Code workshop. The next two cohorts are on 2 July (4 seats left) and 16 July.

Details: https://boonkgim.com/workshops/foundations-claude-code/

#AI #AgenticAI #ClaudeCode #AIAgents #LoopEngineering

Enjoyed this? Subscribe for more.

Practical insights on AI, growth, and independent learning. No spam.

More in AI Agents