Loop Engineering: The Quiet Revolution in How We Work with AI

June 11, 202612 min read

"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." — Boris Cherny, Head of Claude Code, Anthropic (2026)


The End of the Prompt Era

For the past few years, the dominant mental model for working with AI was simple: you type, it responds. You craft a clever prompt, paste in some context, read the output, and type again. The human is always in the driver's seat, turn by turn, like a back-and-forth tennis match. It worked — up to a point.

But that era is quietly ending.

Welcome to Loop Engineering — arguably the most important shift in AI-assisted development since the launch of GitHub Copilot in 2022. It's not about writing better prompts. It's about replacing yourself as the person who prompts at all.


What Exactly Is a Loop?

In agentic AI, a loop is a repeating cycle where the model takes an action, receives feedback from the environment, and uses that feedback to decide its next move — continuing until a goal condition is actually met. It's not a chain (A → B → C). It's dynamic: the agent might go A → B, discover B failed, revise its approach, and retry — all without you watching over its shoulder.

This idea traces back to the ReAct pattern (Reason + Act), introduced in research from Princeton and Google. The cycle looks like this:

  1. Understand the goal
  2. Write some code / take an action
  3. Run it and observe the output (or error)
  4. Reason about what went wrong
  5. Revise and re-run
  6. Repeat until done

That feedback loop — reason, act, observe, repeat — is the beating heart of loop engineering. (2)


From Prompts → Context → Harnesses → Loops

To understand why loop engineering matters, you need to see the arc of how we got here. The AI development paradigm has shifted three times in just four years:

EraYearsCore QuestionWhat Mattered
Prompt Engineering2022–2024"What should I say?"Quality of instructions
Context Engineering2025"What information do I provide?"What fills the context window
Harness / Loop Engineering2026"What system do I build?"Architecture of the whole system

As one sharp metaphor puts it: "In 2022, we studied how to write the perfect email. In 2025, we learned to manage our inbox. In 2026, we're designing the email system itself." Engineering rigor never disappeared — it simply relocated, from prompts to context, and from context to system architecture. (4)

Loop engineering sits at the top of this stack. Peter Steinberger captured it perfectly: "You shouldn't be prompting coding agents anymore. You should be designing loops that prompt your agents." (1)


The Five Pillars of a Well-Engineered Loop

Not all loops are equal. A poorly designed loop wastes tokens, runs forever, or hallucinates progress. A solid loop has five components — plus one critical memory layer:

Automations (The Heartbeat)

Scheduled triggers that do discovery and triage autonomously — on a timer, on a git event, or on a CI signal. This is what makes a loop an actual loop and not just a one-time run. Tools like Claude Code's /loop and /goal commands, or Codex's Automations tab, embody this. (1)

Worktrees (Parallel Without Chaos)

When multiple agents work simultaneously, they need isolated environments. Git worktrees give each agent its own working directory so they don't overwrite each other — the same coordination problem humans face, solved at the system level.

Skills (Codified Knowledge)

Instead of pasting giant instruction blocks into every prompt, you encode project knowledge into reusable SKILL.md files that agents can invoke by name. This keeps loops maintainable and consistent over time.

Plugins & Connectors (Tool Access)

Loops only work when agents can interact with the real world — running tests, reading files, calling APIs, writing to Linear or GitHub. The quality of the toolset directly determines how effective the loop can be. If the agent can't run its own code, the loop is just guessing. (2)

Sub-Agents (Ideate and Verify)

One agent proposes; a different agent checks. This separation of concerns — the agent that wrote the code is not the one grading it — is one of the most powerful reliability patterns in agentic systems. (3)

Memory (The Glue)

A markdown file, a Linear board, anything that lives outside the single conversation. The model forgets everything between runs. The repo doesn't. This external memory is the thread that holds multi-session loops together.


Why This Changes Everything

The implications are profound. Loop engineering shifts the developer's role from operator to architect. You're no longer the person turning the crank — you're the person who designs the machine that turns the crank.

This is especially powerful for coding because software development is inherently iterative. Even experienced engineers don't write perfect code on the first try. They run it, see the error, fix it, run it again. Loop engineering gives AI agents the same feedback cycle — and removes the human bottleneck from the middle of it. (2)

The /goal primitive in both Claude Code and Codex is a perfect example: you define a verifiable stopping condition like "all tests in test/auth pass and lint is clean" — and walk away. A separate small model checks whether you're done after every turn, so the agent that wrote the code isn't the one grading it. (1)


The Honest Caveats

Loop engineering is genuinely exciting — but it demands honesty about its risks:

  • Token costs can spiral wildly. Autonomous loops can consume enormous amounts of tokens if not carefully bounded. Usage patterns vary wildly between "token rich" and "token poor" teams.
  • Vague goals produce infinite loops. "Make the app better" is not a loop condition. "Make all unit tests pass" is.
  • Auditability shifts from code to trajectory. With deterministic workflows, every step is traceable in the source. With agentic loops, the trace lives in the run — which forces new patterns around logging and human approval checkpoints. (3)
  • It's still early. As Addy Osmani noted in his foundational post on the topic: "I'm skeptical, and you absolutely have to be careful." The tooling is maturing fast, but the best practices are still being written. (1)

The Bottom Line

Loop engineering is not hype. It's a genuine architectural shift — the natural next step after we exhausted what single-shot prompting could do. The engineers who will thrive in 2026 and beyond are not the ones who write the cleverest prompts. They're the ones who design the most elegant, reliable, self-correcting systems.

The loop is the new unit of work. Learn to design it.


Sources

  1. Addy Osmani, "Loop Engineering", addyosmani.com, June 7, 2026 — addyosmani.com
  2. MindStudio Team, "What Is Loop Engineering? The New Meta for AI Coding Agents", mindstudio.ai, June 9, 2026 — mindstudio.ai
  3. Molisha Shah, "What Are Agentic Design Patterns? 2026 Pattern Catalog", augmentcode.com, May 18, 2026 — augmentcode.com
  4. "From Prompts to Harnesses — Four Years of AI Agentic Patterns", bits-bytes-nn.github.io, April 5, 2026 — bits-bytes-nn.github.io

Ready to Design Reliable Agent Loops?

Need help architecting self-correcting agent workflows, loop boundaries, verification patterns, or production harnesses for Claude Code and Codex? Contact us for expert guidance on loop engineering and agentic AI systems.