Harness Engineering: What 11 Coding Agents Look Like Inside
Back in January I wrote that the harness is what separates an agent demo from something you can actually ship. In July, a paper opened up eleven coding agents and read their source code to find out what that layer really contains.
The paper is "Harness Engineering: Anatomy, Architecture, and Evolution of Coding Agents" by Paul Barbaste, Tristan Darrigol, Germain Vu and Tom Wiltberger, from Wavestone AI Lab and Inclusive Brains. Instead of running benchmarks, the authors read the source of every system, about four million lines of Python, TypeScript and Rust, and compared how each one is built.
What they looked at
Eleven production coding harnesses: four from model vendors (Claude Code, Codex CLI, Gemini CLI and Mistral Vibe) and seven open-source ones (OpenHands, Aider, Mini-SWE-Agent, Hermes, Pi, OpenCode and OpenClaw). They also look at Databricks' Omnigent, a layer that runs other harnesses, which I'll come back to.
Their definition fits in one line: an agent is a model plus a harness. The harness is everything that isn't the model: the loop, the tools, the context, the safety controls, the orchestration, and the ways to extend it.
Seven parts every harness has
From a 100-line script to a million-line CLI, every system takes a position on the same seven parts, even when that position is "we don't have one."

The range within each part is huge. Mini-SWE-Agent has exactly one tool, bash, while Claude Code has 43 typed tools and loads most of them only when they're needed. Mini-SWE-Agent keeps its entire history in a single list, while Codex runs a sandboxed sub-agent that maintains memories across sessions in a git-tracked store. For safety, Mini-SWE-Agent has a cost limit and a step limit. Codex has policy rules, an LLM that reviews approvals, and an OS-level sandbox on three platforms.
Five things that stood out to me
1. The loop is the cheap part
Mini-SWE-Agent is about 100 lines of Python, and its authors report 74%+ on SWE-bench Verified, the same range as systems a thousand times bigger. A fancier loop doesn't buy you a better score.
So where do the other million lines go? Into safety, user experience, extensibility and, more and more, clients. In OpenCode, about three-fifths of the non-test code is clients: the TUI, web, desktop and SDK.
2. Nobody uses agent frameworks, and nobody does RAG over code
Not one of the eleven runtimes imports a general-purpose agent framework, whether LangChain, LangGraph, AutoGen, CrewAI or any of the dozen or so others they checked. Gemini CLI doesn't even use Google's own. Every loop is hand-written async code.
None of them retrieves code with vector embeddings, either. They lean on ripgrep, glob, tree-sitter, and Markdown files like
AGENTS.md and CLAUDE.md that the harness picks up on its own.A footnote in the paper points out the irony: the term "harness engineering" was defined inside LangChain, whose libraries show up in none of these runtimes. LangChain responded by building a harness of its own, Deep Agents.
3. Skills passed MCP
Nine of the eleven systems support
SKILL.md skills, one more than support MCP. Skills now come with registries and trust tiers, and the first skills written by agents themselves have started to show up.4. In 90 days, the vendors went from converging to copying
Eight of these systems were also in the paper's April edition, so the authors could diff the same code three months apart. In that window, Codex copied Claude Code's hook event names word for word and shipped an importer for Claude Code sessions and settings, OpenHands adopted Claude Code's plugin format, and Codex itself grew from 621K to about 1.12M lines of Rust.
As the authors put it: "The half-life of a competitive distinctive in this field is currently measurable in weeks."
Rules are also moving out of the prompt. Codex's newest prompts dropped the "don't commit" and "don't gold-plate" instructions in favor of feature flags, and Mistral Vibe deleted its "Never Commit" rule. Policy is moving from the prompt, where the model reads it, to configuration, where the platform enforces it.
5. The harness turned into a platform
Omnigent runs eleven vendor harnesses behind one API. A Claude Code orchestrator can hand work to Codex and ask Cursor to review it. One policy layer applies to all of them through each vendor's own hooks, and every adapter gets tested for streaming, tool calls, interrupts and policy denials. In the paper's words: "Harnesses are tested like hardware."
That's the paper's main thesis: what vendors compete on now is the ecosystem around the agent loop, meaning plugins, marketplaces, importers and governance.
What they recommend
The paper ends with 18 recommendations, each tied to code you can go read. These are the ones I'd put on a sticky note:
- Start with a while loop and one bash tool. Add a tool only when you hit a failure that needs it.
- Past about 15 tools, load them lazily. Claude Code's deferred loading makes the first prompt about 40% smaller.
- For edits with frontier models, use exact unique-string replacement. Never edit by line number.
- Pick up Markdown context files at the project and user level, and read your neighbors' file names too.
- Compact at a fixed buffer below the context limit. Keep the latest turns word for word, and merge summaries instead of starting over.
- Skip RAG over code. ripgrep and tree-sitter are enough.
- Write safety rules as data. If you offer a YOLO mode, keep a floor under it.
- Stay single-agent until you have a real breadth-first phase. Multi-agent runs burn around 15 times the tokens of a chat.
- Use skills for workflows and know-how, and MCP for external systems.
They also include a 90-line Python harness that implements ten of the 18. Here's its core loop, simplified:
What I'm taking away
In January I quoted Anthropic's advice: start with the simplest workflow that works, and add autonomy only when the problem demands it. This paper lands on the same advice, with four million lines of production code behind it. The authors point out that Anthropic's Effective Agents articles line up closely with what all eleven systems do, though only one of the eleven comes from Anthropic.
What changes for me is where I put my attention. I've read plenty about loops and orchestration patterns, but the code says the expensive work is elsewhere: permissions, sandboxes, compaction, edit formats, and the glue that lets other tools plug in.
The paper flags two caveats itself. The Claude Code analysis rests on a source snapshot that circulated in March 2026 rather than an official release, which makes it the weakest part on reproducibility. And the benchmark numbers come from each project's own reports.
The authors also make a point I want to hang on to. Inventory claims, like tool counts and version numbers, go stale in weeks. Structural claims, like the seven parts and the two things nobody uses, have held up. That's a good lens for reading any post about agents, this one included.
Paper: Paul Barbaste et al., Harness Engineering: Anatomy, Architecture, and Evolution of Coding Agents, arXiv 2609.00006, July 2026. CC BY 4.0.
Cover: Eadweard Muybridge, The Horse in Motion, 1878. "Abe Edgington," owned by Leland Stanford, driven by C. Marvin, on the Palo Alto track. A horse, a harness, and a driver. Library of Congress, public domain.