Explainers

What is harness engineering? The scaffolding around an agent

Harness engineering is the newer, still-evolving name for the tools, rules, checks and approvals that make an AI agent dependable.

By Laner Labs Learning teamPublished 4 min read

A search window with sources and a magnifier

Harness engineering is the work of building the scaffolding around an AI model so that an agent behaves dependably. The model is the clever part. The harness is the set of tools, permissions, memory, checks and approvals that surrounds it and keeps the work on track.

A warning first. This is a newer term, and it is still evolving. It does not have one agreed definition, and teams use it in different ways. So we will stay close to the sources we could read and say in plain words what each one shows.

A non-code picture: the safe workshop

Think of a skilled apprentice joining a workshop. The apprentice may be very capable. But a good workshop still has labelled tool racks, a rule about which machines need a supervisor, a job board that shows what is done and what is next, a checklist before anything leaves the building, and a logbook. None of that is the apprentice's skill. All of it makes the apprentice's work safe, repeatable and easy to hand over.

That is a plain-language analogy of ours, not a quote from any company. The harness is the workshop. The model is the apprentice.

How the sources use the word

Anthropic's engineering post on long-running agents refers to the Claude Agent SDK as a powerful, general-purpose agent harness, one that helps the model use tools to gather context, plan and act. The post is about a hard problem: tasks that span many sessions, where each new session starts with no memory of the last. Anthropic describes the picture of engineers working in shifts, where each new engineer arrives without remembering the previous shift.

The solution it describes is a structure around the model. An initializer session sets up the environment, including a startup script, a progress log file and an initial commit in version control. Later sessions each make a small amount of progress and leave clear notes. The post also describes a list of features, all marked as failing at the start, so that later sessions have a clear picture of what "done" means, and it stresses testing the work end to end rather than trusting a claim of completion.

A later Anthropic post, from March 2026, is titled "Harness design for long-running application development". It describes a setup with a planner, a generator and an evaluator, and says the harness design has a substantial impact on how well long-running coding agents perform. The authors note this is based on their own experiments.

OpenAI published a post in February 2026 titled "Harness engineering: leveraging Codex in an agent-first world". It describes a team that built an internal product using agents to write the code, and says the engineers' job shifted to designing environments, specifying intent and building feedback loops. It reports that when the agent struggled, the team asked which capability was missing and how to make it clear and enforceable for the agent. It also says the discipline shows up more in the scaffolding than in the code. The post is a single team's account of its own experiment, and it says openly that some questions, such as how such systems age over years, are not yet answered.

The parts of a harness

Putting these sources together, here is our own plain list of what a harness often includes. Different systems include different parts.

  • Tools: the actions the agent can take, described clearly, with as few overlapping ones as possible.
  • Permissions: what the agent may read, change or run, and what is off limits.
  • Memory and notes: progress files, task lists and summaries that carry the state from one session to the next.
  • Checks and tests: automatic ways to find out whether the work is right, so the agent does not just claim success.
  • Logs: a record of what happened, so a person can review it and find the cause of a problem.
  • Retries and limits: rules for trying again after a failure, and for stopping after too many steps or too much cost.
  • Human approval gates: points where the agent must stop and ask before doing something risky or hard to undo.

Why it matters

When an agent goes wrong, it is tempting to blame the model and tell it to try harder. The OpenAI post argues against that. It says that when something failed, the fix was almost never to try harder; the team asked what was missing from the environment. The Anthropic posts point the same way: better handoff notes, clearer tests and smaller steps changed the results.

For a non-developer, the lesson is simple. If an AI tool keeps letting you down, look at the setup around it before you blame the tool. Does it have the right documents? Does it have a clear checklist? Can you see what it did? For a developer, the harness is where reliability is designed.

Cautions

  • A harness does not make an agent right. It makes mistakes easier to catch.
  • More scaffolding is not always better. Anthropic's agent article recommends keeping designs as simple as possible.
  • Parts of a harness may become unnecessary as models improve, so what is useful today may change.
  • A person remains accountable for what the agent does, however good the harness is.

Sources used for this article, as they stood when we read them. Pages may change after we publish.

  • Anthropic, Effective harnesses for long-running agents: https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents
  • Anthropic, Harness design for long-running application development: https://www.anthropic.com/engineering/harness-design-long-running-apps
  • OpenAI, Harness engineering: leveraging Codex in an agent-first world: https://openai.com/index/harness-engineering/
  • Anthropic, Building effective agents: https://www.anthropic.com/engineering/building-effective-agents

Common questions

Is harness engineering an official, settled term?

No. It is a newer term that different organisations are using in their own ways, and its meaning may shift. In this article we only describe how the sources we read use it, and we mark our own summaries as ours.

What is the difference between an agent and its harness?

The model does the thinking and the choosing. The harness is everything around it that lets it act safely and keep its place: the tools it can call, the rules it follows, the notes it keeps and the checks on its work. Anthropic describes its Claude Agent SDK as a general-purpose agent harness.

Do I need to build a harness myself?

Often not. Many tools ship with a harness already built in. You do still choose settings such as permissions and approvals. If you build agents yourself, the harness is where much of the reliability is won or lost.

Official pages to check

AI tools change quickly. Check the vendor's current help page before you act, and review anything an AI tool produces before you rely on it.

Share this article