The most important thing happening in AI engineering right now isn't a new model. It isn't a benchmark. It isn't a funding round. It's a quiet shift in how the people building these tools actually use them — and it has a name: loop engineering.

On June 8, 2026, Addy Osmani published a blog post that crystallized something a lot of engineers had been feeling but couldn't quite articulate. The same week, Boris Cherny — the head of Claude Code at Anthropic — said something that sounded almost reckless coming from someone whose job is literally building the most popular coding agent in the world: "I don't prompt Claude anymore. I have loops running that prompt Claude and figure out what to do. My job is to write loops."

Peter Steinberger put it even more bluntly: "You shouldn't be prompting coding agents anymore. You should be designing loops that prompt your agents."

That's the whole idea. Everything else is details. But the details are worth it, because the shift from prompting to looping changes how you work more than any model upgrade ever will.

What loop engineering actually means

For two years, the way you used a coding agent was simple. You typed a prompt. The agent responded. You read the response. You typed another prompt. The agent was a tool and you held it the whole time, turn by turn, like a very long conversation with a very fast colleague.

Loop engineering says: stop being the person in that conversation. Instead, build a small system that finds the work, assigns it to agents, checks the results, writes down what happened, and decides what to do next. Then let that system run on its own. You design the loop. The loop runs the agents. You review the output.

Osmani frames a loop as "a recursive goal where you define a purpose and the AI iterates until complete." The loop isn't a script that does one thing and exits. It's a persistent structure that keeps going — discovering work, doing work, verifying work, and looping back — until a goal condition is met or it escalates to you.

This isn't just automation. It's a different mental model for working with AI. You stop asking "what prompt do I write?" and start asking "what system do I design?"

The five building blocks

Osmani's post lays out a clean architecture. A loop needs five things, plus one place to remember stuff:

1. Automations — These are the heartbeat. An automation runs on a schedule. It discovers work, triages issues, summarizes CI failures, hunts bugs that appeared overnight. In the Codex app, you set one up in the Automations tab: pick a project, a prompt, a cadence, and whether it runs locally or on a background worktree. Runs that find something land in a Triage inbox. Runs that find nothing archive themselves. In Claude Code, the same idea lives through /loop (re-run on a cadence), /goal (keep going until a condition is true), cron tasks, hooks, and GitHub Actions.

The key insight: /goal is the primitive closest to what loop engineering is really about. You give it something like "all tests in test/auth pass and lint is clean" and walk away. A separate small model checks after every turn whether the goal is met. The agent that wrote the code isn't the one grading it. That separation is the whole point.

2. Worktrees — The second you run more than one agent, files start colliding. Two agents writing the same file is the same mess as two engineers committing to the same lines without talking. Git worktrees fix this — each agent gets its own working directory on its own branch, sharing the same repo history but never touching each other's checkout. Codex builds worktree support in per thread. Claude Code gives you --worktree flags and isolation: worktree settings for subagents.

But there's a ceiling Osmani is honest about: "The worktrees take away the mechanical collision but YOU are still the ceiling. Your review bandwidth decides how many you can actually run, not the tool." The tool can scale. You can't. Not yet.

3. Skills — A skill is how you stop re-explaining your project to an agent every single session like it has amnesia. Both Codex and Claude Code use the same format: a folder with a SKILL.md file holding instructions and metadata, plus optional scripts and references. You write it once. The agent reads it every run. Without skills, the loop re-derives your entire project from scratch every cycle. With skills, it compounds.

This connects to something Osmani wrote about separately — "intent debt." An agent starts every session cold. It fills any gap in your instructions with a confident guess. A skill is intent written down on the outside. The conventions. The build steps. The "we don't do it like this because of that one incident." Written once, read forever.

4. Plugins and connectors — A loop that can only see the filesystem is a tiny loop. Connectors, built on MCP (Model Context Protocol), let the agent read your issue tracker, query a database, hit a staging API, drop a message in Slack. Both Codex and Claude Code speak MCP, so a connector written for one usually works in the other. This is the difference between an agent that says "here's the fix" and a loop that opens the PR, links the Linear ticket, and pings the channel once CI is green — all by itself.

5. Sub-agents — This is the most structurally important piece. Split the one who writes from the one who checks. The model that wrote the code is way too nice when grading its own homework. A second agent with different instructions — and sometimes a different model entirely — catches things the first one talked itself into. Codex lets you define subagents as TOML files. Claude Code does the same with .claude/agents/. The usual split: one agent explores, one implements, one verifies against the spec.

And then the sixth thing: memory. A markdown file. A Linear board. Anything that lives outside a single conversation and holds what's done and what's next. It sounds too simple to matter. But the model forgets everything between runs. The memory has to live on disk, not in context. The agent forgets. The repo doesn't.

The harness underneath

Loop engineering sits one floor above something Osmani had already been writing about: agent harness engineering. The harness is everything you build around a model — the prompts, the tools, the context policies, the hooks, the sandboxes, the subagents, the feedback loops, the recovery paths. A raw model is not an agent. It becomes one when a harness gives it state, tool execution, and enforceable constraints.

Viv Trivedy coined the term and boiled it down to a single equation: Agent = Model + Harness. If you're not the model, you're the harness.

The harness engineering mindset says: every time an agent makes a mistake, treat it as a permanent signal, not a one-off. The agent shipped a PR with commented-out tests? Add "never comment out tests; delete them or fix them" to AGENTS.md. Add a pre-commit hook that greps for .skip( and xit(. Wire a reviewer subagent that flags commented-out tests as a blocker. Every line in a good AGENTS.md should trace back to a specific thing that went wrong.

There's a data point that makes this visceral. On Terminal Bench 2.0, Claude Opus 4.6 running inside Claude Code scores far lower than the same model running in a custom harness. Viv's team moved a coding agent from Top 30 to Top 5 by changing only the harness. The model didn't change. The harness did. The gap between what today's models can do and what you see them doing is largely a harness gap.

Loop engineering is what happens when you take that harness and put it on a timer, spawn helpers inside it, and let it feed itself.

The shift in plain language

Here's the thing that makes this click. For two years, the leverage point was the prompt. Write a better prompt, get a better result. Tweak the wording, add context, try again. The agent is a tool and you're holding it.

Loop engineering says the leverage point has moved. You don't hold the tool anymore. You design the system that holds the tool. The system finds the work, assigns it, checks it, remembers it, and decides what's next. You intervene when the system can't decide — which, if you've designed it well, is not that often.

This is why Boris Cherny says his job is "writing loops" now. He's not prompting Claude to write a function. He's designing the loop that discovers what functions need writing, spawns an agent to write each one, spawns another to verify, and loops back until the goal state is satisfied.

The cobusgreyling/loop-engineering GitHub repo (618 stars and climbing) has turned this into a practical toolkit. It ships CLI tools: loop-audit to score your loop readiness, loop-init to scaffold a starter, and loop-cost to estimate token spend for your cadence. It includes seven production patterns — Daily Triage, PR Babysitter, CI Sweeper, Dependency Sweeper, Changelog Drafter, Post-Merge Cleanup, and Issue Triage — each with clone-and-run starter kits for Grok, Claude Code, and Codex.

The phased rollout advice is sensible: start at L1 (report-only, no auto-fix), graduate to L2 (assisted fixes with human gates), and only then consider L3 (unattended). Don't jump to autonomy. Earn it.

What loop engineering means for how we work

A year ago, if you wanted a loop, you wrote a pile of bash scripts and maintained that pile forever. It was yours and only yours. Now the pieces ship inside the products. Steinberger's list of what a loop needs maps almost exactly onto the Codex app. And then almost the same onto Claude Code. Once you notice the shape is the same, you stop arguing about which tool and just design a loop that works regardless of which one you're sitting in.

This is a genuine phase change. Boris Cherny doesn't prompt Claude anymore. He writes loops. Anthropic has doubled its engineering org since adopting Claude Code internally, and per-engineer productivity (merges per engineer per day) has increased 200%. New engineer ramp-up time dropped from weeks to roughly two days. The Claude Code team's own code is over 90% written by Claude Code. These aren't marginal gains. They're structural.

But Osmani is honest about the caveats. Token costs can vary wildly. Usage patterns diverge fast if you're token-rich versus token-poor. You have to be careful. This is still early. He's skeptical — and he wrote the definitive post on it.

The honest take: loop engineering works best for the work that's already well-defined. Issue triage. CI failure summaries. Dependency updates. Changelog drafting. The boring, repetitive, high-volume stuff that humans are bad at sustaining attention for. It works less well for the genuinely novel — the architecture decision nobody's made yet, the feature that requires talking to users and iterating on unclear requirements.

That's fine. The loops weren't supposed to replace judgment. They were supposed to free it up.

Where this goes next

The concept is barely two weeks old as a named thing, and the tooling is already converging. Both major coding agent platforms have all five primitives. The MCP standard means connectors written for one work in the other. The SKILL.md format is shared. The worktree patterns are the same. This isn't a vendor-specific idea. It's a structural shift in how agent work gets done.

The orange book — a community-written plain-language guide to loop engineering in Chinese and English — already has 731 stars on GitHub. That's more than the canonical reference repo itself. People are learning this fast.

What's likely coming: better multi-loop coordination (what happens when your Daily Triage loop and your CI Sweeper loop try to touch the same branch), better cost controls (the loop-cost tool is a start), and better failure mode documentation (the reference repo already has an incident-style catalog). The patterns will sharpen. The tools will abstract away more of the glue. The loops will get longer and more autonomous.

But the core idea won't change. The leverage has moved from the prompt to the system. The question isn't "what do I tell the agent?" anymore. It's "what system do I build so I never have to tell it again?"


Suggested title: Stop Prompting Agents. Start Designing Loops.

Word count: ~2,100

Fact-check notes:

  • Boris Cherny quote confirmed from Addy Osmani's June 8, 2026 blog post and the WorkOS interview summary; original source appears to be a clip shared by @rohanpaul_ai on X.
  • Peter Steinberger quote confirmed from Osmani's post; original source is Steinberger's X account (@steipete).
  • cobusgreyling/loop-engineering GitHub repo: 618 stars, 82 forks as of search results; may have changed.
  • alchaincyf/loop-engineering-orange-book: 731 stars as of search results.
  • Anthropic productivity stats (2x org, 200% per-engineer productivity increase, 90%+ code written by Claude Code, 2-day ramp-up) sourced from WorkOS interview summary of Boris Cherny's Acquired Unplugged appearance.
  • Terminal Bench 2.0 data point (Claude Opus 4.6 in Claude Code vs. custom harness, Top 30 → Top 5) sourced from Addy Osmani's harness engineering post, attributed to Viv Trivedy and HumanLayer.
  • "Agent = Model + Harness" equation attributed to Viv Trivedy.
  • Osmani's harness engineering post published on O'Reilly Radar, May 15, 2026.

Citations:

  1. Osmani, Addy. "Loop Engineering." addyosmani.com, June 8, 2026. https://addyosmani.com/blog/loop-engineering/
  2. Osmani, Addy. "Agent Harness Engineering." O'Reilly Radar, May 15, 2026. https://www.oreilly.com/radar/agent-harness-engineering/
  3. Cherny, Boris. Acquired Unplugged interview, June 2026. Key takeaways: https://workos.com/blog/boris-cherny-claude-code-acquired-interview-takeaways
  4. cobusgreyling/loop-engineering. GitHub. https://github.com/cobusgreyling/loop-engineering
  5. alchaincyf/loop-engineering-orange-book. GitHub. https://github.com/alchaincyf/loop-engineering-orange-book
  6. Trivedy, Viv. "The Anatomy of an Agent Harness." LangChain blog. https://www.langchain.com/blog/the-anatomy-of-an-agent-harness
  7. Steinberger, Peter. X/Twitter post on designing loops. https://x.com/steipete/status/2063697162748260627
  8. Cherny, Boris. Quote shared by @rohanpaulai on X. https://x.com/rohanpaulai/status/2063289804708835412