Skip to main content
Agentic harnesses

Harness²: agents that rework their own setup for each new task

A Google Cloud AI Research paper shows agents can tune their own prompts, skills and tools mid-task with no answer key, and get better across a stream of work.

· 7 min read
By Wasserstoff Labs
THE PAPERHarness^2: Recursive Agent Harnessing for an Open WorldRuiyao Xu et al. · arXiv 2610.14224 · 9 October 2026
WorkBuddy-Bench, GLM-5 in OpenCode, one refinement step
+11.5 pts
WorkBuddy-Bench, GLM-5 in OpenCode, one refinement step
LAB legal tasks, GLM-5 in OpenCode, one refinement step
+11.8 pts
LAB legal tasks, GLM-5 in OpenCode, one refinement step
JobBench, Gemini 3.5 Flash in OpenCode, one step
+4.5 pts
JobBench, Gemini 3.5 Flash in OpenCode, one step
Score on one JobBench task after a single rework
43.1 to 77.8
Score on one JobBench task after a single rework

The short version

An AI agent is a language model plus a harness: the prompts, rules, memory, skills, tools and helper agents wrapped around it. Ruiyao Xu and colleagues at Google Cloud AI Research and Northwestern University propose Harness², a way for an agent to rework its own harness for each new task, even when nothing can tell it whether its answer is right. It tries two edits, compares how they behave against a normal run, keeps only the changes the evidence supports, and files the lessons in a shared library for later tasks. Across three professional benchmarks and four model-and-harness pairings, one such step beat the starting harness every time, by up to 11.5 points.

The problem

Most agent harnesses are designed once, before deployment, and then left alone. That works when the tasks look like the ones the designer had in mind. It works less well in an "open world", where each new request may be unlike anything seen before.

Researchers have tried to let agents improve themselves. But most self-improvement methods lean on a verifier: a test suite, a known answer or a scoring function that says whether a change helped. Real work rarely comes with one. A client's report or a contract review has no answer key at the moment you produce it.

The authors name a second problem. Even when an agent manages to improve on one task, that improvement is usually specific to the task. It does not make the agent better at improving itself next time, and copying a harness tuned for one job onto the next can add noise rather than help.

How it works

The paper treats the harness as eight editable parts: the system prompt, guardrails, memory, skills, tool guidance, scripts, subagents and a middleware plugin. The model itself stays frozen, meaning its weights never change. Only the files around it are edited, by a separate "editor" model (Claude Opus 4.8 by default).

Harness² runs two loops, which the paper calls two levels of recursion.

Task-level recursion improves the harness for the task in hand. Its core is a single step with three stages:

  • Propose. The agent first does a reference run of the task with its current harness. This shows how the harness behaves, not whether the result is correct. The editor then drafts two candidate harnesses. One targets general weaknesses such as planning, tool use or delegation. The other targets the task's domain: its knowledge, procedures and constraints.
  • Probe. Each candidate runs the same task under the same conditions. Its behaviour is compared with the reference run. Did the edit fix a weakness, change nothing, or make things worse?
  • Compose. The editor reads all the runs and decides what to keep. It can merge supported changes, adopt one candidate, or keep the original harness. Every decision must point to something it actually observed.

The authors are careful about what this comparison proves. Their phrase is that the contrasts "inform subsequent composition rather than verify task correctness". In other words, the method uses differences in behaviour as evidence, not as a grade.

This step can be scaled with a budget. In parallel recursion the agent runs several Propose and Probe rounds side by side and pools the results. In sequential recursion it chains steps, each building on the last. When there is more than one finished output, a separate selector compares them against the original request without seeing which harness made which.

Harnessing-level recursion is the second loop. After each task, the system reviews the whole record and writes down lessons, but only those backed by a behavioural contrast. These go into a library of adopted harness components, each with a short note on when it applies and why. The next task still starts from the plain base harness. The library guides the Propose stage; nothing is inherited automatically.

An analogy: a cook trialling a new dish. Before the full service they make a normal version and two tweaked versions, compare them side by side, and keep only the tweaks that clearly made a difference. Afterwards they write in the kitchen notebook what worked and when, so the next cook facing a similar dish has a better starting point.

What they found

The executors were Gemini 3.5 Flash and GLM-5, each run inside two existing harnesses, OpenCode and Codex. The benchmarks were WorkBuddy-Bench (office-style deliverables in code, web and office tasks), JobBench (professional tasks across seven occupations, 34 test tasks) and LAB (legal tasks; the paper uses 100 held-out tasks). Results are averaged over three runs with shuffled task order.

  • One step helps everywhere. With a single refinement step, Harness² beat the base harness on all three benchmarks in all four configurations.
  • Biggest gains for the weaker model. On WorkBuddy-Bench, GLM-5 in OpenCode rose from 64.2 to 75.7, the 11.5-point headline. On LAB it rose from 59.6 to 71.4, a gain of 11.8 points. On WorkBuddy-Bench, the improved GLM-5 setup (75.7) beat Gemini 3.5 Flash on the base harness (72.4).
  • JobBench. Gemini 3.5 Flash in OpenCode went from 31.5 to 36.0, a gain of 4.5 points.
  • More budget, more gain. Running five parallel attempts instead of one added up to 3.9 more points on WorkBuddy-Bench, 4.2 on JobBench and 6.7 on LAB. On WorkBuddy's code tasks, for example, the score rose from 76.5 to 80.8.
  • Against other methods. Harness² beat three baselines on WorkBuddy-Bench and JobBench in every configuration: a retrieval-only memory method, an offline harness search and per-task revision without memory. The one exception was LAB with Gemini in Codex, where the offline search scored 76.5 against 75.6.
  • Every part matters. In ablations (with Gemini in OpenCode), removing the library, the split into general and domain edits, or the Compose stage each lowered scores on both benchmarks tested.
  • No stronger editor needed. When the same model acted as both executor and editor, all five models tested improved on every benchmark.
  • A worked example. On one JobBench task, the base run scored 43.1 because it never reconciled data across sources or reopened its outputs to check them. One step added a verification guardrail and a reconciliation skill. The rerun scored 77.8.

Where it falls short

  • It costs more. Every step needs extra runs and editor sessions. Parallel runs cut waiting time but not total compute. The agent also made more tool calls, about 20% more on JobBench and LAB, though error rates fell.
  • Behaviour is not truth. Without a verifier, the method relies on behavioural contrasts and model judgement. The authors note these signals can be swayed by run-to-run randomness and by biases the models share. If every candidate makes the same mistake, comparing them will not reveal it.
  • It can pick the wrong winner. The failure analysis found nine regressions. In one, the selector chose an output scoring 55 over one scoring 95. In others, a wrong assumption carried through and cost points.
  • The gains are uneven. More budget did not reliably close the gap between the two starting harnesses, and the offline baseline still won one LAB setting.
  • The library's value is not fully proven. The test of lessons carrying over between benchmarks was retrospective, not live. The authors also flag that the library will need pruning and updating as it grows, and that the budget is currently fixed in advance rather than set by task difficulty.
  • Probing means doing the task more than once. That is fine for drafting a document. It is a real question for tasks with side effects, such as sending an email or changing a live system, which the paper does not address.
WASSERSTOFF LABS

What it means for us

For anyone building AI employees, the core idea is practical. A retail store manager or a support agent meets requests nobody wrote a test for. Harness² shows that an agent can still improve without an answer key, provided it compares behaviour against a baseline and only keeps changes it can justify. The worked example is telling: the fix was not a smarter model but a guardrail to check its own output and a skill for reconciling sources. Much of what makes an agent reliable lives in the harness.

The limits matter just as much. The paper is honest that a better-looking run is not a proven-correct run. Whether an agent works every time, not once, is what any serious eval has to answer. A self-tuning harness makes that question harder, because the harness itself now changes from task to task. Any team adopting this pattern needs evals that track the edits as well as the outputs.

Finally, the side-effect question is central for agents that act in the world. Probing is cheap when the work is a draft. It needs sandboxes and dry runs when the agent touches customers, infrastructure or money.

SOURCES

  1. Harness^2: Recursive Agent Harnessing for an Open World — Ruiyao Xu et al.. arXiv:2610.14224, 9 October 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.