AI engineering terms

Loop engineering vs harness engineering: a plain map

By Christian Vismara ·

Loop engineering is designing the cycle a coding agent repeats until a stop condition is met. Harness engineering is building everything around the model that lets it do useful work: instructions, tools, permissions and checks. A software factory runs many of those loops at once, fed by a queue of work and passed through a review step. A dark factory is a software factory where no human reads the code before it goes to production.

So the four terms nest inside each other: a loop always runs inside a harness, and the other two describe how many loops run and who reviews them.

I'm Christian Vismara, co-founder and CTO of Digital Kitchen. I use the first three in my daily setup, and the table below shows where each term appears in my work, or doesn't. The setup itself is described in how I run a software factory with Claude Code.

The terms side by side

TermWhat it meansWho made it popularWhere it shows up in my work
LoopAn agent repeating cycles of work until a stop condition is metAgent loops existed before 2026. This definition is from Anthropic's Claude Code team, June 2026A long run that keeps going until every task has a pull request or is blocked
Loop engineeringDesigning loops that prompt your agents, instead of prompting them by handPeter Steinberger, then Addy Osmani and Andrew Ng, June 2026The goal I write for a long run: several ways to stop, and a status report every turn
Harness engineeringBuilding the environment around the model: instructions, tools, permissions, checksOpenAI, February 2026; Birgitta Böckeler on martinfowler.comA 210-line rules file, project instruction files, reusable skills, and lessons saved as notes
Software factoryMany harnessed loops at once, fed by a queue and passed through a review stepAI meaning: Dan Shapiro, StrongDM, Addy Osmani, Zach Lloyd, 2026About 830 sessions in 30 days across all my work. Sessions that build in parallel get their own git worktrees, and my rules ask for a fresh reviewer before a standard or critical change merges
Dark factoryA factory where code reaches production without any human reading itA manufacturing term, applied to code by Dan Shapiro (his level 5). StrongDM's rules describe working this wayI don't run one. Risky changes always wait for me

Loop engineering, in plain words

Anthropic's Claude Code team defines loops as "agents repeating cycles of work until a stop condition is met." Addy Osmani describes loop engineering as replacing yourself as the person who prompts the agent: you design the system that does the prompting instead.

Andrew Ng widened the idea in The Batch to three loops that run at different speeds when you build a new product:

LoopHow long one round takesWhat happens in it
Agentic coding loopMinutesThe agent writes code, runs the checks, and fixes what failed
Developer feedback loopHoursA developer looks at the result and changes the direction
External feedback loopDays or weeksReal users react, and the team decides what to build next

In my own work, the part of loop engineering that matters most is the stop condition. A loop that can only end with "done" will eventually claim it is done when it isn't. So every long run I set has more than one way to end: all tasks have an open pull request, or a set number of rounds has passed, or the only work left needs a decision from me. Each round also has to report what it finished, with evidence like test output, so a fake "done" is easy to spot.

Harness engineering, in plain words

Birgitta Böckeler at Thoughtworks puts it simply: the harness means "everything in an AI agent except the model itself". That covers the instruction files the agent reads, the tools it can call, what it is allowed to do, and the checks its work must pass.

The term took off after OpenAI's February 2026 post, where a team built and released an internal product with no code written by hand. Their summary of the new division of labor is four words: "Humans steer. Agents execute." They also describe the instructions file at the root of the repository as a table of contents that points to deeper documents, rather than one huge manual.

One research result is useful here. A study from ETH Zurich, Evaluating AGENTS.md, found that instruction files did not generally help agents solve more tasks and raised the average cost of a run by more than 20%, both for files generated by an AI and for files written by developers. Instructions about unusual project practices helped; overviews of the repository did not. So my main rules file holds only what an agent can't work out from the code: hard stops, how to report, how to write. A rule goes in after a real mistake.

Software factories and dark factories

The software factory definition in the table is Addy Osmani's. What a factory costs and when it pays off are covered in what is an AI software factory.

The dark factory is the top of Dan Shapiro's six levels, and StrongDM's published rules describe working that way. Osmani contrasts it with the same pipeline "with the lights left on where judgment lives", which is close to how I work: machines review the routine changes, and the risky ones also wait for my approval.

Are these just new names for old ideas?

Partly, and it's fair to say so. Harness engineering looks a lot like platform engineering, and tests, CI, permissions and code review were all around long before coding agents.

What changed is the worker. An agent reads plain-language instructions, fails in ways a person wouldn't, and can run twenty copies at once. That raises the value of the old practices: a weak test suite was annoying with people, and it becomes dangerous with twenty agents trusting it.

There is also a fair critique of the whole direction. Dex Horthy, who founded HumanLayer, argues that no amount of harness engineering can fix what is really a limit of the models themselves. I go through that argument, and what held up for me, in why software factories fail.

Which words to use with your team

Buzzwords age fast. On Hacker News, story titles with "loop engineering" went from 19 in July 2026 to almost none by the autumn. With a team, I'd use plain names for the parts instead: the rules file, the stop condition, the review step, the hard stops. Everyone understands those, and they will still make sense next year.

If you're about to roll agents out to a whole team, the practical steps are in Claude Code for teams.

Frequently asked questions

What is loop engineering?

Loop engineering is designing the cycle a coding agent repeats until a stop condition is met, instead of prompting the agent by hand at every step. The work is in choosing the task, the checks the agent runs each round, and the conditions that end the loop.

What is harness engineering?

Harness engineering is building everything around the AI model that lets it do useful work: the instructions it reads, the tools and permissions it has, the checks it must pass, and the documentation it can find. Birgitta Böckeler at Thoughtworks describes the harness as everything in an AI agent except the model itself.

What is the difference between loop engineering and harness engineering?

The loop is the cycle the agent repeats and the rule that stops it. The harness is the environment the agent works in. A loop runs inside a harness. You can have a good harness and a bad loop (the agent has the right tools but never knows when to stop), or the opposite.

What is a dark software factory?

It is a software factory where no human writes or reviews the code before it goes to production. Dan Shapiro borrowed the name from fully automated factories in manufacturing and used it for the top of his six levels of AI-assisted coding, and StrongDM published rules for working this way. Many published examples, including the Claude Code team at Anthropic, keep humans in the review step for risky changes.

Is harness engineering just platform engineering with a new name?

Partly. Tests, CI, code review and permissions are old ideas. What is new is the worker: it reads plain-language instructions, makes different mistakes than a person, and can run many copies at once. That makes the old practices matter more, and it adds new ones, like writing instructions an agent will follow.

Want the next new term explained when it shows up?

One email a week on what the AI labs released and what it means for teams that build software. Free, and you can leave whenever. If you'd rather talk about your own setup, book a call.