VERSE: Verified Self-Evolving Optimizer for Agent Harnesses

Zekai Wang, Yingqiang Ge, Zekun Wang, Hai Wang, Yuhui Xu, Joshua Frandsen, Shancong Fu, Ashia C. Wilson, Chandan K. ReddyarXiv 2026

TL;DR

VERSE is a framework for "harness evolution" that allows an LLM optimizer to not only improve a target agent's prompts and tools but also evolve its own optimization strategy. By integrating execution-based verification—letting the optimizer test its own hypotheses before committing to them—VERSE achieves state-of-the-art performance on complex software engineering benchmarks and generalizes remarkably well across different programming languages.

What Problem Does This Paper Address?

Building a capable LLM agent involves more than just a powerful base model; it requires a "harness"—the specific prompts, tools, memory structures, and control flows that enable the model to act. "Harness evolution" is the process of using an LLM-based optimizer to automatically improve this harness by analyzing failed task trajectories.

However, existing optimizers are typically "fixed": they follow a hand-coded, static procedure to propose edits. The authors observed that when these optimizers are allowed to self-evolve (edit their own prompts and tools), they often fail. Without a way to verify their ideas, they tend to hallucinate "lessons" from noisy data, leading to "wrong repairs" that break as much as they fix. The core challenge is: How can we enable an optimizer to safely and effectively improve its own optimization process?

Methods

The authors introduce VERSE (Verified Self-Evolving optimizer), which treats harness evolution as a bilevel optimization process:

  • Inner Loop: The optimizer generates and checks candidate harnesses for the executor agent on training tasks.
  • Outer Loop: The optimizer reviews the results of the round and edits its own harness (prompts, skills, tools, hooks, and notes) to improve its future performance.
Figure 1: Fixed versus self-evolving optimizers. Left: in prior harness optimizers, the optimizer is fixed: it reads trajectories and scores, edits the executor harness h that wraps a frozen base model, and keeps its own harness unchanged. Right: a self-evolving optimizer adds an outer loop: after each round, it updates its own prompts, skills, tools, hooks, and notes from the round’s results.

The defining feature of VERSE is its suite of execution-based verification tools, which provide the empirical evidence needed for successful self-evolution:

  1. Verification Tool: Runs a draft harness on specific tasks to confirm fixes and, crucially, perform regression checks on tasks that were already passing.
  2. Replay Tool: Re-runs recorded trajectories to ensure a failure is reproducible.
  3. Perturbation Tool: Modifies a single step in a failed run to isolate the exact cause of the error.
  4. Trace Minimization: Automatically shrinks long, complex trajectories (often by over 14x) to the few essential steps that reproduce a failure, making analysis much easier for the LLM.
Overview of VERSE. Attribution and audits report on runs, while verification tools allow the optimizer to test edits during the inner loop.

Datasets

  • SWE-rebench: A continuously updated benchmark of real-world GitHub issues. The authors used disjoint sets for training (110 tasks), validation (50 tasks), and in-distribution testing (108 tasks).
  • OOD (Out-of-Distribution) Test Set: A set of 107 newer tasks spanning five languages: Go, Java, Python, Rust, and TypeScript. This tested the framework's ability to generalize beyond its Python-based training.
  • Terminal-Bench: A benchmark focused on complex command-line interface tasks.

Key Insights and Ideas

  • Verification is the Catalyst: The authors found that self-evolution actually decreased performance when verification was unavailable. Verification provides the "ground truth" that prevents the optimizer from writing incorrect lessons into its own harness.
  • Emergent Strategy: When allowed to self-evolve with verification, optimizers naturally began building their own "regression canaries"—testing new edits against tasks that already passed to ensure no new bugs were introduced.
  • Attribution vs. Localization: The study found that while LLMs are good at identifying what kind of failure occurred (attribution), they are relatively poor at pinpointing where it happened (localization) just by reading text. Execution-based tools like perturbation are essential for accurate localization.
  • Bilevel Generalization: Improvements made to the optimizer's own harness (the "how" of optimization) generalized better across different programming languages than specific edits made to the executor's harness.

Key Results

VERSE was added to four different baseline harness optimizers and improved all of them across both test sets.

  • In-Distribution (Python): VERSE reached 42.3% accuracy, a significant jump over the strongest baseline's 39.2%.
  • Out-of-Distribution (Multi-language): VERSE achieved 37.7% accuracy, compared to 29.3% for the best baseline. This represents a massive improvement in cross-language generalization.
  • Efficiency: Trace minimization reduced the median failed trajectory from 129 steps down to just 8, drastically simplifying the optimizer's job.
  • Self-Correction: In 79% of cases where a verification check failed, the self-evolving optimizer revised its draft before submission, compared to only 57% for a fixed optimizer.
Artifacts built by the optimizer for itself across different executor models, categorized by function.

Limitations and Future Work

  • Compute Overhead: VERSE is more computationally expensive than fixed optimizers, taking 1.3x to 2.5x longer in wall-clock time due to the additional verification runs.
  • Host Dependency: While VERSE improved every baseline, the magnitude of the gain varied depending on the "host" optimizer's original design.
  • Future Directions: The authors suggest exploring the co-evolution of model weights alongside the harness, as well as more sophisticated ways for the optimizer to manage its own "memory" of successful and failed strategies across much longer time horizons.

Summary updated

BibTeX
@misc{wang2026verse,
  author = {Zekai Wang and Yingqiang Ge and Zekun Wang and Hai Wang and Yuhui Xu and Joshua Frandsen and Shancong Fu and Ashia C. Wilson and Chandan K. Reddy},
  title = {{VERSE: Verified Self-Evolving Optimizer for Agent Harnesses}},
  year = {2026},
  eprint = {2610.02616},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.02616},
}
Figure