TL;DR
Harness 2 improves an LLM agent’s runtime scaffolding at test time by proposing paired edits, probing them against a reference run, and composing the survivors, then saving lessons to a library that guides future tasks, all without ground-truth labels.
Why It Matters
An LLM agent is more than its model. It also has a harness: the system prompt, guardrails, memory files, tool descriptions, skills, subagents, scripts, and middleware plugins that wrap a frozen model and turn it into something that can execute multi-step work. Swap the harness and the same model performs very differently.
Today, if you ship an agent on, say, OpenCode or Codex CLI and it fumbles a new kind of task, you have two bad options. Hand-edit the prompts and tools yourself, or run an offline search like Meta-Harness over a training set and deploy the winner. Neither helps when tasks arrive that nobody anticipated, and offline search assumes you have labeled validation tasks to score candidates against. In open-ended deployment you often don’t. There’s no grader standing by to tell you which harness edit was actually better.
Prior online approaches either retrieve past reasoning snippets into context (ReasoningBank) or spend extra inference re-editing the harness per task without carrying anything forward. The authors argue both leave value on the table: the process of refining a harness, which edits were tried and what they revealed, is itself reusable knowledge.
How It Works
Harness 2 runs two nested loops around a frozen model.
Task-level loop (Propose, Probe, Compose). For the current task, the agent first does a baseline run with the starting harness and records the trajectory. Then two editors propose candidate harness changes: an invariant editor targets how the agent works (planning, tool use, context management), and a domain editor targets what a practitioner would know (document structure, reconciliation rules, format quirks). Each candidate is a real edit to the component files. Each is then executed on the same task under matched conditions. The pipeline reads the baseline trajectory, the two candidate trajectories, and their diffs, then composes a successor harness: merge supported edits, drop conflicting ones, or keep the base if nothing earned its place. Crucially, the signal is behavioral contrast between runs, not a correctness score, because there’s no ground truth.
Scaling the loop. With budget k>1, you can run parallel recursion (k candidates per scope, k independent compositions, then an anonymized selector picks one deliverable) or sequential recursion (chain k refinement steps, each seeing all prior evidence). The authors build on the aggregation idea from Recursive Self-Aggregation but operate on executable harnesses rather than reasoning outputs.
Harnessing-level loop. After each task, a reflector reviews the whole improvement record and writes two things to a harness improvement library: the adopted harness itself, and an EXPERIENCE.md describing when and why specific edits worked. The next task starts from the common base harness, but the editors can now browse the library for components to reuse and lessons about when to apply them.
for task in task_stream:
H = base_harness
ref_runs = [execute(task, H) for _ in range(k)]
cands = propose_invariant(task, H, ref_runs, library) \
+ propose_domain(task, H, ref_runs, library)
probed = [(c, execute(task, c)) for c in cands]
successors = [compose(task, H, ref_runs, probed, library)
for _ in range(k)]
final = select_anonymized([execute(task, s) for s in successors])
library = update(library, final.harness, full_record)
What They Found
They test on three professional benchmarks: WorkBuddy Bench (coding, web, office tasks), JobBench (long end-to-end job tasks), and Legal Agent Benchmark (LAB) (legal work, scored per-criterion). Executors are frozen Gemini 3.5 Flash and GLM-5, running inside OpenCode or Codex. The harness editor is Claude Opus 4.8. Each benchmark starts with an empty library.
•
One improvement step helps every configuration. Gains reach +11.5 points on WorkBuddy-Bench, +4.5 on JobBench, and +11.8 percentage points on LAB’s partial pass rate, versus the unchanged base harness.
•
Recursion keeps adding. Parallel recursion at k=5 adds another 2.9 to 3.9 points on WorkBuddy-Bench, 3.0 to 4.2 on JobBench, and 2.6 to 6.7 pp on LAB over a single step.
•
Weaker models benefit more. On WorkBuddy-Bench, GLM-5 with a refined harness surpasses the base Gemini score. The authors frame this as a model-harness trade-off, not evidence that harness fixes close any gap.
•
Ablations matter. Removing the library costs 3.1/1.8 points (WorkBuddy/JobBench), removing the invariant-vs-domain split costs 2.9/3.7, removing the compose step costs 1.6/1.9. All three parts contribute at k=1.
•
Library transfers. A library accumulated on JobBench improves one-shot refinement on WorkBuddy-Bench by 0.6 to 2.9 points per domain, without any additional probing. Larger k during library-building produces libraries that help more later.
•
Same model as editor and executor works. Even without a stronger editor model, five executors (GLM-5 up through Claude Opus 5) all improve on all three benchmarks.
•
Baselines are mixed. ReasoningBank sometimes loses up to 6.6 points on coding; Harness Scaling underperforms the base in 7 of 12 settings. Harness 2 beats all compared baselines on WorkBuddy-Bench average and JobBench score across all four configurations. On LAB with Gemini under Codex, Meta-Harness (which uses an offline training split) still leads.
What’s Useful
•
If you ship an agent on top of a coding-agent runtime like OpenCode or Codex and can afford extra inference per task, the Propose-Probe-Compose pattern is the main takeaway: run the task once as a reference, generate two scoped edits to the scaffold, execute them, and keep what the trajectories support. The paper’s evidence is that this helps even with the same model doing both roles, so you don’t necessarily need a stronger editor.
•
The invariant/domain split is doing real work. If you’re already auto-editing prompts, splitting the editor into one that touches procedure and one that touches domain knowledge is worth testing. Ablation shows merging them into two generic editors costs several points.
•
Persisting edit lessons across tasks pays off, but note the shape: the library stores executable components and reflection notes about when they worked, not raw trajectories. If you keep only distilled strategies (ReasoningBank style), you may leave gains on the table.
•
Mind the compute. Parallel recursion at k=5 means roughly 5 reference runs plus 10 candidate runs plus composition sessions per task. The paper reports Pareto gains against baselines on total tokens, but this is still a significant per-task budget. For cheap, latency-sensitive tasks it won’t pencil out.
•
The method does not need or use correctness labels at deployment. That’s genuinely useful for open-ended production streams, but it also means the signal is noisy. The failure analysis shows the anonymized selector sometimes picks a weaker candidate.
Caveats
•
No ground-truth feedback means refinement rides on behavioral contrasts and model judgment, which share biases with the executor. The authors flag this and show cases where selection prefers a worse output.
•
Recursion costs extra executions and editor sessions. The paper characterizes a Pareto frontier up to k=5 but does not claim an optimal budget.
•
Gains vary a lot by configuration. Parallel recursion closed the OpenCode-vs-Codex gap for Gemini on WorkBuddy-Bench but widened it for GLM-5. Don’t assume uniform improvement.
•
The harness editor in the main results is Claude Opus 4.8, a strong model. The same-model experiment shows the method still helps with weaker editors, but absolute gains differ.
•
Benchmarks are professional-task suites with LLM-judge or hidden-test scoring. These are not identical to arbitrary production workloads, and judge-based scoring has its own noise.