Blog
What is a coding agent harness? A plain-English guide
A coding agent harness is the layer that makes an AI model finish a task, not just start one. What a harness does, and why it decides whether work ships.
2026-09-08 · Sathwik R
A coding agent harness is the software layer around a model that turns a request into finished work. It holds the environment the code runs in, keeps a long task alive across failures, remembers what the run has already learned, and verifies the result before a human is asked to look at it. The model writes code; the harness makes it ship.
What does a coding agent harness do?
Four jobs, and none of them is generating code. A harness supplies the environment a task runs in, keeps the run going when a command fails, carries context forward when the conversation outgrows the window, and produces evidence about the result. Take any one away and the agent still writes plausible code — it just stops before the work is done, or finishes without anything to show it worked.
| Layer | The question it answers | What happens without it |
|---|---|---|
| Environment | Where does this code actually run? | The agent edits files it never executes |
| Persistence | Who keeps the run alive for six hours? | The task ends when the terminal closes |
| Recovery | What happens when the build breaks? | The agent stops at the first red test |
| Memory | What did we already learn about this repo? | Every run re-discovers the same facts |
| Verification | How do we know the result is real? | You review a claim instead of evidence |
Harness vs agent vs model — what is the difference?
They are three layers, not three products. The model is the weights that predict the next token. The agent is the loop that gives the model tools and lets it act — read a file, run a command, read the output, decide again. The harness is everything around that loop which makes it survive contact with a real repository for longer than a few minutes.
The practical test: if you closed your laptop right now, which layer would notice? A model notices nothing, because it does not have a run. An agent loses its loop. A harness keeps working, because keeping the work alive is the layer's entire job.
Why does the harness matter more than the model?
Because the model is the part you can swap and the harness is the part that decides whether the swap matters. Two teams pointing the same weights at the same repository get very different results depending on what surrounds those weights: how much of the codebase reached the context window, whether a failed command ended the run or started a repair, and whether anything checked the answer.
That is also why the layer is worth naming. For two years the interesting question was which model to use. The interesting question now is what the model is plugged into — and most of the difference between an agent that produces a merged pull request and one that produces a confident summary of work it did not do lives in that layer, not in the weights.
A model that stops is not a weaker model. It is a model with no harness.
What does a harness not do?
It does not make the model smarter, and it does not make wrong code right. A harness can guarantee that a command ran, that the changed lines executed under test, and that nothing was edited after the evidence was produced. It cannot guarantee that the tests are good tests or that the feature is what you wanted. Anyone selling the second thing is selling something that does not exist.
It also should not take your code somewhere else to do any of this. Relay runs the harness locally, against your own model provider, and hands finished work back through git — the same way a colleague would.
How do I try a coding agent harness?
One command, no account, and your own model key:
curl -fsSL https://relayevals.com/harness/install.sh | bash
Then give it a goal instead of a prompt. relay --goal "migrate the payments module to the new client" --autonomous runs until its completion gates pass or a budget stops it, rather than until the model feels finished.
The quickstart covers the first task end to end, and what a signed receipt proves explains the evidence the run produces when it is done.