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 ChenarXiv 2026

TL;DR

DarwinX is a framework that evolves an LLM agent's "harness"—its prompts, tools, and control flow—through natural selection while keeping the underlying model weights frozen. By maintaining a population of harness variants and enforcing a "preserve-and-extend" contract, it achieves state-of-the-art performance and robust generalization across diverse benchmarks, proving that significant capability gains can be "evolved" rather than just trained.

What Problem Does This Paper Address?

The performance of a modern LLM agent depends as much on its harness (the scaffolding of prompts, tools, and logic surrounding the model) as it does on the model's weights. While researchers have tried to automate the improvement of these harnesses, two major hurdles remain:

  1. Path Dependence: Single-lineage search methods (where one version is iteratively improved) often get stuck in local optima, biased by early, suboptimal edits.
  2. Cross-Task Interference: An edit that helps the agent solve one type of task often silently breaks its ability to solve another.

DarwinX addresses these by moving away from "hill climbing" on a single agent and instead treating agent improvement as a population-level evolutionary process.

Methods

DarwinX treats self-evolution as selection over a population of harnesses with the model frozen. Its architecture is built on three core pillars:

  • Preserve-and-Extend Contract: A new harness variant (a "child") is only admitted to the population if it solves at least one new task without regressing on previously solved tasks (within a small noise tolerance).
  • Population Archive & Recombination: Instead of keeping only the "best" agent, DarwinX maintains a tree-shaped archive of lineages. This allows the system to merge "specialists"—variants that have become good at different task clusters—into a single, more capable child.
  • Modular Learning Signals: The system uses a unified interface to propose edits based on three types of evidence: failure-derived diagnoses, teacher-derived demonstrations, and self-derived rollout contrasts (comparing successful vs. failed attempts on the same task).
The DarwinX selection loop and evolutionary operators.

The selection process is driven by a Reasoned Verifier, an agent that adjudicates whether a candidate harness has truly earned its place based on measured fitness (avg@k solve rate) and trial evidence.

Datasets

The authors evaluated DarwinX across four regimes of increasing difficulty to test for both adaptation and generalization:

  1. Terminal-Bench 2.1: In-domain test-time evolution on 89 terminal-based tasks.
  2. TerminalWorld: Held-out task generalization, where the agent evolves on 94 tasks and is tested on 41 disjoint tasks.
  3. WebArena-Infinity (WAI): Synthetic-to-real generalization. The agent evolves using 300 synthetic intents and is evaluated on 1,260 real-world web tasks.
  4. SWE-bench Verified: Cross-benchmark transfer. A harness evolved on Terminal-Bench 2.1 is run unchanged on 500 software engineering issues.

Key Insights and Ideas

  • Harness Evolution vs. Weight Training: The paper demonstrates that a frozen model is not a fixed agent. Selection over the harness can turn evaluation compute into durable, transferable capabilities.
  • Literal Natural Selection: Unlike many RL approaches, DarwinX requires no "gold" solutions or hand-picked winners. It relies entirely on the environment's own verifiers to determine fitness.
  • The Power of the Archive: Retaining "losers" (variants that might be worse on average but solve a unique task) is crucial. These specialists provide the genetic material needed for future recombinations that unlock new performance frontiers.
  • Targeted Compute: Analysis shows that evolved agents don't just spend more compute everywhere; they intelligently allocate extra turns and tokens to the specific hard tasks they are newly able to solve.

Key Results

DarwinX consistently matched or outperformed the strongest prior agents across all benchmarks:

  • Terminal-Bench 2.1: Reached the verified frontier at 84.7% (on GPT-5.6 Sol), surpassing the previous leader (Claude Code + Fable 5).
  • WebArena-Infinity: Achieved a massive jump from 43.5% to 93.0% audit-clean pass@1, showing that browser behaviors evolved on synthetic data generalize remarkably well to real tasks.
  • Cross-Benchmark Transfer: The Terminal-Bench harness transferred to SWE-bench Verified with a +3.4 point gain over a strong reference, proving the evolved skills (like verification and contract-checking) are general-purpose.
Figure 1: With the base model frozen, evolving the harness alone matches or beats the strongest prior agent on four benchmarks. Left: variants survive on measured fitness (avg@k, no gold solutions) and complementary survivors are merged. Right: bars within a panel share one frozen model; the hatched bar is zero-shot transfer of the Terminal-Bench 2.1 harness. y-ranges are truncated and differ per panel.

Limitations and Future Work

  • Diversity Bottleneck: The success of the population-based approach depends on the system's ability to generate diverse initial wins. If the proposer cannot find "stepping stone" edits, the archive cannot grow.
  • Internal Accounting: While the complete system is highly effective, the individual contributions of the recombination operator versus single-lineage mutation require further controlled ablation.
  • Inference Cost: The use of noise-aware avg@k metrics for selection is computationally expensive, making it more suitable for periodic offline "evolutionary leaps" than continuous online learning.
  • Future Directions: The authors suggest co-evolving model weights and harnesses in alternating phases, treating the harness as a long-lived asset that can outlast specific model generations.

Summary updated

BibTeX
@misc{zhang2026darwinx,
  author = {Yifan Zhang and Yutong Dai and Juntao Tan and Luyu Yang and Rishi Mullur and Thai Hoang and Zhiyuan Hu and James Zhu and Phil Mui and Silvio Savarese and Ran Xu and Zeyuan Chen},
  title = {{DarwinX: Evolving Agent Harnesses Through Natural Selection}},
  year = {2026},
  eprint = {2608.07545},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.07545},
}
Figure