arXiv(opens in a new tab)cs.AIOct 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2610.02616

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. Reddy

ABSTRACT

Harness evolution improves an LLM agent's prompts, tools, and workflow, while the optimizer's own tools and procedures often remain fixed. We study whether an optimizer can improve another agent more effectively by also improving how it diagnoses failures, develops edits, and tests their effects. Two observations guide our design. In a controlled study, optimizer self-evolution fails to improve performance without execution-based verification, but achieves the best result of that study when verification is available. Across five executors, self-evolving optimizers build their own tools for failure analysis, verification, training audits, and workflow control. Motivated by these findings, we introduce VERSE, a Verified Self-Evolving optimizer for agent harnesses. VERSE lets the optimizer test draft edits, replay failures, and perturb suspected steps before submission, while tracking fixes and regressions across rounds. Using this feedback, the optimizer revises both the executor harness and its own prompts, skills, tools, hooks, and notes, while the weights of the optimizer and executor models stay fixed. Under a shared protocol with disjoint training, validation, and test tasks, VERSE improves all four evaluated harness optimizers on held-out SWE-rebench tasks and newer out-of-distribution tasks in five languages. Its best validation-selected harness reaches 42.3% and 37.7% accuracy, respectively, against 39.2% and 29.3% for the strongest baselines. Code is available at https://github.com/wzekai/VERSE.

1 INTRODUCTION

An LLM agent is a model wrapped in a harness: the prompts, tools, memory, and control flow that turn a language model into a system that acts. On agentic benchmarks such as SWE-bench (Jimenez et al., 2024) and Terminal-Bench (Merrill et al., 2026), the harness often matters as much as the model. In harness evolution, an LLM optimizer reads the failed trajectories of a frozen executor agent and edits the executor's harness, over several rounds (Lee et al., 2026b; Lin et al., 2026; Zhang et al., 2026a; Chen et al., 2026c; Nie et al., 2026). The optimizer's own harness, however, stays fixed: it is a hand-built pipeline or an off-the-shelf coding agent (Lee et al., 2026b; Lin et al., 2026; Chen et al., 2026c; Park et al., 2026), or, when one model plays both roles, a fixed loop that proposes and accepts edits (Zhang et al., 2026a). Lessons from earlier rounds shape the executor's next harness, but not how the optimizer works. Can the optimizer evolve its own harness as well?

Simply allowing it did not help (Section 2). When we added self-evolution to Meta-Harness (Lee et al., 2026b), the optimizer wrote untested lessons into its own harness, and no later round beat the initial harness on validation. The optimizer learns only from trajectories and scores, and it sees the effect of an edit one round later. Reading trajectories can mislead: optimizers can report failures that never occurred (Wang et al., 2026a), and evolved harnesses can gain little on new tasks (Wang et al., 2026b). Once the same optimizer could run a draft edit on a training task before submitting it, self-evolution gave the best result among the settings we compared. Execution checks give a self-evolving optimizer evidence about which of its lessons hold.

†^{\dagger}Work done during an internship at Amazon.

Correspondence to: Zekai Wang zekai@mit.edu, Yingqiang Ge gyq@amazon.com.

Figure

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.

A second study shows what a self-evolving optimizer builds for itself. Across five executors, it tends to build tools that find the causes of failures, checks that a draft works, notes on which fixes held, and rules for its own workflow. Some recent self-improving systems also revise their own improvement procedure (Wang et al., 2026d; Zhang et al., 2026c; Zhou, 2026) (Appendix A). Together, the two studies suggest a design: give the optimizer reliable execution checks from the first round, and let it evolve how it uses them.

These observations motivate our method, VERSE, which combines execution checks with optimizer self-evolution. VERSE provides from the first round what the self-evolving optimizer built for itself. Trace minimization cuts a failed trajectory down to the few steps that still reproduce the failure. We design three verification tools, and the optimizer decides when and how to call them: they run a draft on the tasks it targets, replay a recorded failure to check that it reproduces, and change a single step to test whether that step causes the failure. A training audit records which fixes held in later rounds and which broke. Between rounds, the optimizer revises its own prompts, skills, tools, hooks, and notes. This makes harness evolution a bilevel process: the inner loop edits the executor's harness, and the outer loop edits the optimizer's own harness (Section 3.1).

We study this design in theory and in experiments. Our contributions are as follows.

• Two studies: optimizer self-evolution helped only with execution-based verification, and the optimizer builds its own tools for failure analysis and verification. They motivate VERSE, which provides such tools and lets the optimizer evolve its own harness (Sections 2–3).

• A theoretical framework that views harness evolution as bilevel learning to generalize to new tasks. We prove that when the recorded evidence is ambiguous, reading trajectories alone leaves a minimum rate of wrong repairs, which executed checks can lower, and that wrong repairs limit what self-evolution can gain (Section 3.2).

• Experiments on SWE-rebench, where VERSE improves all four published harness optimizers it is added to, both on the test set and on newer out-of-distribution tasks. In the evolution logs, few draft edits fix their targets, and self-evolving optimizers add regression checks (Section 4).

References (55)