HarnessPro: Recursive Harness Self-Improvement with Pareto Optimization for Performance-Cost Trade-offs
Organizations: Tsinghua University · Z.AI Co., Ltd. · Shanghai Jiao Tong University · University of Warwick ·
Abstract
Harness development plays a crucial role in building capable AI agents. Recent approaches improve harnesses through recursive self-improvement (RSI), but their performance gains often come with higher execution costs. We introduce HarnessPro, a label-free method for evolving harnesses to improve task performance while reducing execution cost. In this setting, candidate harnesses are evaluated using LLM-generated tests without access to ground-truth solutions or official tests. Specialized agents diagnose execution trajectories, plan updates with different performance-cost priorities, and implement them as candidate harnesses. Rather than returning a single harness, HarnessPro uses normalized weighted squared-distance selection to provide cost-focused (lite), balanced (medium), and performance-focused (heavy) harnesses for different deployment budgets. Selected harnesses enter the next iteration, where execution feedback guides further updates. Our experiments cover Terminal-Bench 2, SWE-Bench Pro, and ProgramBench, using GPT-5.5 with Codex and GLM-5.2 with Claude Code. Across these benchmarks using GPT-5.5 with Codex, the heavy mode of HarnessPro achieves an average pass-rate gain of 2.0 percentage points and an average per-task cost reduction of 26.1% relative to RHO. This advantage also holds when using GLM-5.2 with Claude Code. Code is available at https://github.com/pzs19/HarnessPro
Figures & tables
| Method | Goal | Scope | Feedback | Iteration | Output |
|---|---|---|---|---|---|
| AFlow ( Zhang et al., 2025 ) | Pass | Workflow | Ground truth | Recursive | Single |
| SkillMOO ( Gong et al., 2026a ) | Pass + Cost | Skills | Ground truth | Recursive | Pareto set |
| RHO ( Pan et al., 2026a ) | Pass | Skills + tools | Label-free | Single round | Single |
| AHE ( Lin et al., 2026 ) | Pass | Harness | Ground truth | Recursive | Single |
| HarnessPro | Pass + Cost | Harness | Label-free | Recursive | Pareto set |
| Terminal-Bench 2 | SWE-Bench Pro | ProgramBench | |||||||
| Method | P(%) | C(;\downarrow$ | T(s) | P(%) | C(;\downarrow$ | T(s) | P(%) | C(;\downarrow$ | T(s) |
| GPT-5.5 Codex | |||||||||
| Vanilla | 69.5 | 0.89 | 260 | 59.0 | 1.88 | 337 | 60.3 | 2.65 | 669 |
| Dynamic Cheatsheet | 72.9 | 1.06 | 421 | 62.0 | 2.19 | 335 | 68.5 | 3.58 | 742 |
| ReasoningBank | 74.6 | 0.99 | 369 | 61.0 | 2.13 | 341 | 62.5 | 3.06 | 661 |
| Sleep-time Compute | 74.6 | 1.04 | 331 | 62.0 | 2.26 | 337 | 67.7 | 3.38 | 637 |
| Terminal-Bench 2 | SWE-Bench Pro | |||||
| Method | P(%) | C(;\downarrow$ | CoP(;\downarrow$ | P(%) | C(;\downarrow$ | CoP(;\downarrow$ |
| RHO | 76.3 | 1.09 | 1.43 | 80.0 | 2.68 | 3.35 |
| RHO + dynamic routing | 76.3 | 0.92 | 1.21 | 76.0 | 2.13 | 2.80 |
| RHO + budget hooks | 76.3 | 0.92 | 1.21 | 75.0 | 1.75 | 2.33 |
| RHO + low reasoning effort | 62.7 | 0.45 | 0.72 | 59.0 | 1.08 | 1.83 |
| HarnessPro-Lite | 72.9 | 0.43 | 0.59 | 72.3 | 0.80 | 1.11 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Model | Uncached input | Cached input | Output |
|---|---|---|---|
| GPT-5.5 ( K context) | 5.00 $/M | 0.50 $/M | 30.00 $/M |
| GLM-5.2 | 1.40 $/M | 0.26 $/M | 4.40 $/M |
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