Skip to main content
Agentic harnesses

Code is becoming the harness that holds AI agents together

A 42-author survey argues that reliable agents depend less on the model than on the code around it, and maps where that code still fails.

· 7 min read
By Wasserstoff Labs
THE PAPERCode as Agent HarnessXuying Ning, Katherine Tieu, Dongqi Fu, et al. · arXiv 2605.18747 · 18 May 2026
Layers in the survey's map: interface, mechanisms, scaling
3
Layers in the survey's map: interface, mechanisms, scaling
Cited: in-house issues one deployed agent fixed unaided
16.9%
Cited: in-house issues one deployed agent fixed unaided
Cited: best accuracy at pinpointing the step that failed
14–53%
Cited: best accuracy at pinpointing the step that failed
Cited: precision and recall of simulated code execution
98%+
Cited: precision and recall of simulated code execution

The short version

An agent harness is the software wrapped around a language model: its tools, sandbox, memory, checks and permission rules. In this survey, Xuying Ning, Katherine Tieu, Dongqi Fu and colleagues from the University of Illinois Urbana-Champaign, Meta and Stanford argue that code is becoming the main material that harness is built from. Agents now write code to reason, to act, to describe their surroundings and to check their own work. The authors organise the field into three layers and close with a list of open problems, most of them about checking, testing and governing the agent rather than making the model smarter.

The problem

Language models are good at writing code. Most research has treated that code as the finished product: a patch, a function, an answer. But an agent that runs for hours on a real task needs more than one good answer. It has to remember what it did, notice when something broke, avoid harmful actions and hand work to other agents without losing track.

The authors' point is that the limit on autonomy is often not the model's reasoning. It is the reliability of the system that turns the model's outputs into actions and keeps state across many steps. They also note a gap in earlier surveys. Those surveys studied the infrastructure that developers build, or the code a model outputs. They paid less attention to the small pieces of code agents create for themselves while they work: a temporary test, a throwaway tool, a saved workflow, a reusable skill.

How it works

Think of the model as a capable new hire, and the harness as the office around them. The office has a desk, a filing cabinet, an approvals process and a quality inspector. Code plays the role of the paperwork. It is written down, so anyone can read it. It can be run, so anyone can check it. And it persists, so the next person can pick it up.

The survey maps this office in three layers.

  • Harness interface. This is where code first enters the agent's loop. Agents hand calculations to an interpreter instead of doing them "in their head" (code for reasoning). They write programs that act as policies, tool calls or reusable skills in software, on screens or in robots (code for acting). And they use repositories, execution traces, simulators and tests to represent the state of the world (code for environment).
  • Harness mechanisms. This layer keeps an agent reliable over many steps. It covers planning, memory, tool use, and a control loop the authors call Plan–Execute–Verify. The agent first writes down what it intends to change and how it will check the change. It then makes the change inside a sandbox, an isolated workspace that cannot harm the host system. Finally, it checks the result with what the authors call deterministic sensors: compilers, linters, type checkers, unit tests, fuzzers and CI pipelines. A failed check sends the agent back to revise, gather more context or escalate to a human.
  • Scaling the harness. When several agents share a task, the code itself becomes the shared workspace. Planners, coders, testers and reviewers coordinate through repositories, tests and logs rather than chat alone.

Two further ideas stand out. First, execution should be permissioned in tiers. Reading files is low risk. Editing and running tests inside a sandbox is medium risk. Network access, credentials, deployments and deleting history are high risk, and the authors say these should always pass through a human approval gate.

Second, the survey describes Agentic Harness Engineering: treating the harness itself as something to measure and improve. Detailed traces (the authors call this deep telemetry) record prompts, tool calls, costs, test results and human interventions. An Evolution Agent reads those traces, works out which part of the harness caused a failure, proposes a fix, and tests the fix on held-out tasks. It adopts a fix only if nothing that previously worked gets worse.

What they found

This is a survey, not an experiment, so its findings are patterns across the literature. Where it quotes numbers, they come from the works it reviews, each in its own setting.

  • Most multi-agent coding systems keep no explicit shared state. The authors find that the majority of systems they survey make each agent rebuild the state of the project from conversation history. That works for small, function-level tasks. On larger ones, agents cannot tell when their picture of the code has drifted from reality. The authors call this the root of the brittleness.
  • Complex team structures may be a symptom. Systems with a clear, queryable shared store tend to use simple hand-offs. Systems without one tend to build elaborate, shifting team structures, which the authors read as a workaround for missing state.
  • Running code is not the only way to check it. Two systems the survey covers, Self-Collaboration and QualityFlow, had a model imagine running the code. In those studies, the imagined runs predicted real test outcomes with over 98% precision and recall (for QualityFlow, on the MBPP set of Python problems). The authors conclude that real execution matters most for failures a model cannot imagine, such as crashes, resource exhaustion and edge-case bugs.
  • Deployed agents already do real work, with help. One system the survey covers, LingmaAgent, reports that an issue-fixing agent deployed at Alibaba Cloud resolved 16.9% of in-house issues fully on its own, and 43.3% with some human intervention.
  • Finding what went wrong is still hard. Studies the survey cites on multi-agent failures report best accuracies of 14% to 53% at identifying which step in a long run caused the failure. The authors take this as a sign that production harnesses lack the structured traces needed for proper debugging.
  • The harness is becoming a source of training data. The authors note that several coding products now train their models on traces from their own harness loops, which blurs the line between the agent and the system around it.

Where it falls short

The paper proposes a map, not a measurement. It runs no new experiments, and the numbers it cites come from different tasks, models and benchmarks, so they cannot be compared with each other. The examples lean heavily on software engineering. Screen automation, robotics and science get their own sections, but most of the detailed analysis is about coding agents.

The authors are candid about the gaps, and their open-problems section is the most useful part of the paper.

  • Evaluation. Most benchmarks score only whether the final task succeeded. That single score mixes up the model, the harness, the tools and the difficulty of the task.
  • Weak oracles. An oracle is whatever decides that a result is correct. Tests can be incomplete, and an agent can pass visible tests while exploiting gaps in them. As the authors put it, "the green test is not the full specification."
  • Self-improvement without regression. A harness that rewrites itself might fix one failure while quietly weakening safety, raising costs or breaking rare cases.
  • Shared state. When several agents and humans edit the same project, keeping files in sync is not enough. Their assumptions and plans also have to stay consistent.
  • Safety and accountability. The authors leave open how to decide when autonomy is appropriate and when a human must decide.
  • Multimodal settings. Screenshots, camera images and sensor readings are harder to store, compress and check than text.
WASSERSTOFF LABS

What it means for us

For anyone building AI employees, the paper's central claim is a useful lens. Picture a store manager agent or a cloud operations agent going wrong. The likely causes are the ones the survey describes: it acted on stale information, skipped a check, or took a risky step without asking. None of those is a reasoning failure. Treating plans, checks and permissions as explicit, inspectable code is a practical way to make those failures visible and fixable.

The evaluation agenda is the part closest to our own work. The authors propose measuring the harness, not just the final answer: how efficiently the agent got there, how strong its checks were, whether it recovered from mistakes, whether its memory stayed consistent, whether it respected permissions, and whether the whole run can be replayed and audited. That is the question our evals work is about: does an agent work every time, not once?

The permission tiers and the rule that a harness change must not break anything that already worked are worth taking seriously too. An agent that acts inside a real business needs a clear line between what it may do alone and what needs a person's sign-off. Every improvement to it should be tested against everything it already did well.

SOURCES

  1. Code as Agent Harness — Xuying Ning, Katherine Tieu, Dongqi Fu, et al.. arXiv:2605.18747, 18 May 2026.

A plain-English explanation by Wasserstoff Labs. Figures are taken from the paper; read it for full methods and results.

Building agents that have to work every time?

We build custom evals and research partnerships with teams that need reliability.