Task-CoEvolve: Efficient Harness Optimization via Adaptive Validation Task Selection
Organizations: The University of Tokyo
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 , 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.
Figures & tables
| Method | Val/iter | Evals | USPTO | S2D | Law | Avg | ||
| Hand-designed harnesses | ||||||||
| Zero-shot | – | 1 | – | – | 13.0 | 66.0 | 9.0 | 29.3 |
| Few-shot | – | 1 | – | – | 15.0 | 84.9 | 25.0 | 41.6 |
| MCE ( 30 ) † | – | 1 | – | – | 14.0 | 83.0 | 23.0 | 40.0 |
| ACE ( 35 ) † | – | 1 | – | – | 16.0 | 77.8 | 29.0 | 40.9 |
| Evolved harnesses (harness search) | ||||||||
| Method | GPT-5.6 Luna | Qwen3.6-35B-A3B | Avg | |
| Starting harnesses (hand-designed) | ||||
| Terminus-KIRA | – | 49.4 | 32.6 | 41.0 |
| Terminus 2 | – | 52.8 | 34.8 | 43.8 |
| Evolved harnesses (harness search) | ||||
| Meta-Harness (Full search) | 100% | 62.9 | 42.7 | 52.8 |
| Naive | 20% | 55.1 | 39.3 | 47.2 |
| Method | Trials | Input (M) | Output (M) | vs. Full | Cost (USD) | Time (h) |
| GPT-5.6 Luna | ||||||
| Full search | 890 | 2,888 | 17.0 | – | 117 | 22.2 |
| Naive | 180 | 223 | 2.3 | 92% | 12 | 11.9 |
| Random-Resample | 180 | 124 | 2.1 | 96% | 8 | 9.6 |
| Task-CoEvolve (ours) | 180 | 579 | 5.7 | 80% | 30 | 11.5 |
| Qwen3.6-35B-A3B (self-hosted) | ||||||
| Configuration | Rot. | Est. | VWS | Mean | |
| Naive (fixed subset) | 3 | 47.2 0.6 | |||
| + Random-Resample (uniform, raw val) | ✓ | 3 | 48.2 0.5 | ||
| + Full estimation + -max | ✓ | ✓ | 3 | 48.8 1.4 | |
| + Variance-weighted selection (Task-CoEvolve) | ✓ | ✓ | ✓ | 3 | 49.3 0.8 |
| Online text classification (7%) | iter 0 | iter 4 | iter 10 | iter 20 |
| Nobody solves it | 74 | 45 | 45 | 45 |
| A few systems solve it | 0 | 23 | 20 | 14 |
| Roughly half solve it (most discriminative) | 22 | 14 | 10 | 13 |
| Almost everybody solves it | 34 | 48 | 55 | 58 |
| Terminal-Bench 2.1 (GPT-5.6 Luna, 20%) | iter 0 | iter 4 | iter 7 | iter 10 |
| Nobody solves it | 32 | 26 | 23 | 21 |
| Spearman ( vs. true) | 0.13 | 0.62 |
| Winner rank by true score | 10 / 60 | 12 / 60 |
| True score: winner / best | 46.4 / 47.8 | 51.3 / 54.7 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Estimator | Test accuracy | |
| 20% | Hájek (Eq. 3 ) | 49.3 0.8 |
| Difference (Eq. 4 ) | 46.0 2.6 | |
| 7% | Hájek (Eq. 3 ) | 47.6 0.9 |
| Difference (Eq. 4 ) | 44.0 3.0 |
| Method | Ties | Earliest | Latest | |
| 7% | Naive | 13–16 | 45.2 3.2 | 41.8 1.0 |
| Random-Resample | 2–5 | 47.0 2.2 | 45.6 3.7 | |
| Task-CoEvolve | 1 | 47.6 0.9 | 47.6 0.9 | |
| 20% | Naive | 4–12 | 47.2 0.6 | 47.1 1.2 |
| Random-Resample | 1–2 | 48.2 0.5 | 47.9 1.0 | |
| Task-CoEvolve | 1 | 49.3 0.8 | 49.3 0.8 |
| Dataset | Zero-shot | Few-shot | Mean | ||
| USPTO ( ) | 3% | 13% | 0.08 | 26 | 1 |
| S2D ( ) | 62% | 80% | 0.71 | 9 | 30 |
| LawBench ( ) | 6% | 22% | 0.14 | 39 | 3 |
| Symbol | Description | Value |
| Weight floor for tasks never solved so far | 0.125 | |
| Uncertainty bonus coefficient in | 0.025 | |
| – | Monte Carlo repetitions for estimating | 4,000 |
| – | History window for computing | all past iterations |
| Sampling rate (evaluation budget) | 7%, 20% |
| Model | Terminus 2 | Search | Gain |
| Qwen3.6-35B-A3B | 34.8 | 42.7 | |
| GPT-5.6 Luna | 52.8 | 62.9 | |
| DeepSeek-V4-Flash | 70.8 | 70.8 |
Agent Harness Optimization
Agent harness optimization improves the prompts, tools, memory, workflows, and control code that shape how AI agents act.
See all 183 papers