May 2026 · AI Engineering
Harness Engineering: Why the Model Stopped Being the Moat
NotebookLM Podcast
Harness Engineering: Why the Model Stopped Being the Moat
A new discipline emerged in six weeks. It explains why 88% of AI agent projects never reach production – and why that number won't drop until teams stop optimizing the wrong layer.
The Convergence
On February 5, 2026, Mitchell Hashimoto published a blog post. Hashimoto is the engineer who co-founded HashiCorp and built Terraform – tools that became the load-bearing infrastructure for how cloud teams provision computing at scale. He'd spent months working with AI agents, and he'd noticed something. Every time an agent made a mistake, the right fix wasn't to tweak the prompt. It was to change the environment. Make the mistake structurally impossible. He called this “engineering the harness.”
Six days later, Ryan Lopopolo at OpenAI published a 5,000-word writeup describing a five-month experiment: three engineers had shipped an internal beta with roughly a million lines of code, 1,500 merged pull requests, and zero manually-written code. Same idea. Different vocabulary. Anthropic, it turned out, had been using the term internally since late 2025 – referring to the Claude Agent SDK as a “general-purpose agent harness.”
Two labs that disagree on nearly everything – alignment philosophy, safety posture, deployment approach – independently arrived at the same conclusion. That's not a coincidence. That's a signal.
The thesis of this post: as frontier models converge in capability, the model is no longer the differentiator. The harness around it is. An oft-cited figure suggests 88% of AI agent projects never reach production – I'll flag below that this number is directional rather than validated research, but the underlying pattern is real. Models have gotten dramatically better over the past two years. That number hasn't moved. The bottleneck was never the model.
This post breaks down what harness engineering actually is, why the term consolidated in six weeks flat, the six components that show up in every production harness, and the engineering practices that turn the concept into something your team can actually build.

What Harness Engineering Actually Is
The formula is simple: Agent = Model + Harness. The model reasons. The harness does everything else.
The word “harness” comes from horse tack – reins, bit, saddle, bridle. The gear that makes a powerful animal useful. That's the metaphor. Set it aside; the engineering is what matters.
This is what the discipline looks like as a layer stack.
Prompt engineering (2022–24) optimized a single turn. You found the phrasing, the examples, the instruction format that got the model to output what you wanted in one shot. It worked well for isolated tasks.
Context engineering (2025) stepped up. It asked: what should the model see on each turn? RAG (retrieval-augmented generation – feeding relevant documents to the model at query time), memory compression, MCP servers (Model Context Protocol – a standard for connecting agents to external data sources). Andrej Karpathy formalized the term; Anthropic gave it structure. Context engineering is about retrieval and compression applied per turn.
Harness engineering (2026) is the next abstraction up. It doesn't optimize a turn. It doesn't optimize what the model sees on a turn. It designs the world the agent operates in across hundreds or thousands of turns – the persistent rules, the tools it can reach, the sensors monitoring its behavior, the feedback loops that let it self-correct. Prompt engineering and context engineering are both subsumed by the harness. They're components of it, not competitors.

The working definition: harness engineering is the discipline of designing the execution environment around an autonomous AI agent – the tools it can call, the guides it reads at startup, the sensors that catch its mistakes, the constraints that limit its blast radius, and the feedback loops that let it self-correct.
AI Engineer's Take: The model is the brain. The harness is the body, the nervous system, and the world it lives in. We spent three years obsessing over the brain. We're finally noticing that without the rest of the system, the brain is a science project – impressive in a lab, useless in production.
Why the Term Consolidated in Six Weeks
Three things had to line up for “harness engineering” to stick as a discipline rather than dissolve into the usual churn of AI terminology.
First, the problem was already universal. Every team building agents in 2025 had hit the same wall: single-turn prompts work, RAG works for retrieval, but neither addresses what happens when an agent runs for six hours making hundreds of tool calls without supervision. By the time Hashimoto wrote his post, most engineering teams had already built some version of a harness – they just called it “extra scaffolding” or “tooling” or “prompt tuning.” The discipline existed before the name did.
Second, the naming happened fast and from credible sources simultaneously. February 5: Hashimoto's post. February 11: Lopopolo at OpenAI. Mid-February: Ethan Mollick reorganized his public AI framework around “models, apps, and harnesses.” Martin Fowler published analysis. Late February: Anthropic published “Effective harnesses for long-running agents,” formalizing what had been internal practice. Six weeks, four credible sources, one converging vocabulary.
Third – and this is the one that mattered most – the timing matched the model commoditization curve. By early 2026, GPT-5, Claude Opus 4.5, and Gemini 3 were close enough in capability that model selection had stopped being the differentiator for most agent use cases. Teams weren't asking “which model should we use?” anymore. They were asking “why does our agent fail in production when it works in demos?” The harness was the answer that had been hiding in plain sight.
AI Engineer's Take: Naming a discipline is a forcing function. Before the name existed, every team solved harness problems ad-hoc and called the solutions something different. Once the name existed, teams could build org structures, hiring pipelines, and curriculum around it. The vocabulary changed what the work looked like – and who was responsible for it.
The Six Components of a Production Harness
This is the engineering core. Every production harness I've seen, across teams and companies and use cases, has some version of all six.

1. Guides
Guides are the files the agent reads at startup. AGENTS.md, CLAUDE.md, .cursorrules – depending on your toolchain. Think of them as the project's standing instructions: what the codebase does, how the build system works, what commands to run, what the agent has consistently gotten wrong.
Hashimoto's AGENTS.md for Ghostty (a terminal emulator project) is the canonical artifact. Every line corresponds to a specific failure mode he'd already seen. OpenAI explicitly calls these files the “system of record” – the single source of truth for agent behavior in a repository.
One critical pattern: don't write one giant AGENTS.md. Augment Code ran a study and found the performance sweet spot is 100–150 lines with separate reference documents the agent loads on demand. Past that threshold, performance reversed. The fix is to treat AGENTS.md as a table of contents, not an encyclopedia. Project knowledge lives in a structured docs/ directory; the guide is the entry point.
2. Tools
Tools are what the agent can call – bash commands, file editors, MCP servers, search interfaces. This is the agent's reach into the world.
Anthropic's position here is concrete: “bash is all you need.” The terminal is the most general-purpose interface humans have built. Giving an agent the same tools a developer uses – the shell, the file system, the test runner – turns out to be more effective than building custom AI-specific APIs for each operation. The agent already knows how to use these tools because it was trained on code that uses them.
The empirical constraint that keeps showing up: keep fewer than 20 tools available to an agent at once. Accuracy degrades noticeably past 10. More tools doesn't mean more capable – it means more confused.
3. Sensors
Sensors are the mechanisms that catch when something has gone wrong. Linters, type checkers, test runners, output validators, telemetry – the observability layer for agent behavior.
Anthropic identified something they call “context rot” and correctly diagnosed it as a sensor problem, not a model problem. Over a long session, the agent's context window accumulates stale information, outdated state, and contradictory instructions. Without a sensor monitoring context quality, outputs degrade silently. The agent keeps producing results; they just get worse. The fix isn't a more capable model – it's a sensor that detects when context quality has dropped below the reliability threshold and triggers a response.
This reframing matters. If you're watching your agent produce increasingly bad outputs after 90 minutes of runtime and blaming hallucination, you're probably looking at context rot. That's an instrumentation problem.
4. Feedback Loops
Feedback loops are what the harness does when a sensor fires. Retry strategies, sub-agent escalation (routing to a more capable or specialized agent), human-in-the-loop triggers, context compaction, full session restart.
Compaction is worth explaining precisely: when the agent's context approaches the window limit, the harness compresses prior conversation into a summary so work can continue. Anthropic's writeups are honest about the practical constraint here – nominal 200,000-token context windows have an effective working context of roughly 60,000–80,000 tokens during active agent execution. The rest is overhead. Engineers building persistent sessions have to account carefully for what survives compaction and what doesn't. The feedback loop design determines whether an agent that runs for four hours produces coherent output at hour four or starts repeating itself.
5. Constraints
Constraints define what the agent can and can't touch. Permission scopes, sandboxes, allowlists, filesystem boundaries. The agent can edit these directories, not those. It can run these commands, not those. It can call these APIs, not those.
The instinct is to frame constraints as the safety layer – and they are – but they're also a productivity layer. Constraining the solution space paradoxically increases agent reliability. When the agent can reach everything, it will occasionally reach for the wrong thing. A well-designed constraint set doesn't just prevent harm; it focuses attention. Anthropic put it plainly: constraints help the agent stay on task.
6. Context Management
Context management is the harness component with no prior art in human engineering. Compaction, memory persistence, session handoff across context windows.
Anthropic's framing for why this is hard: imagine a software project staffed by engineers working in shifts, where each new engineer arrives with no memory of what happened on the previous shift. That's an autonomous agent across context window boundaries. The agent doesn't remember the decisions it made four compactions ago. It doesn't know what it already tried.
The architectural answer is progressive disclosure – a three-tier loading pattern. Agent metadata (short summaries of available skills and tools) loads at startup: roughly 50–100 tokens per skill. Full skill instructions load on activation, when the agent actually needs them. Deep reference docs load only when the task requires that level of context. A 133-skill session uses roughly 7,000–13,000 tokens for all metadata combined, versus hundreds of thousands for all full skill bodies. That's the difference between an agent with broad capability and an agent with degraded attention from the start.
AI Engineer's Take: Five of these six components look like things we've been building for human engineering teams for two decades. Linters are sensors. CI pipelines are feedback loops. ACLs are constraints. The READMEs in your repo are guides. The only genuinely new component is context management – because humans don't have token windows. This is why senior engineers pick up harness engineering quickly and why it's harder for juniors than prompt engineering was. The discipline rewards people who've already debugged a production incident at 3 AM and know which failure modes are worth engineering around versus which ones you catch with a monitor.
Hashimoto's Rule: The Operational Practice That Makes the Moat Compoundable
Every failure is a harness improvement waiting to happen.
Hashimoto's rule, stated cleanly: every time the agent makes a mistake, engineer the environment so it can never make that mistake again. Don't patch the prompt. Don't retry with a different phrasing. Fix the world the agent lives in.
This is the reframing that matters. A failed test is a missing sensor. A wrong tool call is a missing constraint. A hallucinated function signature is a missing guide. The failure is real; the diagnosis just changes. And the fix becomes structural instead of temporary.
This is what turns the harness into a moat. Every failure pushes a permanent improvement into the environment. That improvement compounds. The harness gets sharper not because the model gets better, but because every bug produces an upgrade in the system surrounding the model. Hashimoto's AGENTS.md for Ghostty is the artifact of this practice – a file that got denser and more reliable over months of production debugging.
OpenAI's team arrived at the same principle from a different direction. Their writeup describes early failures in the five-month experiment as the environment being “underspecified” – not Codex being incapable. The agent had the intelligence to do the work. The harness didn't have the structure to direct it. Their response wasn't to switch models or improve prompts. It was to specify the environment more precisely. The team's job shifted: instead of writing code, they designed environments, specified intent, and built feedback loops.
Same discipline. Hashimoto calls it engineering the harness. OpenAI calls it enabling the agents to do useful work. The operational practice is identical.
AI Engineer's Take: The teams whose agents get better over time are the ones pushing every fix down into the environment rather than patching prompts and moving on. That's what makes harness engineering compoundable in a way model selection isn't. You can't accumulate moat by picking a better model – that's a one-time advantage anyone can replicate in an afternoon. You accumulate moat by building a harness that gets sharper every week.
Why 88% of Agent Projects Die
The 88% figure – the claim that 88% of AI agent projects never reach production – appears across nearly every harness engineering writeup published since March 2026. I can't trace it to a primary research methodology; most sources cite each other or cite it without attribution. Treat it as directional, not validated. The underlying pattern it describes, though, is structurally real.
Here are the failure modes that show up repeatedly in post-mortems and engineering writeups:
Missing guides. The agent starts every session with no project context. It learns the codebase by making mistakes, which costs time and produces errors.
Missing sensors. Errors compound silently. The agent proceeds with bad state because nothing is watching for the signal that something went wrong three tool calls ago.
Absent governance. No defined rules about what the agent can and can't do. The blast radius of a bad decision is unbounded.
Poor data quality. The agent's inputs are noise – inconsistent, unstructured, contradictory. The model can't reason reliably on bad inputs regardless of capability.
Over-engineered control flows. Too much orchestration, not enough autonomy. Teams build elaborate state machines that route every decision through a human approval step, then wonder why throughput is low.
Underestimated integration complexity. The agent can't actually reach the systems it needs – authentication is broken, APIs are undocumented, data formats don't match. These aren't AI problems. They're integration problems that surface under agent automation.
Misaligned success metrics. The team optimizes for demo quality – “look at this impressive output” – rather than production reliability – “does this output 98% of the time without supervision.”
Every single one of these is a harness failure. None of them require a better model.
OpenAI's team admitted this explicitly: early progress in their five-month experiment was slower than expected, not because Codex couldn't code, but because the environment was underspecified. The agent had the capability. The harness didn't have the structure. Once they built the structure, throughput hit roughly 3.5 pull requests per engineer per day – at roughly 1/10th the time their team estimated the manual equivalent would have taken. (Both numbers are self-reported and unverified externally, but the directional claim is consistent with what other teams report.)
AI Engineer's Take: The 88% number is directional, but the structural claim is sound. As models keep improving, the gap between demo and production won't close until teams stop investing in model selection and start investing in harness maturity. Writing AGENTS.md files, building linters, instrumenting telemetry – this is the unglamorous work. It's also the work that actually ships.
What This Means for How You Build
Three tiers, depending on where you are.
If you're a solo developer: The lowest-effort thing you can do today is write an AGENTS.md at the root of your project. Three sections to start: project structure, build and test commands, and “things the agent keeps getting wrong.” Add a line every time the agent makes the same mistake twice. Inside a month, you'll have a project-specific collaborator that's materially more reliable than it was on day one. This is Hashimoto's rule operationalized at the smallest scale.
If you're on a team: The highest-leverage move is sensors. Most teams already have linters, type checkers, and test runners. The problem is they don't pipe the output back into the agent's loop. Wire that feedback in – make the test runner output part of what the agent sees when a test fails – and the agent starts catching its own mistakes before you do. Then apply progressive disclosure: once your AGENTS.md crosses 150 lines, split it. The main file becomes a table of contents. The detail lives in referenced documents the agent loads when it needs them.
If you're building products on top of agents: The long-term play is that the harness becomes your IP. Models will keep improving. API prices will keep dropping. The only thing that's uniquely yours is the accumulated set of guides, sensors, constraints, and feedback loops you've engineered around your specific domain. Treat your harness like a codebase – version it, test it, refactor it. Because that's what it is.
This is what harness engineering is actually doing for the field at a higher level: it's making AI agents legible. A prompt is a black box. A harness is a system you can read, debug, audit, and hand to someone else. That's what turns “AI” from a vibe into engineering.
AI Engineer's Take: The uncomfortable open question is that nobody knows how to teach this yet. Prompt engineering had a learning curve you could climb in a weekend with a few good tutorials. Harness engineering requires you to have already built production systems, already seen things fail at scale, already have the instinct for which failure modes are worth structurally preventing versus which ones you catch with a monitor. It might be the first AI discipline that's genuinely harder for new engineers than for experienced ones. The curriculum doesn't exist. We're all learning by stumbling.
The Load-Bearing Layer
Two labs that disagree on almost everything converged on the same architectural conclusion in six weeks. That's the signal worth paying attention to.
The model isn't the moat anymore. The harness is. The boring, unglamorous engineering work – guides that capture institutional knowledge, sensors that catch silent failures, constraints that define the blast radius, feedback loops that let the agent self-correct, context management that keeps behavior coherent across hours of autonomous execution – this is now the load-bearing layer for the next decade of AI agents.
It doesn't make Hacker News. It's not what gets demoed at conferences. But it's the difference between teams that ship and teams that keep scheduling one more demo.
Whoever figures out how to teach this discipline first will define what the next generation of AI engineers actually looks like.
Built by an AI Engineer. Not a journalist.