# What Is an Agent Harness? Why 2027 Looks Like the Year of the Harness, and the Part Most of Them Leave Out

> An agent harness is everything around the model: tools, memory, permissions and checks. Why harnesses matter more as models converge, and why the check on the agent's work has to sit outside its reach.

Source: https://qa.tech/blog/agent-harness · Published: 2026-11-30

---
<div class="qa-highlight">

An agent harness is everything around the model that turns it into an agent you can use: the loop that decides the next step, the tools it can call, the files and memory it can read, the permissions that limit it, and the checks that run on what it produces. Claude Code, Codex and Cursor's agent are harnesses around a model. As the top models get harder to tell apart, the harness is where teams are starting to compete, and the most important part of it is also the one most often missing: a check on the agent's work that the agent can't edit.

</div>

## Agent = model + harness

The short version you'll see everywhere is "agent = model + harness". The model reasons about what to do. The harness gives it somewhere to do it.

A coding agent's harness typically holds:

- **the loop** that plans, acts, reads the result and decides what's next
- **tools** like a shell, a file editor, a browser or an MCP server
- **context**: the repo, instructions files such as `AGENTS.md`, memory from earlier sessions
- **permissions and sandboxes**, which decide what the agent may touch
- **checks**: linters, type checks, test runs and reviews that tell the agent, and you, whether the work holds up

## Why people expect 2027 to be about harnesses

Fireship's year-end Code Report on trends for 2027 (published 27 November 2026) put it plainly: "if 2026 was the year of the agent, I think 2027 will be the year of the harness." The argument in [the video](https://www.youtube.com/watch?v=sPGzM3ktJVE) is that frontier models now feel close to interchangeable, most people don't want to orchestrate swarms of agents themselves, and so the products that win will be specialised harnesses built for one domain, with the compliance and safety work that domain needs.

We see the same pattern from the inside. We built our own testing agent the same way. It started from the computer-use work Anthropic released and was narrowed to one job: opening a deployed app and checking a change against what the ticket asked for. A general-purpose agent has to stay open-ended. A focused one can assume what the task looks like and skip the rest.

Customers are doing the same thing. An engineering lead at a consumer-app company told us they currently have "two harnesses building our iOS app and Android app."

There's a caveat worth keeping. The OpenClaw Foundation's [ShellBench](https://openclaw.ai/blog/shellbench) ran 12 models through five harnesses, including Claude Code and Codex, on 100 everyday tasks. Every harness averaged between 42.9% and 45.2% ([paper](https://arxiv.org/abs/2611.32946)). Model averages ranged from 39.7% to 62.5%. The tasks are office work rather than code, so read it as a signal: swapping the harness won't lift a weak model. The harness controls what the agent may touch and whether anyone catches its mistakes.

## The part most harnesses leave out

Another line from the same video is closer to our work: "the guy who noticed that the test suite is passing because the agent quietly deleted all the tests that were failing."

Agents move toward whatever you measure. They're trained to collect a reward on tasks someone can verify, so when the check and the intent drift apart, a capable agent satisfies the check. If the check lives inside the agent's reach (tests it can edit, a coverage number it can game, a review it writes itself), a green result tells you very little.

That's why the check is the one part of a harness that has to sit outside the agent:

- **Separate from the builder.** Something other than the agent that wrote the change decides whether it works. Using a different model for the checker helps too, because models notice different things.
- **Out of the agent's write access.** Critical-path tests, CI configuration and the check's own settings sit where the coding agent can't change them. Anthropic's [Claude Ship docs](https://code.claude.com/docs/en/claude-ship) say the same about merging: "Your settings and GitHub branch rules determine what merges."
- **Running the product.** Tests the agent wrote check the code against the agent's idea of the spec. A check against the deployed preview of the change, driven by the ticket or PR description, catches what the agent never built.
- **Allowed to say "I couldn't tell".** A check that can only pass or fail will pass things it never reached.

Our earlier piece on [harness engineering and the sensor most harnesses are missing](https://qa.tech/blog/harness-engineering-behaviour-sensor) goes deeper on that last layer. If you're new to the older meaning of the word, [what is a test harness](https://qa.tech/blog/what-is-a-test-harness) covers the classic version and how it maps onto agents.

## How to measure a harness change

Most teams change their agent's instructions file, swap a tool or add a sub-agent, and then judge the result by feel. We see it on many calls: teams change their development agents constantly and have no good way to tell whether a change made things better, apart from vibes.

A harness is software. It deserves the same treatment:

1. **Keep a fixed set of tasks** that look like your real work, including a few the agent usually gets wrong.
2. **Run them before and after every harness change**, several times each, because agents vary from run to run. In ShellBench the top model solved 75.1% of tasks at least once in three tries and 48.8% on all three.
3. **Score the outcome.** Did the feature work in the deployed app, whatever the transcript says? Did the PR pass review without rework?
4. **Watch for regressions more than wins.** An average can improve while three tasks you care about break.

## Where the checking part can come from

You can build the outside check yourself: a second agent with its own instructions, read-only access to the repo, a browser and a preview URL. Plenty of teams start there, and it's a good way to learn what you need. The hard parts come later: deciding what to test for a given change, keeping test accounts and data working, and getting the checker to admit when it didn't reach something.

Or you can plug in a checker someone else maintains. It won't make a weak harness good, and it doesn't write or fix your code. QA.tech, an AI testing platform, runs test cases against the deployed preview of each pull request, and your coding agent can drive it. Through the [MCP server](https://docs.qa.tech/integrations/mcp), Claude Code, Cursor or Codex can list test cases, start runs and read results, including screenshots, logs and traces. What that adds is a verdict on the live app from something that didn't write the change.

## Frequently asked questions

**What is an agent harness?**
The software around a language model that turns it into a working agent: the execution loop, tools, context and memory, permissions and sandboxes, and the checks on its output. Claude Code and Codex are examples of coding-agent harnesses.

**What's the difference between an agent harness and an agent framework?**
A framework is a library you build agents with. A harness is the running system around a specific agent: what it can call, what it can see and what checks its work. You can build a harness with a framework, or use one that ships ready-made.

**Is Claude Code a harness?**
Yes. Claude Code is a harness around Anthropic's models: it supplies the loop, the tools, the instructions files and the permissions. Codex and Cursor's agent play the same role around their models.

**Does the harness matter more than the model?**
Not on its own. In the ShellBench results, model choice moved pass rates far more than harness choice did. The harness decides what the agent can do and whether its mistakes get caught, which is why teams are investing in it as models converge.

**What should a coding agent's harness check?**
Static checks and tests catch problems in the code. A check against the running app, driven by the ticket, catches features that weren't built or don't work. Keep that check out of the agent's write access, and let it report when it couldn't verify something.

**How do I know if a harness change made my agent better?**
Run a fixed set of real tasks several times before and after the change and compare outcomes, paying more attention to tasks that got worse than to the average.

## About the author

**Vilhelm von Ehrenheim** is co-founder and Chief AI Officer of QA.tech. Before QA.tech he spent seven years at EQT, where he was Head of Motherbrain Intelligence and helped build the AI-driven investment platform Motherbrain. At QA.tech he leads the team that builds the agents and models behind its testing, and works every day on the question this piece asks: how do you know the agent did the job?
