Recursive Harness Self-Improvement Boosts Agent Performance

Hyunin Lee, Jinglue Xu, Jeffrey Seely, Donghyun Lee, Matei Zaharia, Yujin Tang· July 20, 2026 View original

Summary

Recursive Harness Self-Improvement (RHI) is a lightweight, iterative method that refines user-constructed agent harnesses using pairwise feedback, significantly raising the performance ceiling of low-reasoning-effort agents and reducing inference costs by improving task-specific context management.

In the evolving landscape of AI, agent harnesses are not just tools for inference but also crucial components that can generate data to train future foundation models. This concept, known as model-harness co-evolution, suggests optimizing harnesses for both immediate agent performance and the quality of the data they produce. However, continually updating these harnesses can be resource-intensive. This research introduces Recursive Harness Self-Improvement (RHI) as a computationally lightweight solution. RHI focuses on optimizing user-constructed harnesses in a task-specific manner. It represents the harness as a prompt-level specification of the agent loop and iteratively refines it. This refinement process uses pairwise feedback derived from the harness's own revision history, allowing it to learn and improve over time with minimal computational overhead and few update iterations. Experiments across 30 synthetic machine learning research tasks demonstrated that RHI significantly boosts the performance of agents requiring low reasoning effort. It achieved results surpassing even maximum-reasoning-effort settings while simultaneously reducing inference costs by up to 60%. The primary mechanism for these gains was identified as improved task-specific context management and more effective information flow between agents, rather than simply extending reasoning traces.

Why it matters

This method offers a practical and efficient way for organizations to continuously improve the performance of their AI agents and reduce operational costs, especially for tasks where complex reasoning is not always necessary.

How to implement this in your domain

  1. 1Identify an existing agent-based workflow where performance or inference cost is a concern.
  2. 2Represent the agent's harness as a prompt-level specification that can be iteratively modified.
  3. 3Implement a feedback mechanism to collect pairwise comparisons or performance metrics from different harness revisions.
  4. 4Develop an iterative refinement loop that uses this feedback to generate improved harness specifications.
  5. 5Deploy the self-improving harness in a controlled environment to measure performance gains and cost reductions.

Who benefits

AI/ML DevelopmentSoftware DevelopmentCustomer ServiceResearch & DevelopmentAutomation

Key takeaways

  • Agent harnesses can be optimized for both immediate performance and future model training data quality.
  • Recursive Harness Self-Improvement (RHI) offers a lightweight, iterative optimization method.
  • RHI refines harnesses using pairwise feedback from their own revision history.
  • It significantly improves agent performance and reduces inference costs by enhancing context management.

Original post by Hyunin Lee, Jinglue Xu, Jeffrey Seely, Donghyun Lee, Matei Zaharia, Yujin Tang

"arXiv:2607.15524v1 Announce Type: cross Abstract: Under model--harness co-evolution, harnesses are not merely inference-time scaffolds but data-generating components whose execution traces can shape future foundation models. This motivates harness-in-the-loop learning: optimizing…"

View on X

Originally posted by Hyunin Lee, Jinglue Xu, Jeffrey Seely, Donghyun Lee, Matei Zaharia, Yujin Tang on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses