DarwinXEvolving Agent Harnesses Through Natural Selection

Yifan Zhang◦1, Yutong Dai◦1, Juntao Tan*1, Luyu Yang*1, Rishi Mullur1, Thai Hoang1, Zhiyuan Hu1, James Zhu†2, Phil Mui†2, Silvio Savarese†1, Ran Xu†1, Zeyuan Chen†1

1Salesforce AI Research    2Salesforce Agentforce

First authors   *Core authors   Senior authors

Variants are evolved from a base agent, survivors are kept and merged, pruned lineages are dropped, all with the model frozen.
With the base model frozen, evolving the harness alone matches or beats the strongest prior agent on four benchmarks. Variants survive on measured fitness (avg@k, no gold solutions) and complementary survivors are merged. Click for the paper's full figure.
y-axis

Abstract

An LLM agent's capability depends not only on model weights but on its harness: prompts, tools, skills, and control flow. Self-improvement loops already edit harnesses, yet single-lineage search is path-dependent and local wins often regress other tasks. We introduce DarwinX, which treats self-evolution as selection over a population of harnesses with the model frozen: a preserve-and-extend contract admits only variants that extend coverage without regressing, an archive keeps alternative lineages for recombination, and failure-, teacher-, and self-derived evidence share one edit interface. Fitness comes from each benchmark's own verifier: no gold solutions, no hand-picked winners.

Across four benchmarks that progressively separate the evolution signal from the test, one loop adds about 17 points on average: Terminal-Bench 2.1 rises +7.7 to 83.2% on a matched base and to the verified frontier at 84.7% on a stronger one; TerminalWorld's held-out split reaches 68.3%, ahead of every off-the-shelf agent; WebArena-Infinity real-task pass@1 rises from 43.5% to 93.0% audit-clean; and a Terminal-Bench 2.1 harness transfers unchanged to SWE-bench Verified. What evolves is general agent competence, not benchmark-specific patches, so it survives changes of task, verifier, and base model. A frozen model need not be a fixed agent: harness selection turns evaluation compute into durable capability.

Method

Overview of the DarwinX loop.
DarwinX per-generation operators: mutation loop, variant classification, and the merge operator.
DarwinX's per-generation operators. Left: the mutation loop and the three learning signals that drive it. Middle: variants classified by how their solved set changes, where those preserving inherited solves stay eligible for recombination while the rest contribute only distilled lessons. Right: the merge operator and its acceptance criterion.

Results at a glance

Terminal-Bench 2.1 · avg@5
84.7%+7.7 on matched base
Verified-leaderboard frontier on a frozen GPT-5.6 Sol at medium effort. On GPT-5.5, 75.5% → 83.2%.
TerminalWorld · held-out split
68.3%+7.3
28/41 held-out tasks on a frozen Opus 4.8, above every off-the-shelf agent we measured.
WebArena-Infinity · audit-clean pass@1
93.0%+49.5 pp
1,260 real tasks, evolved on synthetic intents only. Base 43.5%; best same-model baseline 86.1%.
SWE-bench Verified · zero-shot transfer
84.2%+3.4
421/500 official pass@1 from the Terminal-Bench 2.1 harness run unchanged, with no SWE-V feedback.

The four benchmarks progressively separate the evolution signal from the test: in-domain (Terminal-Bench 2.1), held-out task split (TerminalWorld), synthetic → real intent shift (WebArena-Infinity), and zero-shot cross-benchmark transfer (SWE-bench Verified).

Benchmark detail

Terminal-Bench 2.1 — in-domain evolution

89 tasks. Evolution and evaluation share the task distribution; the model is frozen and only the harness changes.

Terminal-Bench 2.1, avg@5 under the strict leaderboard rule (binary avg@5, k=5, errored trials score zero). Both DarwinX rows are leaderboard submissions, reported before the leaderboard's uniform reward-hacking pass.
AgentModel / effortavg@5
Monet (DarwinX)GPT-5.6 Sol / medium84.7 ± 1.2
Claude CodeFable 5 / xhigh83.8 ± 1.2
Monet (DarwinX)GPT-5.5 / high83.2 ± 1.2
CodexGPT-5.5 / xhigh83.1 ± 1.1
OpenAI referenceGPT-5.6 Sol / medium81.8
Terminus 2GPT-5.5 / xhigh78.0 ± 1.2
Monet (base)GPT-5.5 / default75.5 ± 3.5

At 84.7% DarwinX matches or exceeds the verified leader (Claude Code + Fable 5, 83.8% at xhigh) while running at a lower effort setting, and adds +2.9 points over OpenAI's own native single-agent GPT-5.6 Sol at the same medium effort. Against a neutral harness on the same GPT-5.5 base (Terminus 2, 78.0%), the pure harness gain is +5.2 points — so the improvement is the harness, not the model or the effort setting.

Where evolution helps

Per-cluster avg@5 on a frozen GPT-5.5. Sort by any column and hover a bar for exact rates.

Sort by
Monet (base) Monet (DarwinX)

Gains concentrate where a frozen base has the most headroom: ML & scientific computing (+14.8, the largest cluster at 23 tasks) and data & databases (+13.8). Clusters where the base is already strong barely move, and none regresses beyond the per-task noise band. Paired protocol over 88 tasks, which excludes one task with no paired evolved trial; the headline 83.2% uses the stricter 89-task leaderboard rule above.

The gain is the harness, not compute

Per-task compute, median over clean attempts.

Metric
Monet (base) Monet (DarwinX)

TerminalWorld — held-out task split

Evolve on 94 verifier-scored training tasks, then freeze the harness and evaluate on 41 disjoint held-out tasks. Single-attempt pass@1, no retries and no best-of-k, so no held-out reward can feed back into the archive.

TerminalWorld held-out pass@1 (41 tasks, single attempt, frozen base models, identical verifier and infrastructure).
AgentModelpass@1
Monet (DarwinX)Opus 4.868.3%
Claude CodeOpus 4.865.9%
Monet (base)Opus 4.861.0%
Terminus-2GPT-5.561.0%
Terminus-2Opus 4.858.5%
Monet (DarwinX)GPT-5.556.1%
CodexGPT-5.551.2%
Monet (base)GPT-5.548.8%
x-axis

Held-out generalization reflects archive diversity: four evolved specialists each solve a different subset of the 41 tasks, and the merged Monet (DarwinX) exceeds every specialist and the Claude Code reference (dashed).

The in-loop proxy overfits; the population absorbs it

During evolution the training-subset score saturates from 0.505 to 1.000, yet held-out pass@1 is 68.3% — a 31.7-point gap between the proxy the search maximizes and the held-out truth it never sees. Crucially, the variant that best fits the proxy is not the best generalizer: four high-scoring specialists solve 24, 25, 26, and 27 of the 41 held-out tasks on overlapping but distinct subsets, and their merge reaches 28/41. Keeping a population, rather than following the single best-scoring lineage, is what converts an overfit proxy into held-out gain.

Explore the merge: which specialists cover which held-out tasks

Every cell is one of the 41 held-out tasks, filled when at least one selected specialist solves it. Toggle specialists to watch coverage grow, and turn on the comparison to see how the harness DarwinX actually produced differs from the plain union. Hover any cell for its task id. Built from the per-task records of the five evaluation runs.

Specialists
solved by selection unsolved

WebArena-Infinity — synthetic → real intent shift

Evolution sees synthetic intents only; evaluation is the official 1,260-task real suite across 10 applications. We report audit-clean pass@1 throughout: trajectories flagged invalid by the validity audit count as failures even when the verifier passes them.

WebArena-Infinity audit-clean pass@1 by application. Click any column header to sort. External baselines are as-reported without re-auditing, which makes this comparison conservative for DarwinX. BU = Browser Use.
Application KimiQwenGemini+BU GPT-5.5+BUMonet (base) Monet (DarwinX)Δ
Elation clinical records50.054.281.792.595.896.7+0.9
Elation prescriptions23.341.780.890.820.095.0+75.0
GitLab plan and track39.337.163.677.963.697.9+34.3
Gmail70.056.775.085.025.098.3+73.3
Gmail accounts and contacts40.033.361.787.521.791.7+70.0
Handshake career exploration50.050.550.583.536.584.0+47.5
Linear account settings54.265.873.381.743.394.2+50.9
PayPal wallet70.771.488.690.049.395.7+46.4
Superhuman general15.025.850.080.831.787.5+55.8
Xero invoicing52.555.880.893.339.296.7+57.5
Overall43.348.369.386.143.593.0+49.5

93.0% audit-clean beats the strongest same-model baseline (GPT-5.5 + Browser Use, 86.1%) by 6.9 points and the top public agent (Gemini 3 Flash + Browser Use, 69.3%) by 23.7 points. Given differing action spaces across public agents, we treat the same-model gap as the primary comparison. In counts, the base solves 548/1,260 and the evolved harness 1,171/1,260.

Evolution as optimization

Screening score of every evaluated variant in the WebArena-Infinity run, in archive order. Hover a point for its score; the line is the best-so-far envelope.

Show

Archive lineage tree with accepted and reverted variants, the primary lineage, and recombination edges.
The same run as an archive lineage tree (node size ∝ screening score): accepted (blue) and reverted (grey) variants, the primary lineage (gold, base → evolved), and recombination edges (dashed). The reverted nodes are the preserve-and-extend contract doing its job: a variant that broke an inherited solve contributes its distilled lesson but not its edit.

Anti-cheating audit

Validity audit on the 1,260 real tasks. Trajectories that reach the goal through the evaluation plane, privileged knowledge, or exploits are counted as failures.
MeasureMonet (base)Monet (DarwinX)Δ
Audit-clean pass@143.593.0+49.5 pp
Confirmed invalid23.5%1.4%−22.1 pp
Human review5.1%0.1%−5.0 pp
Blocked attempt14.3%0.1%−14.2 pp

Evolution does not buy the gain with shortcuts: it cuts invalid trajectories from 293 to 17, the evaluation-plane, privileged-knowledge, and exploit mechanisms disappear entirely, and the residual 17 are all raw-state mutations concentrated in a single application. Dropping unaudited successes too still leaves 92.9%.

Break down by

Invalid trajectories before vs. after evolution. On a shared scale the second row is almost invisible, which is the result: 293 invalid trajectories become 17. Scale each row to its own total to inspect what the remainder is made of.

What the audit costs each harness

Each line runs from raw pass@1 to pass@1 after the validity audit. A long line means the harness was leaning on trajectories the audit rejects.

Show
raw pass@1 base, audited DarwinX, audited

SWE-bench Verified — zero-shot cross-benchmark transfer

The best Terminal-Bench 2.1 harness is run unchanged on all 500 SWE-bench Verified instances. No SWE-V feedback ever enters the loop; we report it as a transfer target only and run no in-domain SWE-V evolution.

SWE-bench Verified official pass@1, graded by SWE-V's own test harness.
HarnessSolvedpass@1
Monet (DarwinX), TB2.1-specialized, transferred unchanged421/50084.2%
Fix-skill reference80.8%

+3.4 points over the reference without receiving any SWE-V feedback. The transferred agent preserves strong repository-level competence, so what evolved on terminal tasks is general agent capability rather than benchmark-specific patching.

Ablation: what evolution changes

Anchored on Terminal-Bench 2.1, we compare base Monet (75.5%) with the evolved best (83.2%) along two axes: the skill-bundle diff between the two harnesses, and where on the benchmark the gains land. This is an exploratory attribution, not a per-skill causal ablation — the skills were co-selected, not independently randomized.

The seven skills the evolved lineage adds over base Monet. Every one belongs to a single family: verification / artifact-contract. None adds domain knowledge.
Evolved skillsRole
verifier-contract
contract-candidate
Derive the task's acceptance contract and check the solution against it before finalizing.
graded-artifact-final-check
artifact-verification-loop
Verify the graded artifact (output file, format, and values) and iterate a fix-and-recheck loop.
real-tool-artifact
tool-grounded-artifact
Ground outputs in real tool execution rather than asserted or simulated results.
security-contract-repair Repair the solution against security and contract checks.

Where the gains land

Gains concentrate where a frozen base has the most headroom and where verifying against a contract unblocks fragile multi-step work: ML & scientific-computing (+14.8, 60→75%) and data/database (+13.8, 84→98%). Clusters where the base is already strong barely move (system administration 92→98%, security 85→84%, within noise), and no cluster regresses beyond the per-task noise band. That asymmetry is the empirical footprint of the preserve-and-extend rule: extend the fragile clusters, hold the solved ones fixed. The unblocked difficulty is procedural — long dependency installs, environment setup, output verification, multi-step tool use — rather than knowledge-bound, which matches a verification/artifact-contract bundle rather than a stronger model.

Cross-benchmark cross-checks

WebArena-Infinity, the same family in a different modality. The evolved browser harness adds the same kind of skills (state and action contracts), and its confirmed-invalid rate falls from 23.5% to 1.4% while audit-clean pass@1 rises 49.5 points, with the largest gains on state-changing applications. Verification-before-finalization is thus visible under a different interaction modality and reward source.

TerminalWorld, diversity rather than a single skill. Individual specialists solve 24–27 held-out tasks and the merged harness solves 28, so the archive is valuable as a source of complementary behaviors even when the training-subset ranking is noisy.

Together these make verification-before-finalization and contract-aware tool use a plausible shared mechanism across benchmarks, offered as an explanation rather than a per-skill causal estimate.

Limitations

BibTeX

@article{zhang2026darwinx,
  title   = {DarwinX: Evolving Agent Harnesses Through Natural Selection},
  author  = {Zhang, Yifan and Dai, Yutong and Tan, Juntao and Yang, Luyu and
             Mullur, Rishi and Hoang, Thai and Hu, Zhiyuan and Zhu, James and
             Mui, Phil and Savarese, Silvio and Xu, Ran and Chen, Zeyuan},
  journal = {arXiv preprint arXiv:2608.07545},
  year    = {2026}
}