When an AI agent gets something wrong, the usual reaction is to correct it and move on. Harness engineering is the opposite: you change what surrounds the agent so that the mistake cannot happen again. The term appeared in 2026 among teams that write software with agents. Here I explain what it is, how it differs from prompt engineering and context engineering, and how it applies outside code, in a company's processes.
What is harness engineering
Harness engineering is the work of designing an AI agent's harness: the instructions, the tools, the data it can reach, the checks and the record of what it does. If you are not sure what a harness is, we explain it in what is an AI harness.
Mitchell Hashimoto, co-founder of HashiCorp, described it in February 2026 as a habit: any time an agent makes a mistake, you take the time to engineer a solution so that it never makes that mistake again ("My AI Adoption Journey", 5 February 2026). According to him, that solution takes two forms: better standing instructions for the agent, or programmed tools the agent can use to check its own work.
The underlying idea is simple. Correcting an agent in a conversation fixes one result. Changing its harness fixes all the ones that follow.
Where it comes from: three texts from 2026
OpenAI published, days later, the case of a team that built an internal product without writing code by hand: about five months, on the order of a million lines and roughly 1,500 pull requests, with a team that grew from three to seven engineers (OpenAI, "Harness engineering", 11 February 2026). These are OpenAI's own figures about its own product, so they should be read as a case told by an interested party. What is useful is what it says about the work: the engineers stopped writing code and started preparing the environment. Two of its lessons apply to any agent:
- A map, not a manual. One huge instruction document did not work. A short one that points to well-organised documentation did.
- What the agent cannot read does not exist. What was decided in a meeting or lives in someone's head does not count for the agent until it is written down where the agent can reach it.
Anthropic had described the same problem a few months earlier: an agent that works across many sessions starts each one with no memory of the last, and without structure it tends to take on too much or to declare the job done too early (Anthropic, "Effective harnesses for long-running agents", 26 November 2025). The solution was not another model: it was a task list with its status, a progress file and end-to-end checks.
Birgitta Böckeler, of Thoughtworks, gave it the most useful vocabulary ("Harness engineering for coding agent users", 2 April 2026). A harness has two kinds of parts:
| When it acts | What it does | Example | |
|---|---|---|---|
| Guides | Before the agent acts | Steer its behaviour | Instructions, project rules, examples |
| Sensors | After it acts | Observe the result and let it self-correct | Tests, validations, a review |
Each part can be of two kinds: computational, which is deterministic and always gives the same result, or inferential, which uses another AI model to judge and is therefore not deterministic. Böckeler adds an idea worth keeping: a good harness does not remove the person, it directs their attention to where it matters most.
Prompt engineering, context engineering and harness engineering
The three terms get confused because each one contains the previous one.
| What you design | The question it answers | Where it falls short | |
|---|---|---|---|
| Prompt engineering | The instruction | How do I ask for it? | It depends on how the model interprets it each time |
| Context engineering | What the model sees at each moment | What information does it need now? | It does not check what the model does with it |
| Harness engineering | Everything around the model | What does it see, what can it do, how is it checked and what is recorded? | It does not make the model better: it makes the work reliable |
A guardrail, for its part, is one specific part inside the harness. We cover the difference between asking the model for something and checking it outside the model in guardrails and data security.
Outside code: harness engineering in a business process
Almost everything written about harness engineering is about programming. There the main sensor is obvious: you run the code and its tests. In a finance, procurement or customer service process there are no tests to run. There are figures that have to be exact, data with a source and decisions someone answers for.
The same two parts apply, but they change hands and shape:
| In programming | In a business process | |
|---|---|---|
| Who writes the guides | Engineers | The team that knows the process, in natural language |
| Guides | Repository instructions, architecture | The steps of the process, the business rules, which data each agent may read |
| Computational sensors | Tests, linters, types | Exact rules: every figure matches the calculated one and every piece of data has a source |
| Final sensor | Code review | A named person who approves, corrects or rejects |
| What remains | The repository history | The record of who saw what, who approved and why |
Three things change compared with software.
- The model does not calculate the figures. In a process, amounts, totals and due dates come from exact rules in the harness, which always give the same result. The model reasons about them; it does not produce them.
- The sensor that matters is computational. Asking another model to review an amount is not a check. Comparing the amount in the email with the calculated one is.
- The person is not optional. In the OpenAI case, human code review became optional. In a process that moves money or affects a customer, a person decides. This is known as human in the loop.
An example
The finance team at Acme chases overdue invoices every Monday with an agent. In the first week, one email goes out with an amount that does not match the ERP: the agent had added an invoice that was already in dispute.
Without harness engineering, someone corrects the email and tells the agent. The following week it can happen again.
With harness engineering, the team changes two things in the process. It adds a guide: disputed invoices are left out before the agent sees anything. And it adds a sensor: the harness compares every figure in the email with the calculated one and, if they do not match, the email never reaches the inbox of Tomás, the controller. The mistake has not been corrected once: it can no longer happen.
The split is always the same: the harness resolves what is exact, the agent investigates and proposes in everything else, and the person decides.
How we solve it at Opendome
At Opendome, harness engineering is done by your team, not by a team of engineers. In the Workshop, someone who knows the process writes it in natural language; Opendome translates it into something executable, the harness validates it, one person tests it on the day's data and another activates it.
The controls come as standard and are deterministic rules, not instructions to the model: which data each agent may read, which figures are recalculated and what needs a person's approval. You can write a wrong process, but not an unsafe one. And it all happens on your data, in your infrastructure, with every access recorded.
You can see it on the harness page, in the harness video (4 minutes) and, with a full example, in the finance use case.
Conclusion
Harness engineering changes the question. It stops being "how do I ask the model better?" and becomes "what has to be around it so that it cannot get this wrong?". In programming, that means instructions, tests and reviews. In a business process it means the steps your team writes, the exact rules that check every figure and the person who decides. Every mistake an agent makes is a question about its harness: which guide was missing, or which check did not exist.
Sources
- Mitchell Hashimoto, "My AI Adoption Journey", 5 February 2026.
- Ryan Lopopolo, "Harness engineering: leveraging Codex in an agent-first world", OpenAI, 11 February 2026.
- Birgitta Böckeler, "Harness engineering for coding agent users", martinfowler.com, 2 April 2026.
- Justin Young, "Effective harnesses for long-running agents", Anthropic, 26 November 2025.