When companies compare AI products, the conversation is almost always about the model: which one is smartest, which one is cheapest, which one topped the latest benchmark. In practice, a lot of the difference between an AI feature that works and one that embarrasses you sits somewhere else. It sits in the harness.

What a harness is

A harness is everything around the model that turns it into something that can do a job. LangChain puts it in one line: “Agent = Model + Harness. If you’re not the model, you’re the harness.” Anthropic uses “harness” and “scaffold” for the same thing: the system that processes inputs, orchestrates tool calls and returns results.

In concrete terms, a harness includes:

  • The loop. Read the task, decide, call a tool, look at the result, repeat, stop.
  • Tools and how they are described. Which actions the model can take, and how clearly they are explained to it.
  • Context management. What goes into the model’s limited context window, and what gets summarised, saved to notes or handed to a sub-agent when it fills up.
  • Memory. What carries over between sessions, so work does not start from zero every time.
  • Permissions and sandboxing. What the agent is allowed to touch, and what needs a human to approve.
  • Checks. Tests, linters, validation rules and a second pass that catches mistakes before anyone sees them.
  • Observability and evals. Logs, traces and test sets that tell you whether a change made things better or worse.

Claude Code, OpenAI’s Codex, Cursor’s agent and Gemini CLI are all harnesses. So is every serious AI feature inside a business product, whether or not anyone calls it that.

The evidence that it matters

Anthropic said it plainly when it published its SWE-bench results: performance “can vary significantly based on this scaffolding, even when using the same underlying AI model.” Since then the numbers have become hard to ignore.

  • LangChain, February 2026. Keeping the model fixed (GPT-5.2-Codex), changes to the harness alone moved their agent on Terminal-Bench 2.0 from 52.8% to 66.5%. The changes were a self-verification checklist, better local context, loop detection and how the reasoning budget was spent.
  • Anthropic, March 2026. A single agent asked to build a game maker produced a broken result in 20 minutes for about $9. A harness with separate planner, builder and evaluator roles produced a working one in about six hours for about $200. More expensive, but the cheap version did not work.
  • OpenAI, February 2026. OpenAI described building an internal product of roughly a million lines with no manually written code, and summed up the lesson as “Humans steer. Agents execute.” The discipline, they wrote, shows up more in the scaffolding than in the code.

There is an honest counterpoint. On standard public coding benchmarks, a vendor’s own harness often adds only a few points over a neutral one. The harness matters most exactly where business AI lives: long tasks, custom tools, your own data and your own rules. That is where the gap between a demo and a product opens up.

Why this matters if you are buying or building AI

Models change every few months and get cheaper. Your harness is what you own. It encodes your tools, your data access, your safety rules and your definition of a good result. When a better model arrives, a good harness lets you switch and measure the difference in a day. A thin wrapper around one model’s API leaves you starting again.

It also changes where to spend money. Most AI features that fail do not fail because the model was weak. They fail because the model saw the wrong context, had a tool it misused, or nobody checked its output before a customer did. In my own work, from an HR assistant that checks time-off rules in code to a document analyzer that must cite its source, the model call is the small part. The harness is the project.

Questions to ask before you build or buy

  1. What tools can the agent use, and what happens when it uses one wrongly?
  2. How does it decide what goes into its context, and what does it do when the context fills up?
  3. What can it do without a human approving it? Is that list written down?
  4. How is its work checked before a user sees it?
  5. Is there a test set of real cases, and is it run every time the prompt or model changes?
  6. Can you swap the model without rewriting the product?
  7. What does one task cost, end to end, including retries?

If a vendor or a developer cannot answer these, you are not buying an agent. You are buying a demo.

Anthropic made one more point worth repeating: as models improve, parts of the harness stop being needed, and the advice is to strip away pieces that are no longer load-bearing. A harness is not built once. It is maintained, like any other part of a product.

If you are planning an AI feature and want a second opinion on the harness before the build starts, book a free 30-minute call. You can also see how I approach AI product development.

Sources: Anthropic: Raising the bar on SWE-bench Verified · Anthropic: Demystifying evals for AI agents · Anthropic: Harness design for long-running apps · OpenAI: Harness engineering · LangChain: Improving Deep Agents with harness engineering · LangChain: The anatomy of an agent harness