Self-supervised method improves agent harnesses using past trajectories

Retrospective Harness Optimization boosts SWE-Bench Pro pass rate from 59% to 78% without external labels.

PaperBig Techcs.AIarXiv:2606.05922v2
Wenbo Pan · Shujie Liu · Chin-Yew Lin · Jingying Zeng · Xianfeng Tang · Xiangyang Zhou · +2 more

City University of Hong Kong · Microsoft Research Asia

Research Digest··3 min read
The authors introduce Retrospective Harness Optimization (RHO), a self-supervised method that optimizes an AI agent's harness of skills, tools, and workflows using only past task trajectories. By selecting a diverse coreset of challenging tasks, re-solving them in parallel, and using self-validation to pick the best harness update, the method improves pass rate on SWE-Bench Pro from 59% to 78% in a single optimization round.

What they did

The authors propose RHO, which operates on logged trajectories from prior agent deployments. RHO first selects a diverse coreset of challenging tasks from these trajectories, then re-solves them in parallel with the current harness. It analyzes these rollouts using self-validation (checking if the agent's own solution passes its own tests) and self-consistency (checking for consistent results across multiple seeds). RHO generates candidate harness updates by prompting a language model to modify the harness based on identified failure modes, and selects the most effective candidate via pairwise self-preference using the validation outcomes.

They evaluate RHO across three domains: software engineering (SWE-Bench Pro), technical work (BERT-style question answering), and knowledge work (multihop QA). The primary results are reported on SWE-Bench Pro, a benchmark of 500 real-world GitHub issues.

Key findings

  • A single optimization round of RHO improves the pass rate on SWE-Bench Pro from 59% to 78% (a 19 percentage point gain) without any external grading or ground truth.
  • RHO effectively targets prior failure modes: the optimized harness shows altered behavior patterns that avoid previous pitfalls.
  • The optimized harness sustains higher accuracy during long-horizon sessions, suggesting improved robustness.

Why it matters

RHO addresses a critical bottleneck for deploying AI agents in the wild: the need for labeled validation data to improve the agent's harness. By leveraging only past trajectories, it enables continual improvement from deployment data, making agents more adaptable to new tasks without human feedback. The substantial gain on a challenging software engineering benchmark demonstrates the practical viability of this self-supervised approach.

Caveats

The method requires a warm-up set of initial trajectories, which may not be available for greenfield deployments. The evaluation is dominated by results on SWE-Bench Pro; performance on the other domains is not quantified with similar clarity. The self-preference selection mechanism could perpetuate or amplify the agent's own biases if its self-evaluation is unreliable. The paper does not explore the effects of multiple RHO rounds or the risk of overfitting to the coreset of past tasks.

§

Analysis

This work fits into a growing line of research on self-improving agents. Unlike RL-based approaches that need reward models or human feedback, or supervised fine-tuning that needs labeled data, RHO uses introspection (self-validation and self-consistency) as a training signal. The improvement on SWE-Bench Pro is notable because prior best methods often rely on fine-tuning with ground-truth patches. An open question is whether the self-preference mechanism can be gamed by the agent or whether it scales to more open-ended tasks where self-validation is harder to automate.

newspaper

Research Digest

Articles published under the Zotpaper byline are synthesized from multiple source publications by our AI editor and reviewed by our editorial process. Each story combines reporting from credible outlets to give readers a balanced, comprehensive view.