DarwinX: Natural Selection Over Agent Harnesses Lifts Real Web Tasks From 43% to 93%

DarwinX: Evolving Agent Harnesses Through Natural Selection

Yifan Zhang, Yutong Dai, Juntao Tan, Luyu Yang, Rishi Mullur, Thai Hoang, Zhiyuan Hu, James Zhu, Phil Mui, Silvio Savarese, Ran Xu, Zeyuan Chen

cs.NE, cs.AI, cs.LG, cs.SE

2026-07-31

DarwinX treats agent self-improvement as selection over a population of harnesses, model frozen, lifting audited WebArena-Infinity accuracy from 43.5% to 93.0%.

What problem this solves

Plenty of agent systems already edit their own harness (prompts, tools, control flow) to get better, and nearly all of them share the same inner loop: run a batch of tasks, reflect, propose one bounded edit, gate it against a held-out or regression signal. Two failure modes keep showing up. Path dependence: single-lineage self-editors get biased by their early edits and plateau. Cross-task interference: an edit that fixes one family of tasks silently breaks another, so evolution stalls once the task distribution gets wide enough — many prompt or tool changes win on a narrow subset but lose on the full benchmark. DarwinX's question is how to design a selection process that avoids both, while keeping the underlying model completely frozen.

Method

DarwinX reframes self-evolution as selection over a population of harness variants rather than hill-climbing along a single lineage. The core mechanism is a preserve-and-extend contract: a child harness only earns adoption if it measurably extends the set of solved tasks without a meaningful regression elsewhere. This plays out in three layers. Branch evolution: each round picks a promising parent harness from the archive and generates one additive edit (prompt, skill, tool, control flow, or source code) targeting a task it currently fails; avg@k sampling measures net gain and regression, edits that regress beyond a tolerance are discarded, and only variants that pass a stricter re-test earn the right to steer future search. Population and recombination: every scored variant stays in the archive, including ones that score worse overall, since a losing variant might be the only one that cracks a task no other branch solves; when two variants solve complementary task sets, DarwinX merges their edits into a child that must cover the union of both parents' solved tasks to be accepted. Modular learning signals: failure-derived diagnostics drive ordinary mutations, a stronger reference solver's demonstration trajectories get used on tasks nothing has ever solved, and the agent's own pass/fail contrast handles tasks that are flaky (sometimes solved, sometimes not); all three signal types feed into the same harness-editing interface.

Results

DarwinX is tested across four benchmarks, ordered by increasing separation between the evolution signal and the final test, with the model frozen throughout:

BenchmarkFrozen baseBaseline (unevolved)After DarwinX
Terminal-Bench 2.1 (in-domain)GPT-5.575.5%83.2% (+7.7)
TerminalWorld (held-out)Opus 4.861.0%68.3% (+7.3, beats Claude Code's 65.9% on the same base)
WebArena-Infinity (synthetic-to-real)GPT-5.543.5%93.0% (audit-clean)

On a stronger base (GPT-5.6 Sol, medium effort), Terminal-Bench 2.1 reaches 84.7%, matching the then-verified leaderboard leader (Claude Code + Fable 5 at 83.8%, run at higher effort) while using less inference-time compute. On WebArena-Infinity, an anti-cheating audit found that evaluation-plane violations, privileged-host violations, and exploit/privilege-escalation violations all disappeared after evolution; the 17 remaining violations were all raw-state mutations, meaning the score gain isn't coming from gaming the verifier. A harness evolved purely on Terminal-Bench 2.1, run unchanged on all 500 SWE-bench Verified issues, scores 84.2% official pass@1 (3.4 points above a dedicated fix-skill reference harness), evidence of transfer rather than a benchmark-specific trick.

Why it matters

For teams building self-improving agents, the most useful piece here is the preserve-and-extend mechanism itself. Naive keep-it-if-the-score-goes-up greedy selection eventually runs into the whack-a-mole problem on any mixed task distribution: fix one thing, break another. DarwinX shows that making did this edit hurt anything else a hard gate, combined with keeping losing variants around and merging complementary branches after the fact, substantially reduces path dependence. The cross-benchmark transfer result (a Terminal-Bench-evolved harness gaining points on SWE-bench Verified with zero in-domain feedback) is a strong signal, meaning what evolved is a general habit, not a benchmark-specific shortcut: establish an acceptance contract before acting, then verify against real tool output before finalizing. That's relevant to anyone trying to make an agent self-improve in a real environment with no gold-labeled answers.

Limitations

The authors are candid about scope. The strongest matched-model evidence comes from only two benchmarks, Terminal-Bench 2.1 and WebArena-Infinity; cross-benchmark transfer was only tested in one direction (Terminal-Bench to SWE-bench), with no reverse check. TerminalWorld's held-out split has just 41 tasks, so a single solve shifts pass@1 by 2.4 points, and the authors themselves call the headline comparison (25/41 vs. 28/41, McNemar p=0.45) suggestive rather than statistically decisive. Attribution is similarly cautious: the seven evolved skills all fall into one verification/contract family, but they were co-selected rather than independently ablated one at a time, so the paper frames this as exploratory attribution, not causal proof. The WebArena-Infinity action-validity audit also relies on a two-stage static-analysis-plus-LLM detector rather than a formal sandbox, and the authors acknowledge that sufficiently deep, dynamic cheating attempts would still need human review to catch.

Terms

Source

What people are saying

Related papers

All paper explainers