Back to Articles
Article
agentsmodelsarchitecture

What is an AI harness? And why you should care (a lot).

ChatGPT Image Aug 2, 2026, 03_53_18 PM.png

A car engine is a feat of engineering, and on its own it moves nothing. Set it on the garage floor and it will sit there, idling to no purpose. It needs a chassis to live in, a transmission to turn its power into motion, wheels to meet the road, a steering column so that force arrives where the driver wants it. The engine supplies the power. Everything else supplies the car. We have spent years admiring the engine and calling it the automobile.

For most of the last couple of years, the question "how good is this AI?" collapsed into a question about the (large language) model. We compared parameter counts, benchmark scores, context lengths, the pedigree of the lab. The model was the machine, and everything around it was plumbing. That habit is now getting in the way of understanding where capability actually comes from, because the same model, wrapped in two different pieces of software, will behave like two different workers. One finishes a week-long refactor. The other loses the thread after twenty minutes and cheerfully reports that it is done.

The software doing the wrapping has a name that practitioners settled on in early 2026: the harness. The shorthand that spread with it is deceptively simple. An agent is a model plus a harness, and if you are not the model, you are the harness. The formula looks like an accounting trick until you sit with what it implies. Half of what we call an "agent" is not the neural network at all. It is ordinary, deterministic code, and it turns out to carry a surprising share of the intelligence we attribute to the whole.

The Model Is Only Half the Agent

A language model, on its own, does very little. It takes text in and produces text out. It has no memory between calls, no loop, no hands. It can express the intent to run a command, but it cannot run it. Ask it to build an application and it will describe one. Ask it to fix a failing test and it will guess at the fix, with no way to run the test and see.

Everything that turns that stateless text-predictor into something that acts belongs to the harness. Vivek Trivedy of LangChain defines it as every piece of code, configuration, and execution logic that is not the model itself: the system prompt, the tools and their descriptions, the sandbox the tools run in, the orchestration logic that spawns subagents and routes work, and the middleware that quietly manages what the model sees. The cleanest way to draw the line is to ask what the model cannot do unaided. It cannot hold durable state, execute code, reach real-time knowledge, or set up an environment to work in. Each of those absences is filled by a harness feature, deliberately designed.

The pattern is older than the name. A model alternating between reasoning and acting in a loop was formalized in the ReAct framework in 2023. The ability of a model to call external tools at all was demonstrated in Toolformer the same year. What changed in 2026 was that the scaffolding around the model grew elaborate enough, and consequential enough, to deserve a discipline of its own.

What the Harness Actually Holds

The most foundational primitive is the least glamorous one: a filesystem. It sounds like an afterthought until you notice how much it unlocks. A filesystem gives the agent a workspace to read and write, a place to offload information that no longer fits in the context window, and a way to persist work that outlasts a single session. Add git on top and the agent can version its own work, roll back a bad change, and hand a clean history to whatever comes next. Much of the recent progress in long-running agents is really progress in teaching a model to treat the disk, rather than its context window, as the seat of memory.

On top of storage sits execution. Rather than force a builder to hand-craft a tool for every possible action, modern harnesses ship a general-purpose one: a bash shell and the ability to write and run code. The model can then invent its own tools on the fly instead of waiting for a human to anticipate them. That execution has to happen somewhere safe, which is the job of the sandbox: an isolated environment where code can run, dependencies can install, and a mistake stays contained. Good sandboxes come pre-stocked with the boring essentials (language runtimes, test runners, a browser), so the agent can not only act but check its own work.

Then there is the harder, quieter problem of keeping the model coherent as a task drags on. Models degrade as their context window fills, a phenomenon practitioners now call context rot, and a harness spends much of its effort fighting it. Compaction summarizes and offloads the transcript before the window overflows. Large tool outputs get trimmed to their head and tail, with the full text parked on disk in case it is needed. Instructions that would otherwise flood the context on startup are disclosed progressively, only when relevant. None of this is reasoning. All of it changes how well the reasoning holds up.

ChatGPT Image Aug 2, 2026, 03_29_30 PM.png

A Worked Example: Engineers Working in Shifts

The clearest picture of why any of this matters comes from a piece of engineering that Anthropic published in late 2025, on getting an agent to build a nontrivial application over many hours. Their framing is the one worth stealing. Imagine a software project staffed by engineers who work in shifts, where each engineer arrives with no memory of the previous shift. That is exactly the situation of a long-running agent, because every new session begins with a fresh context window and no recollection of what came before.

Anthropic gave a frontier model a deliberately underspecified prompt, "build a clone of claude.ai," and ran it in a loop. Out of the box, it failed in two revealing ways. First, it tried to do everything at once, ran out of context mid-implementation, and left a feature half-built and undocumented for the next session to puzzle over. Second, and stranger, a later session would look around, see that real progress had been made, and declare the whole project finished. The model was not stupid. It was working without the artifacts a human engineer leaves behind precisely so the next shift can pick up cleanly.

The fix lived entirely in the harness. A specialized initializer agent runs once and sets up the environment: a startup script, a running progress log, an initial git commit, and a feature list holding more than two hundred discrete requirements, each marked as failing. (They stored it as JSON, having found the model less willing to quietly overwrite a JSON file than a Markdown one, which is the kind of detail you only learn by watching agents misbehave.) Every subsequent coding agent session then follows a ritual: read the progress log and git history to get its bearings, run a quick end-to-end test to confirm nothing is broken, pick the single highest-priority unfinished feature, implement it, verify it through a real browser rather than trusting the code, commit with a descriptive message, and update the log before stopping.

Notice that none of this touched the model's weights. The improvement came from writing down, in software, the habits that let a team of amnesiacs build something coherent together. The harness supplies the institutional memory the model lacks.

Why the Harness Moves the Numbers

If the harness only smoothed rough edges, it would be a convenience. The more interesting claim is that it moves the benchmark. In June 2026, researchers from Illinois, Berkeley, and Chroma released Harness-1, an open search agent built on a 20-billion-parameter model. Across eight demanding retrieval benchmarks, including questions that required chaining facts across SEC filings and patent databases, it scored 73% on average. GPT-5.4 scored 70.9%. The nearest open competitor, a 30-billion-parameter model, trailed by more than eleven points. A smaller model, wrapped well, beat larger ones wrapped ordinarily.

There is a design inversion at the heart of this. The harness is deterministic code built to supervise a non-deterministic core. Ordinary software engineering assumes the components you compose behave predictably. Here the central component does not. It will occasionally fabricate an action, misread its own output, or announce that an unfinished job is complete. So a good harness is engineered less like a pipeline and more like a good manager of a brilliant, erratic employee: it sets clear tasks, checks the work, and catches the confident mistakes before they compound.

Birgitta Böckeler of Thoughtworks gives that supervisory instinct a useful vocabulary. She separates guides, which steer the agent before it acts, from sensors, which observe the result and let it self-correct. Each can be computational, a linter or a test suite giving a hard yes-or-no, or inferential, a second model asked to judge the first. The feature list in Anthropic's example is a guide. The end-to-end browser test is a sensor. The art of harness engineering is deciding which checks a task needs and where to place them.

This also clarifies why the harness is a broader layer than the two disciplines that preceded it. Prompt engineering optimizes a single exchange. Context engineering governs what the model sees at a given moment. The harness designs the whole operational environment and contains both as parts. It is the difference between choosing your words carefully and building the room the conversation happens in.

Harnesses That Rewrite Themselves

The discipline is young enough that its founding practices are still being written down. One of the earliest, from Mitchell Hashimoto in February 2026, is almost a proverb: each time the agent makes a mistake, do not just correct it in the moment. Engineer a permanent fix into its environment so it cannot make that mistake again. The harness accretes hard-won lessons the way a codebase accretes tests, one failure at a time.

The natural next step is to let the agent do that accreting itself. A framework reported in mid-2026 under the name Self-Harness has agents mine their own failures, propose changes to their harness, and validate those changes before adopting them. The scaffolding stops being something a human hand-tunes and starts becoming something the system improves on its own. The ceiling on agent capability is no longer fixed at the moment a model finishes training. It keeps rising as the environment around the model gets smarter, and much of that work is now available to anyone, under open licenses, on commodity infrastructure.

References

  1. LangChain. "The Anatomy of an Agent Harness" (Mar 10, 2026). https://www.langchain.com/blog/the-anatomy-of-an-agent-harness
  2. arXiv. "ReAct: Synergizing Reasoning and Acting in Language Models". https://arxiv.org/abs/2210.03629
  3. arXiv. "Toolformer: Language Models Can Teach Themselves to Use Tools". https://arxiv.org/abs/2302.04761
  4. VentureBeat. "Researchers trained an open source AI search agent, Harness-1, that outperforms GPT-5.4 on recalling relevant information" (Jun 08, 2026). https://venturebeat.com/orchestration/researchers-trained-an-open-source-ai-search-agent-harness-1-that-outperforms-gpt-5-4-on-recalling-relevant-information
  5. martinfowler.com. "Harness engineering for coding agent users" (Apr 02, 2026). https://martinfowler.com/articles/exploring-gen-ai/harness-engineering.html
  6. Anthropic. "Effective harnesses for long-running agents" (Nov 26, 2025). https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents