# Loop Engineering Needs Somewhere for the Loops to Run

When people stop prompting agents and write loops, the loop is infrastructure: a machine off your laptop, isolation per run, a wake-up and a record of each pass.

Muqsit Nawaz, 2026-07-01

![An old stone archway opening onto a sunlit courtyard, the passage floor cobbled and in shade.](/hero-loops-need-somewhere-to-run.webp)

On June 2, Boris Cherny, who leads Claude Code at Anthropic, told an interviewer he no longer prompts Claude. "I have loops that are running," he said. "They're the ones that are prompting Claude and kind of figuring out what to do. My job is to write loops." ([Acquired Unplugged with WorkOS, June 2, 2026](https://www.youtube.com/watch?v=RkQQ7WEor7w&t=704s).) Five days later Addy Osmani gave the practice a name, [loop engineering](https://addyosmani.com/blog/loop-engineering/), and by June 10 [The New Stack](https://thenewstack.io/loop-engineering/) was mapping its building blocks onto both Claude Code and Codex.

I have been writing loops for months, and here is what I learned the slow way. Once a person stops prompting and starts writing loops, the loop becomes infrastructure. It needs a machine that is not the founder's laptop, isolation for each run, a wake-up when the agent stops, and a record of what every iteration did. The model was never what broke. Those four things were.

## Three stages, and who holds the work at each

Cherny described the change in three steps in the same interview. A year ago he wrote code by hand with autocomplete in an IDE. By November he had uninstalled the IDE because he had not opened it in a month, and he was running five to ten Claude sessions in parallel, prompting each one himself. Now loops do the prompting.

The middle stage was already enormous. In late December he [posted](https://twitter.com/bcherny/status/2004887829252317325) that in the previous thirty days he had landed 259 pull requests, 497 commits, 40,000 lines added and 38,000 removed, and that every line was written by Claude Code with Opus 4.5 ([quoted by Simon Willison, December 27, 2025](https://simonwillison.net/2025/Dec/27/boris-cherny/)).

<figure class="lnsr-fig">
<svg viewBox="0 0 360 430" role="img" aria-labelledby="lnsr-stages-title lnsr-stages-desc">
<title id="lnsr-stages-title">Three stages of working with a coding agent</title>
<desc id="lnsr-stages-desc">Stage one, a year ago: code by hand with autocomplete; the person types every line. Stage two, November 2025: five to ten sessions prompted by hand; the person is the scheduler. Stage three, June 2026: loops prompt the agent; the infrastructure has to hold the work.</desc>
<text class="lnsr-eyebrow" x="20" y="26">WHO KEEPS THE WORK GOING</text>
<rect class="lnsr-box" x="20" y="44" width="320" height="104" rx="10"/>
<text class="lnsr-k" x="38" y="72">1 · A YEAR AGO</text>
<text class="lnsr-h" x="38" y="98">Autocomplete in an IDE</text>
<text class="lnsr-s" x="38" y="124">The person types every line.</text>
<line class="lnsr-edge" x1="180" y1="148" x2="180" y2="172"/>
<rect class="lnsr-box" x="20" y="172" width="320" height="104" rx="10"/>
<text class="lnsr-k" x="38" y="200">2 · NOVEMBER 2025</text>
<text class="lnsr-h" x="38" y="226">5 to 10 sessions, prompted by hand</text>
<text class="lnsr-s" x="38" y="252">The person is the scheduler.</text>
<line class="lnsr-edge" x1="180" y1="276" x2="180" y2="300"/>
<rect class="lnsr-gold" x="20" y="300" width="320" height="104" rx="10"/>
<text class="lnsr-kg" x="38" y="328">3 · JUNE 2026</text>
<text class="lnsr-hg" x="38" y="354">Loops prompt the agent</text>
<text class="lnsr-sg" x="38" y="380">The infrastructure holds the work.</text>
</svg>
<figcaption>Cherny's three stages, from the <a href="https://www.youtube.com/watch?v=RkQQ7WEor7w&amp;t=671s">June 2, 2026 interview</a>. The right-hand line in each box is my reading of who keeps the work moving.</figcaption>
</figure>

Look at what the person was doing in stage two besides prompting. They kept the machine awake. They kept ten sessions from touching the same files. They noticed when a session went quiet and decided whether it had finished or given up. They remembered which session had tried what. None of that was written down anywhere, because the person was doing it with their eyes.

Stage three removes the person from the seat, and every one of those chores still needs an owner.

## The laptop was the first thing to go

My first loops ran on my laptop, because that is where the terminal was. It lasted about as long as it takes to learn two lessons. Agent windows stole focus while I was typing in something else. A full test suite started by an agent froze the machine I was using to read its output. A loop and a person cannot share one computer for long: the person wants it quiet and responsive, and the loop wants every core.

So I moved the agents onto a few spare machines and took my own laptop out of the pool on purpose. It is the one place no agent is allowed to run. That sounds like housekeeping. It turned out to be the first piece of infrastructure, because the moment the loop lives somewhere else, you need a way to start work there, see it, and stop it without walking over.

## Each iteration gets its own room

The second thing that broke was isolation. Two iterations of the same loop, or two loops pointed at one repository, will eventually edit the same file, install conflicting dependencies, or leave a half-finished branch for the next run to trip over. Osmani's list of loop primitives puts worktrees second, right after scheduled automations, so that parallel agents stay out of each other's way, and The New Stack's table shows both vendors shipping a worktree per thread or per subagent.

A worktree separates files. A loop that runs unattended also needs its processes, ports, credentials and network kept apart, because the iteration you are not watching is the one that runs `rm` in the wrong directory. The unit of isolation that matches a loop is the iteration: one fresh, disposable machine per run, thrown away or parked when the run ends, so a bad iteration cannot poison the next one.

## Agents stop, and something has to notice

The third failure is the one nobody warns you about. Agents stop on their own. They end a turn, decide the job is done, or wait politely for an answer nobody is there to give. In stage two a person sees the idle window. In stage three the loop sits there until morning.

Two mechanisms carry most of my weight here. The first is a stop-hook: when an agent tries to end its session while its pull request is still open, the hook refuses and tells it what is left. The second is a timed wake-up that re-invokes the same session later, with its full context, to check on a team of agents it dispatched. Both vendors now ship a version of the first idea: a `/goal` command that keeps an agent working until a verifiable stopping condition holds, [per The New Stack](https://thenewstack.io/loop-engineering/). The second still needs a scheduler that can reach a session after its process has exited.

<figure class="lnsr-fig">
<svg viewBox="0 0 360 520" role="img" aria-labelledby="lnsr-loop-title lnsr-loop-desc">
<title id="lnsr-loop-title">One iteration of a loop, and where each piece runs</title>
<desc id="lnsr-loop-desc">A trigger on a schedule or an event starts the iteration. The agent works in a fresh isolated machine. A stop check refuses to end while the work is unfinished, and a timed wake-up re-invokes the session later. A record of the trajectory is written, and the next trigger reads it. None of these pieces runs on the person's laptop.</desc>
<text class="lnsr-eyebrow" x="20" y="26">ONE ITERATION, OFF THE LAPTOP</text>
<rect class="lnsr-box" x="20" y="44" width="320" height="76" rx="10"/>
<text class="lnsr-h" x="38" y="74">Wake</text>
<text class="lnsr-s" x="38" y="98">A schedule, an event, or a timed check-in</text>
<line class="lnsr-edge" x1="180" y1="120" x2="180" y2="144"/>
<rect class="lnsr-gold" x="20" y="144" width="320" height="96" rx="10"/>
<text class="lnsr-hg" x="38" y="174">Fresh machine for this run</text>
<text class="lnsr-sg" x="38" y="198">Own files, processes, ports, credentials.</text>
<text class="lnsr-sg" x="38" y="220">Thrown away or parked when it ends.</text>
<line class="lnsr-edge" x1="180" y1="240" x2="180" y2="264"/>
<rect class="lnsr-box" x="20" y="264" width="320" height="96" rx="10"/>
<text class="lnsr-h" x="38" y="294">Stop check</text>
<text class="lnsr-s" x="38" y="318">PR still open? Refuse the stop.</text>
<text class="lnsr-s" x="38" y="340">Quiet too long? Wake the session.</text>
<line class="lnsr-edge" x1="180" y1="360" x2="180" y2="384"/>
<rect class="lnsr-box" x="20" y="384" width="320" height="76" rx="10"/>
<text class="lnsr-h" x="38" y="414">Record</text>
<text class="lnsr-s" x="38" y="438">Every prompt, tool call and result</text>
<path class="lnsr-edge" d="M340 422 H350 V82 H340"/>
<text class="lnsr-cap" x="180" y="494" text-anchor="middle">The next wake reads the last record.</text>
</svg>
<figcaption>The four pieces a loop needs once nobody is watching it. The gold box is the piece my first loops were missing.</figcaption>
</figure>

## The record is the part you read later

The last piece is the one you only miss afterward. A loop that runs while you sleep ships changes you did not watch being made. The New Stack's summary of Osmani's warning calls the result comprehension debt: the gap that widens when a system ships code you never read, and the same article notes that "a loop running unattended is also a loop making mistakes unattended."

When something goes wrong in iteration forty, a final diff tells you what changed. It does not tell you what the agent read, which command failed first, or why it chose the fix it chose. For that you need the trajectory: every prompt, tool call and result, kept per iteration, so you can open the one that went sideways and read it like a log. Memory files help the next run resume. The trajectory helps the person who owns the loop understand the last one.

The New Stack makes a useful distinction here: the scheduling layer of a loop is often plain cron, but "a cron job runs a fixed script, while a loop runs a model that reads the current state and chooses its next action." Cron could get away with a log line because the script was the same every night. A loop's iteration can do something new each time, so it needs to be kept apart while it runs and recorded in full afterward.

## What changes when the loop is the unit

I wrote in April that agents make an organization's [judgment loops executable](/blog/agents-are-eating-the-org-chart): signal, plan, critique, implement, verify, ship. Loop engineering is that idea arriving at the level of one engineer's day. And as with every workflow shift, most of the value sits in the work around the model, the workflow bet from [the three-bet era](/blog/the-three-bet-era). BCG's [10/20/70 rule](https://www.bcg.com/publications/2020/leveraging-artificial-intelligence-for-it-operations) (October 19, 2020) puts numbers on it: AI is 10% algorithms, 20% technology and 70% business process transformation.

The questions change with it. In stage two you ask which model to prompt. In stage three you ask where the loop lives, what keeps one iteration away from the next, what happens when the agent goes quiet, and where you will read what it did.

## Where Rush fits

This is the problem we build Rush for. A run is a request: an agent does the work in a cloud sandbox (a pod on our cluster) with its own git worktree and a headless browser, and the result comes back with proof, a PR with checks for code, plus the full trajectory of what the agent did. A follow-up continues the same run, so a loop can come back to where it left off instead of starting cold, and you can cancel while it works. A run that is missing its proof ends as `needs_review`. The laptop stays out of it.

Cherny's job is to write loops. Somebody's job is to give them a machine, a wall between iterations, an alarm when they stop, and a log you can read in the morning.

<style>
.lnsr-fig { margin: 40px auto; max-width: 520px; }
.lnsr-fig svg { display: block; width: 100%; height: auto; font-family: Inter, system-ui, sans-serif; }
.lnsr-fig .lnsr-eyebrow { font-family: var(--font-display), Jost, sans-serif; font-weight: 500; font-size: 12px; letter-spacing: 0.24em; fill: var(--t-caption, #665E52); }
.lnsr-fig .lnsr-box { fill: color-mix(in srgb, var(--t-text, #141829) 6%, transparent); stroke: var(--t-edge, #DCD2C3); stroke-width: 1; }
.lnsr-fig .lnsr-gold { fill: #C9A962; }
.lnsr-fig .lnsr-edge { stroke: color-mix(in srgb, var(--t-text, #141829) 45%, transparent); stroke-width: 1.5; fill: none; }
.lnsr-fig .lnsr-k { font-family: var(--font-display), Jost, sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.2em; fill: var(--t-caption, #665E52); }
.lnsr-fig .lnsr-kg { font-family: var(--font-display), Jost, sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.2em; fill: #141829; opacity: 0.75; }
.lnsr-fig .lnsr-h { font-size: 17px; font-weight: 500; fill: var(--t-text, #141829); }
.lnsr-fig .lnsr-hg { font-size: 17px; font-weight: 600; fill: #141829; }
.lnsr-fig .lnsr-s { font-size: 14px; fill: color-mix(in srgb, var(--t-text, #141829) 70%, transparent); }
.lnsr-fig .lnsr-sg { font-size: 14px; fill: #141829; }
.lnsr-fig .lnsr-cap { font-size: 13px; fill: var(--t-caption, #665E52); }
.lnsr-fig figcaption { font-size: 14px; line-height: 1.5; color: var(--t-caption, #665E52); text-align: center; margin-top: 14px; }
</style>
