arXiv(opens in a new tab)cs.LGOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.26770

HarnessPro: Recursive Harness Self-Improvement with Pareto Optimization for Performance-Cost Trade-offs

Zhuoshi Pan, ZhiYuan Feng, Yukuo Cen, Honglin Lin, Junru Lu, Zhongxia Chen, Shuo Yang, H. Vicky Zhao, Jie Tang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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 this link.

1 INTRODUCTION

An agent harness is the software infrastructure that manages interactions between a large language model (LLM) and its environment (Grace et al., 2026). Recent work on recursive self-improvement (RSI) (Zhang et al., 2026) uses past execution trajectories to diagnose problems and guide harness updates that improve performance on future tasks (Suzgun et al., 2026; Lin et al., 2026; Pan et al., 2026a). However, these methods often pursue performance gains through more extensive exploration and stronger verification (Lin et al., 2026; Pan et al., 2026a). These efforts improve performance, but often at the cost of higher token consumption and increased latency. This trade-off is less appealing in practical deployment, where the execution cost and latency also matter. We therefore ask: Can recursive harness self-improvement deliver better performance at lower execution cost?

Toward this goal, we introduce HARNESSPRO, a label-free method for recursive harness self-improvement that uses both performance and cost metrics to guide harness updates and candidate selection. It orchestrates several specialized agents to turn execution feedback into successive harness updates. A trajectory analyzer examines repeated rollouts to identify failures and avoidable overhead. Guided by different performance-cost priorities, a planner turns these diagnoses into harness improvement plans, which an editor implements as executable harness candidates. A test-synthesis agent provides fixed tests for evaluating the candidates without access to ground-truth solutions or official tests. Candidates that underperform the initial harness or are Pareto-dominated are discarded. To accommodate different budgets, we then use normalized weighted squared-distance selection (Marler & Arora, 2004) to retain representative harnesses for cost-focused (lite), balanced (medium), and performance-focused (heavy) modes. The selected harnesses then enter the next epoch, where further updates pursue different performance-cost priorities.

We evaluate HARNESSPRO on Terminal-Bench 2 (The Terminal-Bench Team, 2025), SWE-Bench Pro (Deng et al., 2026), and ProgramBench (Yang et al., 2026a), using GPT-5.5 with Codex and GLM-5.2 with Claude Code. With both backbone models, HARNESSPRO improves task performance while reducing execution cost. For example, on Terminal-Bench 2 with GPT-5.5 and Codex, the heavy mode of HARNESSPRO outperforms RHO (Pan et al., 2026a) in pass rate by 4.5 percentage points while reducing mean cost per task by 33.9%. For more cost-sensitive deployments, the medium mode delivers performance comparable to RHO at substantially lower execution cost.

An analysis of the evolved harnesses shows that HARNESSPRO does not improve agents simply by compressing context or increasing reasoning effort. The evolved harnesses dynamically allocate reasoning effort and tool budgets based on task descriptions, while runtime hooks steer execution from exploration toward convergence based on the assigned budgets. They also adopt tool-output compression like RTK (Szymkowiak, 2026) and streamline instructions to reduce redundant prompt content, while retaining necessary context and final verification. Together, these mechanisms curb avoidable overhead while preserving the reasoning and verification needed for task success, thereby advancing the performance-cost Pareto frontier.

Our contributions are threefold:

• We introduce HARNESSPRO, a multi-agent framework that simultaneously optimizes performance and cost by analyzing execution trajectories and recursively improving harnesses.

• We assess candidate artifacts with fixed LLM-generated tests rather than direct LLM judgments, improving failure detection without access to official tests.

• Across three benchmarks, HARNESSPRO improves performance while reducing cost and latency, yielding a series of harnesses with different performance-cost trade-offs.

References (4)

  • Difficulty, visualization, specialization, or virtualization alone is not enough
  • Do not choose ‘deep’ for terminology, long specifications, ordinary security or reverse engineering, or hidden tests alone
  • commands, flags, inputs, outputs, exit status, file effects, defaults, error behavior, formatting, and explicitly documented edge cases
  • When they differ, reduce the case and fix the underlying general rule rather than adding a one-off special case