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

Manuscript Offprint

arXiv:2608.20169

Task-CoEvolve: Efficient Harness Optimization via Adaptive Validation Task Selection

Atsuyuki Miyai, Kiyoharu Aizawa, Toshihiko Yamasaki

Abstract

We present a novel approach to efficient LLM harness optimization through adaptive validation task selection. Harness optimization iteratively rewrites the harness code based on validation performance, enabling substantial performance gains without updating the underlying model weights. Existing approaches, however, evaluate a fixed validation set in full at every iteration, incurring substantial evaluation costs even on tasks that become less discriminative as the harness evolves. We propose Task-CoEvolve, which co-evolves the validation tasks with the harness by addressing two challenges: selecting informative tasks and estimating full-set performance from partial evaluations. Task-CoEvolve builds on the observation that tasks on which candidate harnesses disagree are more informative for distinguishing among them than tasks that are consistently solved or failed. It uses variance-weighted sampling based on past outcomes to focus evaluation on tasks near the capability frontier, with the sampling distribution adapting as the harness evolves. It then estimates full-set scores from the sampled tasks by accounting for their sampling probabilities, enabling consistent comparisons across iterations despite evaluating different subsets. Experiments on online text classification and Terminal-Bench 2.1 show that Task-CoEvolve consistently outperforms subset-based baselines and matches the final performance of full-set search while reducing the number of evaluations during optimization by 80%. Code will be released at https://github.com/Agent4Science-UTokyo/Task-CoEvolve.

Figure 1: Comparison between existing harness optimization and our Task-CoEvolve.

1 Introduction

When deploying LLM agents to real-world tasks, the design of the harness, the code that determines what to store, what to retrieve, and what to present to the model, is critical. Indeed, simply changing the harness around a fixed LLM has been shown to yield up to a 6×6\times difference in performance on the same benchmark (26), suggesting that the harness can matter as much as the underlying model itself. Traditionally, harnesses have been designed by hand (35; 30; 19; 14), but their vast design space makes this process costly and reliant on extensive trial and error. Recently, automated harness optimization has begun to attract considerable attention, where a meta-level agent iteratively rewrites the harness code, evaluates the resulting candidates on a benchmark, and retains changes that improve performance (16; 17; 33; 27; 8; 28).

Existing work on automated harness optimization, however, has largely adopted a naive evaluation strategy: at every iteration, each candidate harness is evaluated on the entire fixed set of validation tasks (16; 17; 33; 27). While simple to implement and straightforward for comparing candidates, this strategy has two key limitations. First, it is expensive. Every iteration requires inference over the full validation set, and when individual tasks are costly to execute, such as long-horizon terminal tasks that occupy a sandbox environment for tens of minutes (19), evaluation can dominate the cost of the entire optimization loop. Second, it is static. As the harness evolves, the tasks that meaningfully discriminate among candidates also change. Tasks that every candidate can already solve, or that no candidate can yet solve, continue to consume the evaluation budget while providing little signal for optimization. Overcoming these limitations requires balancing evaluation cost against the informativeness of the resulting optimization signal and adapting the validation tasks themselves as the harness evolves.

In this paper, we study efficient harness optimization using only a subset of validation tasks at each iteration. We propose Task-CoEvolve that co-evolves the validation task set alongside the harness (Figure 1). Task-CoEvolve addresses two challenges: (i) selecting tasks that best discriminate among candidate harnesses and (ii) making evaluations comparable across iterations despite using different subsets. For (i), we observe that tasks where candidates have different outcomes are more informative, while tasks that are always solved or failed provide little information for ranking candidates. We measure this using the Bernoulli variance of each task’s historical success rate, which becomes large when success and failure are balanced. As the harness evolves, the sampling distribution also changes to focus on informative tasks for the current harness. For (ii), we use task inclusion probabilities to estimate full-set scores from each sampled subset, providing a common evaluation criterion across iterations. Together, these components concentrate evaluation on informative tasks while enabling fair comparison and final selection without evaluating the full validation set at every iteration.

Following prior work (16), we evaluate Task-CoEvolve on online text classification (6; 7; 24) and Terminal-Bench 2.1 (19), a benchmark for long-horizon terminal agents. On text classification, Task-CoEvolve approaches full-set search even with an extreme evaluation budget of only 7%. With a 20% evaluation budget, Task-CoEvolve even outperforms full-set search. On Terminal-Bench 2.1, Task-CoEvolve matches the performance of full-set search using only 20% of the evaluations, while reducing the overall search cost by 67-80%. Our contributions are summarized as follows:

  • Problem Setting. We introduce the problem of optimizing which tasks are used to evaluate candidate harnesses. This direction is orthogonal to prior efficiency approaches that reduce the number of candidates, instead reducing the evaluation cost per candidate.
  • Task-CoEvolve. We propose Task-CoEvolve, which combines adaptive task selection based on discriminative power with full-set score estimation from partial evaluations (Figure 1). The former concentrates the evaluation budget near the capability frontier, while the latter provides a common evaluation criterion across different subsets.
  • Empirical Findings. On text classification, Task-CoEvolve approaches full-set search with only 7% of the evaluation budget and surpasses it with 20% (Table 1). On Terminal-Bench 2.1, it achieves comparable performance while reducing search costs by 67–80%.

References (21)