← Back to Paper Radar

Recursive Harness Self-Improvement

Hyunin Lee, Jinglue Xu, Jeffrey Seely, Donghyun Lee, Matei Zaharia, Yujin Tang
arXiv.org | 2026
Recursive Harness Self-Improvement (RHI) represents an agent harness as a prompt-level specification of the agent loop. It refines that harness over a few iterations using pairwise feedback over its own revision history. This lets low-reasoning-effort agents outperform maximum-reasoning-effort agents at lower cost, mainly through better context management and inter-agent information flow.

Problem Statement

Under model–harness co-evolution, harnesses both drive inference-time performance and produce execution traces that may become training data for future foundation models, so harness quality affects present and future capability. Continually updating provider-built scaffolds is costly and labor-intensive. A lightweight, task-specific way to improve user-built harnesses, and with them trace quality, is therefore needed.

Key Novelty

  • Frames harnesses as data-generating components and proposes 'harness-in-the-loop learning', which optimizes harnesses jointly for immediate performance and the quality of traces for future training.
  • Introduces RHI, which encodes the agent loop as a prompt-level specification and recursively refines it using pairwise comparisons over the harness's own revision history.
  • Gives an empirical attribution of the gains to improved task-specific context management and inter-agent information flow rather than longer reasoning, and formalizes this as an information-theoretic hypothesis about RHI's implicit objective.

Evaluation Highlights

  • On 30 synthetic ML research tasks spanning quantitative finance, robotics and pharmacy, a few RHI iterations let low-reasoning-effort agents exceed the maximum-reasoning-effort setting.
  • Inference cost drops by up to 60% relative to the max-reasoning-effort configuration, with gains traced to context and information-flow improvements rather than longer reasoning traces.

Signal Assessment

6/10 The work offers a practical, cheap harness-optimization loop with a compelling cost-performance result and a useful conceptual framing of harnesses as training-data generators. However, it builds on existing prompt- and scaffold-optimization ideas (e.g., ADAS, DSPy-style optimization, self-refinement), and the evaluation is limited to synthetic tasks.

Methodology

  1. Represent the agent harness (the agent loop, roles, tool use and information passing between sub-agents) as an editable prompt-level specification.
  2. Execute the harness on a task to produce execution traces and outcomes, keeping a revision history of harness versions.
  3. Use pairwise feedback that compares harness revisions in the history to judge which changes helped.
  4. Generate a refined harness specification from this comparative feedback, and repeat for a small number of iterations.
  5. Analyze the resulting traces to attribute improvements (context management vs. reasoning length), then formalize the behavior as an information-theoretic hypothesis.

System Components

Prompt-level harness specification

A natural-language/prompt description of the agent loop, covering roles, control flow and context passing. An LLM can edit it directly, which avoids code-level scaffold engineering.

Revision history

A record of prior harness versions and their execution outcomes. It serves as the substrate for self-referential improvement.

Pairwise feedback mechanism

Compares harness revisions against each other to produce relative improvement signals, which are more robust than absolute scoring.

Recursive refinement loop

Iteratively proposes updated harness specifications from the feedback and needs only a few iterations to converge to strong task-specific harnesses.

Inter-agent information flow / context management

The main locus of improvement: what information is passed between sub-agents and how context is curated for each task.

Information-theoretic hypothesis

A formal conjecture describing RHI's implicit optimization objective in terms of information flow through the harness.

Results

Metric/Benchmark Baseline This Paper Delta
Task performance on 30 synthetic ML research tasks (low reasoning effort) Low-effort agent with initial harness Low-effort agent with RHI-optimized harness Substantially raised performance ceiling
Performance vs. max reasoning effort Max-reasoning-effort agent Low-effort + RHI Exceeds max-effort setting
Inference cost Max-reasoning-effort agent Low-effort + RHI Up to 60% reduction
Optimization budget Continual provider scaffold updates (costly, manual) A few RHI iterations Lightweight, automated
Source of gains Longer reasoning traces (hypothesized) Improved context management / inter-agent information flow Qualitative attribution shift

Key Takeaways

  • Before raising reasoning effort or model size, try optimizing the harness itself. Task-specific harness tuning can let cheaper low-effort configurations beat max-effort ones at a fraction of the cost.
  • Focus harness design on context management and what information flows between sub-agents, since these matter more than longer chains of thought.
  • Pairwise comparison over a harness's own revision history is a cheap, few-iteration recipe for self-improving agent scaffolds.
  • If agent traces may feed future fine-tuning or distillation, optimize harnesses for trace quality as well as task success.
  • Validate on real-world tasks before relying on the results: the evidence comes from synthetic ML research tasks, and the information-theoretic explanation is presented as a hypothesis rather than a proven objective.

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 harnesses for both immediate agent performance and the quality of traces used for future model training. However, continually updating provider-built scaffolds is costly and labor-intensive. We therefore investigate whether optimizing user-constructed harnesses in a task-specific manner can improve execution-trace quality while remaining computationally lightweight and requiring only a few update iterations. To this end, we introduce Recursive Harness Self-Improvement (RHI), which represents the harness as a prompt-level specification of the agent loop and iteratively refines it using pairwise feedback over its own revision history. Across 30 synthetic machine-learning research tasks spanning quantitative finance, robotics, and pharmacy, a few RHI iterations suffice to substantially raise the performance ceiling of low-reasoning-effort agents, exceeding the corresponding maximum-reasoning-effort setting while reducing inference cost by up to 60%. We show that these gains arise primarily from improved task-specific context management through more effective inter-agent information flow rather than longer reasoning traces. Finally, we formalize this behavior as an information-theoretic hypothesis for RHI's implicit optimization objective, suggesting RHI as a practical algorithm for continual learning within the paradigm of model--harness co-evolution.

Generated automatically from abstract on 2026-11-28.