Verify Smarter, Evolve Further: Efficient Harness Evolution through Behavior-Aware Verification

Jinghan Xu, Yikai Zhang, Aili Chen, Weiyuan Li, Jiaqing Liang, Deqing YangarXiv 2026

TL;DR

Automated evolution of LLM agent harnesses typically relies on expensive, fixed task sets that dilute evaluation signals and waste compute. HarnessLens solves this by dynamically selecting behavior-relevant tasks to verify specific modifications, improving agent performance by up to 13.6% while using a fraction of the interaction budget required by traditional methods.

What Problem Does This Paper Address?

An LLM agent's "harness"—the instructions, tool descriptions, prompts, and runtime permissions it operates under—profoundly shapes how it perceives and interacts with an environment. Because manually tuning a harness is tedious and highly environment-dependent, researchers have turned to automated "propose-and-verify" optimization loops.

However, existing frameworks suffer from a fundamental flaw: they evaluate every single candidate modification against a static, predefined batch of tasks. This introduces two major inefficiencies:

  1. Wasted Compute: It spends a tight interaction budget running tasks completely unrelated to the specific behavior being modified.
  2. Diluted Signals: The true impact of a targeted modification gets drowned out by the inherent noise and variation of unrelated rollouts, allowing subtle regressions to slip through unnoticed under aggregate scores.
Figure 1: Comparison of verification paradigms: Fixed or random batches dilute candidate-specific sig- nals, while our behavior-aware batches enable clearer and more efficient verification.

Methods

The authors introduce HarnessLens, a budget-aware framework that treats harness evolution as a targeted, behavior-aware verification problem. Instead of blanket testing, it structures the optimization process into three distinct stages:

  1. Context Exploration: Before executing any tasks, HarnessLens analyzes task queries and schemas to group them by primary user goals (Task-Space) and maps out the editable components of the harness framework (Harness-Space).
  2. Trajectory Diagnosis: It extracts "reusable experiences" and "recurring deficiencies" from agent execution rollouts, transforming raw trajectories into actionable modification proposals.
  3. Harness Evolution: An evolution agent selects a proposal and curates a tailored verification batch. This batch consists of tasks directly relevant to the targeted behavior alongside tasks designed to check for regression risks.

Crucially, HarnessLens employs an attributable-evidence gate. A candidate modification is only accepted if the improvement can be explicitly traced back to the change, followed by a strict confirmation round on entirely fresh tasks to prevent overfitting.

Figure 2: Overview of HARNESSLENS. Context Exploration characterizes available tasks and identifies user- configurable components. Trajectory Diagnosis extracts and analyzes rollout evidence and is reused within Harness Evolution, which constructs and verifies modifications. The entire process is constrained by a fixed interaction budget.

Datasets

The framework was evaluated across three distinct agent harnesses (OpenCode, Codex CLI, and Pi Coding Agent) using four demanding benchmarks:

  • $\tau^2$-bench Retail: Evaluates conversational agents in a complex retail environment.
  • $\tau^3$-bench Banking Knowledge: Tests conversational agents leveraging unstructured banking data.
  • Terminal-Bench 2.0: Focuses on practical command-line interface task execution.
  • BIRD Mini-Dev (Challenging subset): A large-scale database text-to-SQL benchmark.

Key Insights and Ideas

  • More Rollouts $\neq$ Better Harnesses: Surprisingly, throwing more compute at verification can actually degrade final performance. Baselines like Self-Harness use up to 4,800 rollouts but perform worse than HarnessLens. Evaluating on fixed sets allows chance improvements on noisy tasks to accumulate, masking real regressions that only show up during final testing.
  • Verification as a Quality Filter: By focusing on attributable changes, HarnessLens acts as a strict quality gate. If a modification doesn't show clear, isolated proof of success, it is rejected. As a result, the framework never regresses below the initial baseline harness ($H_0$).
  • Task Diversity Dictates Feasibility: In highly uniform task spaces (like BIRD's SQL queries), a single targeted fix generalizes easily. In highly diverse task spaces (like Terminal-Bench), finding a broad rule that doesn't cause a regression elsewhere is significantly harder, highlighting why localized, behavior-aware testing is necessary.

Key Results

  • Superior Performance: HarnessLens achieved the best or tied-best pass rate in 8 out of 12 harness-benchmark pairs. It boosted absolute success rates by up to 13.6% on OpenCode, 7.6% on Codex, and 9.2% on Pi.
  • Massive Budget Efficiency: HarnessLens achieved these gains while capped at just 200 interaction units (which includes both task rollouts and LLM sessions). In comparison, baselines consumed anywhere from 300 to 4,800 rollouts alone.

Limitations and Future Work

While highly effective, the authors note a few limitations:

  • Model Scope: The evaluation was restricted to a single model family (deepseek-v4-flash-preview). Its generalizability across other LLM architectures remains to be fully validated.
  • Cost Metrics: The budget tracking counts raw interaction units (LLM sessions and task trials) but does not normalize token usage, latency, or actual monetary costs, which can vary significantly depending on the complexity of the agent's role.

Summary updated

BibTeX
@misc{xu2026verify,
  author = {Jinghan Xu and Yikai Zhang and Aili Chen and Weiyuan Li and Jiaqing Liang and Deqing Yang},
  title = {{Verify Smarter, Evolve Further: Efficient Harness Evolution through Behavior-Aware Verification}},
  year = {2026},
  eprint = {2608.27311},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.27311},
}
Figure