← Writing

Harness engineering: the work around the model

Give the same AI model to two teams and you can get very different results. One team gets an assistant that writes plausible code and needs constant babysitting. The other gets an agent that works for hours, tests its own changes and opens pull requests that are ready to merge. What differs is everything around the model, and building that now has a name: harness engineering.

What a harness is

A popular shorthand is agent = model + harness[1]. The harness is everything except the model itself: the instructions the agent starts with, the tools it can call, the memory it keeps between sessions, the checks that run on its work, and the rules about what it may and may not do.

Birgitta Böckeler of Thoughtworks offers a useful way to sort the parts[1]. Some controls are guides that steer the agent before it acts, like a project description, coding conventions or a template. Others are sensors that give feedback after it acts, like tests, a type checker or another agent reviewing the change. Each can be computational, meaning fast and deterministic like a linter, or inferential: an AI judging the work, slower and less predictable but able to judge meaning.

Where the term comes from

The idea is older than the name. In February 2026 Mitchell Hashimoto, the creator of Terraform and Ghostty, described a habit he calls engineering the harness[2]: every time an agent makes a mistake, you change its environment so it never makes that mistake again. Sometimes that means better instructions, sometimes a small tool, like a script that takes a screenshot so the agent can see the interface it just built.

Six days later, OpenAI described a team[3] that built an internal product without a single hand-written line of code: about a million lines and 1,500 merged pull requests in five months, all written by coding agents. The engineers designed the environment, the feedback loops and the controls. Their summary: "Humans steer. Agents execute."

What good harnesses do today

Across the teams that have written about it, the same patterns keep coming back:

  • Instruction files work best as a map. Keep the agent's instruction file short[3]: a table of contents that points to deeper documentation, so the task itself doesn't drown in instructions.
  • The machine enforces the rules. Architecture boundaries and conventions are checked by linters and structural tests[3], so nobody has to ask for them politely in a prompt.
  • Agents need a way to see their own work. They get much better when they can run the app and test it in a browser[4] like a user would, instead of trusting that the code looks right.
  • Memory lives outside the model. Long tasks span many sessions, and each new session starts with no memory of the last. A progress file, a feature checklist and the git history[4] let the next session pick up where the previous one stopped.
  • A separate agent judges the work. Agents tend to praise their own work. A second agent that only evaluates[5], with clear criteria, catches what the builder misses.
  • Cleanup is a job of its own. Agents copy the patterns they find, including the bad ones, so background agents tidy code and documentation[3] all the time, so a human doesn't have to do it every Friday.

Where it is heading

Nobody knows exactly where this goes, but what the people building these systems report points in five directions.

Tasks get longer, so harnesses get deeper

METR measures how long a task, in human working time, AI agents can finish half of the time. In 2025 that length was doubling about every seven months[6]; their updated estimate puts the doubling at roughly three months for models since 2024[7]. An agent that works for a day instead of ten minutes needs real memory, handoffs between sessions, checkpoints and a way to recover from wrong turns, and all of that is harness.

Parts of the harness will disappear

Anthropic makes a good point: every part of a harness exists because of something the model cannot yet do on its own[5]. When models improve, those parts become dead weight, and Anthropic removed whole pieces of its own setup once a newer model no longer needed them. So a harness needs revisiting with every model generation, and knowing what to remove matters as much as knowing what to add.

The hard question becomes "is it right?"

Checking that code is maintainable is largely solved: linters, types and tests do it well. Checking that the software does what the business actually needs is not, and Böckeler names this behaviour harness as the big open problem[1]. I expect the most important work of the coming years to happen here: specifications precise enough for an agent to verify against, and evaluators that test behaviour as well as syntax.

Good engineering becomes more valuable

A codebase with strong types, fast tests and clear module boundaries is much easier to harness than a tangled one[1]. The practices we always said we should follow, like up-to-date documentation, architecture rules and automated checks, become what makes agents work at all.

Someone has to pay for it

Harnesses are not free. In one Anthropic experiment[5], a full harness built a much better app than a single agent, but took six hours and about $200 instead of twenty minutes and $9. Teams will have to decide where a harness pays off, which is an engineering question and a business question at once.

What it means for developers

Harness engineering is the AI factory seen up close. If agents do the production work, the engineer builds the production line: the instructions, the tools, the checks and the feedback loops that make the output trustworthy. Humans stay in the loop. Böckeler argues that a good harness should not even try to remove human input completely[1], and I agree, because experience, context and accountability are exactly what a harness can't hold.

That's also why I find it exciting. It rewards the skills that were always the hard part of software: breaking problems down, defining what done means, and building systems that catch mistakes. I have since built a small project around this and written about what broke. If you're building harnesses yourself, I'd like to hear how you do it.

Sources

  1. Birgitta Böckeler (martinfowler.com): Harness engineering for coding agent users (Apr 2026) martinfowler.com↩↩↩↩↩
  2. Mitchell Hashimoto: My AI Adoption Journey (Feb 2026) mitchellh.com↩
  3. OpenAI: Harness engineering: leveraging Codex in an agent-first world (Feb 2026) openai.com↩↩↩↩
  4. Anthropic: Effective harnesses for long-running agents (Nov 2025) anthropic.com↩↩
  5. Anthropic: Harness design for long-running application development (Mar 2026) anthropic.com↩↩↩
  6. METR: Measuring AI ability to complete long software tasks (Mar 2025) metr.org↩
  7. METR: Time Horizon 1.1 (Jan 2026) metr.org↩