Recursive Harness Self-Improvement

TL;DR

Proposes Recursive Harness Self-Improvement (RHI), an iterative, lightweight method that significantly boosts low-reasoning agents' performance with minimal updates, reducing inference costs by up to 60%.

cs.LG 🔴 Advanced 2026-07-17 6 citations 56 views
Hyunin Lee Jinglue Xu Jeffrey Seely Donghyun Lee Matei Zaharia Yujin Tang
self-improvement model-harness co-evolution few-shot optimization information theory continual learning

Key Findings

Methodology

This paper introduces Recursive Harness Self-Improvement (RHI), which conceptualizes the harness as a prompt-level specification of the agent loop, including roles, instructions, communication protocols, and workflow structure. RHI employs a trajectory-local objective function, replacing the broad competitor distribution with a delta distribution focused on the previous harness, thus avoiding costly global search. It iteratively refines the harness using pairwise preference feedback derived from its own revision history, leveraging cached outputs to minimize computational overhead. The core theoretical insight is that RHI implicitly maximizes the mutual information between harness components and the task, while minimizing redundancy, based on an information-theoretic hypothesis. Extensive experiments across 30 synthetic machine learning tasks in finance, robotics, and pharmacy demonstrate that only 2-3 iterations of RHI suffice to surpass the performance ceiling of agents with maximum reasoning effort, while reducing inference costs by up to 60%.

Key Results

  • Across 30 synthetic ML research tasks, low-reasoning agents with RHI-enhanced harnesses achieved higher pairwise win rates than all test-time scaling baselines, including xhigh, max, and ultracode. For instance, in the Opus-4.8 model, RHI improved win counts by 15-20% over the strongest baselines after just 3 iterations, with inference costs reduced by 50-60%. These gains were consistent across tasks and model scales, indicating robust performance improvements.
  • The performance gains primarily stem from improved task-specific context management and inter-agent information flow, rather than longer reasoning chains. Empirical data shows output token counts remained nearly constant, while cache read/write operations and inference costs decreased, validating the hypothesis that RHI enhances information organization and reduces redundancy.
  • Theoretically, the authors formalize RHI's implicit optimization as maximizing the mutual information between harness components and the task, while minimizing internal redundancy. This information-theoretic perspective explains how RHI achieves efficient adaptation and continual learning, providing a new framework for understanding self-improving AI systems.

Significance

This work addresses a fundamental bottleneck in the co-evolution of models and harnesses: the high cost and labor intensity of updating provider-built scaffolds. By enabling task-specific, few-shot optimization of user-constructed harnesses, RHI offers a practical pathway toward scalable, continual self-improvement in AI agents. Its ability to significantly outperform larger, more complex models with fewer updates and lower inference costs has profound implications for deploying AI in resource-constrained environments. The theoretical grounding in information theory further enriches the understanding of how information flow and redundancy influence model performance, paving the way for future research in adaptive, self-optimizing AI systems.

Technical Contribution

The paper's key technical contributions include: • Formalizing harness as a prompt-level specification, enabling lightweight optimization; • Developing a trajectory-local objective function that simplifies the optimization process; • Introducing a preference-based iterative refinement algorithm that leverages self-comparison history; • Theoretical analysis linking RHI's implicit objective to mutual information maximization and redundancy minimization; • Extensive empirical validation across diverse synthetic tasks demonstrating performance and cost improvements. These innovations collectively advance the state-of-the-art in continual learning and model-harness co-evolution, offering a scalable, practical framework for self-improving AI agents.

Novelty

This work is the first to formalize and implement a few-shot, iterative harness optimization framework based on pairwise preference feedback, bypassing the need for expensive global search or code generation. Unlike prior approaches that rely on population-based search or full harness synthesis, RHI employs a trajectory-local, self-comparison mechanism grounded in information theory, providing a scalable and efficient alternative. Its novel conceptualization of harness as a prompt-level specification and the implicit optimization of mutual information distinguish it from existing methods, opening new avenues for continual, task-specific AI self-improvement.

Limitations

  • The effectiveness of RHI in real-world, multi-modal, and multi-task environments remains to be validated. Its reliance on high-quality preference feedback may be vulnerable to noise and bias, potentially leading to suboptimal updates.
  • The current implementation is primarily tested on synthetic tasks; scaling to complex, real-world scenarios with diverse data modalities and larger models may introduce unforeseen challenges, including computational overhead and stability issues.
  • The implicit information-theoretic objective, while theoretically sound, requires further empirical validation to confirm its robustness and universality across different tasks and domains. Future work should explore integrating explicit reward signals and multi-modal feedback to enhance performance.

Future Work

Future research directions include: • Extending RHI to multi-modal, real-world tasks such as multimodal perception, robotics, and dialogue systems; • Combining RHI with reinforcement learning and self-supervised techniques to improve feedback robustness; • Developing more efficient algorithms for mutual information estimation and optimization in high-dimensional settings; • Investigating adaptive strategies for bias correction and noise reduction in preference feedback; • Exploring theoretical extensions to formalize the implicit objective in broader contexts, and integrating explicit reward signals for more targeted optimization.

AI Executive Summary

The rapid progress in artificial intelligence has traditionally been driven by scaling up models, increasing training compute, and refining post-training techniques. However, recent insights highlight the critical role of the co-evolution between foundation models and their harnesses—the structures that guide and facilitate model behavior during inference. These harnesses, which include prompts, workflows, and communication protocols, are not merely static scaffolds but active data-generating components whose execution traces can shape future model training. This recursive feedback loop suggests that improving harnesses can lead to significant performance gains, especially when coupled with foundation model updates.

Despite their importance, optimizing harnesses remains a challenge. Provider-built scaffolds are designed for generality, making continual updates costly and labor-intensive. Conversely, user-constructed harnesses, tailored for specific tasks, offer a practical avenue for targeted improvements. Yet, optimizing these in a lightweight, iterative manner has been largely unexplored. The authors address this gap by proposing Recursive Harness Self-Improvement (RHI), a novel algorithm that treats harness as a prompt-level specification and refines it through pairwise preference feedback derived from its own revision history.

RHI's core innovation lies in its trajectory-local objective, which limits comparisons to the previous harness, avoiding expensive global searches. This approach dramatically reduces computational costs—each iteration requires only one agent execution and one pairwise evaluation—making it suitable for practical, few-shot tuning. The algorithm employs a preference-based iterative process, where each harness update is guided by accumulated feedback, effectively performing a noisy local ascent in the harness space. The authors formalize this process within an information-theoretic framework, hypothesizing that RHI implicitly maximizes mutual information between harness components and the task, while minimizing internal redundancy.

Empirical validation across 30 synthetic machine learning tasks demonstrates RHI's effectiveness. Results show that just 2-3 iterations of RHI can elevate the performance ceiling of low-reasoning agents beyond that of models with maximum reasoning effort, while reducing inference costs by up to 60%. These improvements are primarily attributed to enhanced task-specific context management and inter-agent information flow, rather than longer reasoning chains. The findings suggest that optimizing information flow and reducing redundancy within harnesses can unlock significant performance gains.

This research offers a practical, scalable framework for continual learning and self-improvement in AI agents. By focusing on lightweight, task-specific harness optimization, it addresses a critical bottleneck in model-harness co-evolution, paving the way for more autonomous, adaptable AI systems. The theoretical insights grounded in information theory further deepen our understanding of the mechanisms underlying effective self-improvement. Moving forward, integrating RHI with multi-modal data, reinforcement learning, and real-world applications could revolutionize how AI systems learn, adapt, and evolve in complex environments, ultimately enabling more intelligent, resource-efficient, and autonomous agents.

Deep Analysis

Background

The evolution of artificial intelligence has been marked by the scaling of model parameters, increased computational resources, and sophisticated post-training techniques such as fine-tuning and reinforcement learning. Landmark models like GPT-3, BERT, and T5 have demonstrated that larger models trained on vast datasets can achieve remarkable performance across NLP tasks. However, scaling alone faces diminishing returns and escalating costs, prompting researchers to explore more efficient pathways. One promising direction is the co-evolution of models and their harnesses—the structures that guide inference, such as prompts, workflows, and communication protocols. Recent works by Anthropic, OpenAI, and Google have shown that dynamically evolving harnesses can significantly enhance model performance, especially in multi-agent and task-specific settings. Nonetheless, optimizing these harnesses remains challenging due to the high costs of global search and the static nature of many existing designs. The need for lightweight, iterative, and task-adaptive harness optimization methods has become increasingly urgent, especially for real-world applications requiring continual adaptation and personalization.

Core Problem

The core challenge addressed in this paper is how to efficiently optimize user-constructed harnesses for specific tasks, using minimal computational resources and only a few update iterations. Traditional approaches rely on exhaustive search or large candidate pools, which are computationally expensive and impractical for frequent updates. This bottleneck hampers the ability of AI systems to perform continual learning and self-improvement, especially in open-ended, real-world scenarios where tasks vary widely and data is scarce. The fundamental problem is to develop an optimization framework that is both lightweight and effective, capable of guiding harnesses toward higher-quality execution traces without incurring prohibitive costs. Achieving this requires rethinking the optimization paradigm from global search to local, preference-guided refinement, leveraging the inherent structure of the harness as a prompt-level specification rather than executable code.

Innovation

The paper introduces several key innovations: • Defining harness as a prompt-level specification, enabling lightweight, flexible optimization without code execution; • Developing a trajectory-local objective function that compares the current harness only with its immediate predecessor, drastically reducing computational costs; • Utilizing pairwise preference feedback derived from the agent's own outputs to iteratively refine the harness, forming a recursive self-improvement loop; • Formalizing an information-theoretic hypothesis that the implicit optimization goal is to maximize mutual information between harness components and the task, while minimizing internal redundancy; • Demonstrating through extensive experiments that only a few iterations of RHI can surpass the performance of models with maximal reasoning effort, while significantly reducing inference costs. These innovations collectively enable scalable, task-specific harness optimization suitable for continual learning scenarios.

Methodology

  • �� Define the harness as a prompt-level description including roles, instructions, communication contracts, and workflow hops; • Formulate a trajectory-local objective function that compares the current harness with the previous one, using pairwise preference feedback; • At each iteration, generate outputs using the current harness, then evaluate pairwise preferences between current and previous outputs; • Store preference feedback in a history buffer, which guides the next harness revision; • Use an LLM-based harness optimizer (Lharness) to update the harness based on accumulated preference data, without requiring explicit evaluation prompts; • Incorporate an information-theoretic perspective, aiming to maximize the mutual information between harness components and the task, while reducing redundancy; • Repeat this process for a few iterations until performance plateaus, leveraging cached outputs to minimize computational costs.

Experiments

The experimental setup involves 30 synthetic, open-ended machine learning tasks spanning finance, robotics, and pharmacy. Each task requires generating a complete code repository with standardized deliverables, evaluated via pairwise comparisons by LLM judges. The models tested include Sonnet-4.6, Opus-4.7, and Opus-4.8, representing different scales of foundation models. Baselines include test-time scaling strategies such as xhigh, max, and ultracode. The RHI process involves 2-3 iterations per task, with performance measured by win rates in pairwise judgments and inference costs in terms of token usage and cache operations. Ablation studies examine the impact of preference feedback, caching, and the information-theoretic objective. The experiments demonstrate that RHI consistently improves performance across tasks and models, with notable reductions in inference costs, validating the efficiency and effectiveness of the approach.

Results

The key results show that with just 2-3 iterations, RHI-enhanced agents outperform all baseline test-time scaling strategies, achieving higher win rates in pairwise comparisons across all 30 tasks. For example, in the Opus-4.8 model, RHI improved win counts by approximately 20% over ultracode and max baselines, with inference costs reduced by 50-60%. Output token usage remained stable, indicating that performance gains are primarily due to better context management and information flow rather than longer reasoning chains. Ablation experiments confirmed that preference feedback and cached outputs are critical for success, while the information-theoretic objective aligns with observed improvements. These results demonstrate that lightweight, preference-guided harness optimization can effectively push the performance ceiling of low-reasoning agents, making continual self-improvement feasible with minimal computational overhead.

Applications

RHI can be directly applied to tasks such as automated code generation, multi-agent coordination, and adaptive dialogue systems, where task-specific tuning is essential. Its lightweight nature makes it suitable for resource-constrained environments, enabling rapid customization and continual learning without extensive retraining. In industry, RHI can facilitate personalized AI assistants, autonomous robots, and intelligent automation platforms that adapt to new tasks with minimal overhead. Long-term, this approach could underpin self-improving AI ecosystems capable of autonomous evolution, reducing reliance on manual updates and enabling scalable deployment across diverse domains. Its ability to optimize information flow and context management also opens avenues for enhancing multi-modal and multi-task systems, pushing the boundaries of adaptive intelligence.

Limitations & Outlook

While RHI demonstrates impressive performance on synthetic tasks, its robustness and scalability in real-world, multi-modal, and multi-task environments require further validation. The reliance on high-quality preference feedback may introduce biases or noise, affecting convergence. Computational costs, though minimized, could still be significant in very large models or highly complex tasks, especially when frequent caching and comparisons are needed. The theoretical framework based on mutual information, while compelling, needs empirical validation across broader scenarios. Future work should address these limitations by integrating more robust feedback mechanisms, exploring multi-modal data, and developing more efficient mutual information estimation techniques. Additionally, extending RHI to multi-agent systems and real-world applications remains an important direction for research.

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.

cs.LG cs.AI

Cited By (6)

Hierarchical Self-Improvement: A Framework for Task-Specific Evolvable Agent Harnesses

AutoDesign: Meta-Harness Optimization for Long-Horizon Agentic Design

Macaron-V1: Towards Open Continual Learning with Self-Improvement and Mixture-of-LoRA

PAST-Bench: Benchmarking the Foundations of Recursive Self-Improvement in Personal Agents

HELIX: Model-Harness Co-evolution for Recursive Self-Improvement

2026 1 citations View Analysis →

From Prompt to Harness: Coderlet from Scratch