Manuscript Offprint

arXiv:2609.40330

Turbo Harness: Instance-Adaptive Harness Optimization

Tunyu Zhang, Hao Wang, Kai Xu, Dimitris N. Metaxas

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

ABSTRACT

Automating the search for effective harnesses is an important step toward enabling agents to recursively self-improve. Existing harness optimizations typically produce a single global harness that is applied uniformly across task instances. However, a harness that works well on average may not be optimal for every instance. We introduce Turbo Harness, a framework that can adapt a globally optimized harness to each instance by reusing information generated during the original optimization process. Specifically, Turbo Harness recycles artifacts produced during a completed global harness optimization run, and summarizes them into a structured playbook. We train a harness editor to leverage this prior optimization experience to generate instance-specific patches to the global harness. At inference time, the editor uses the instance and the playbook to construct a tailored harness in which the execution model operates. Through numerical experiments, we show that Turbo Harness consistently outperforms existing harness optimization baselines across seven benchmarks spanning interactive agent tasks, software engineering, and long-horizon terminal tasks.

Code: github.com/Tyrion58/turbo-harness

1 INTRODUCTION

Large language models (LLMs) and their surrounding harnesses are two fundamental building blocks of modern agents (Tian et al., 2026). The notion of a harness has expanded well beyond simply exposing an LLM to an environment or a collection of tools (Yao et al., 2022b). Today, it encompasses nearly all of the runtime machinery surrounding the model (e.g., context management, memory, workflow orchestration, and verification) (Huang et al., 2026; Zhong & Zhu, 2026; Zhou et al., 2026). These mechanisms can substantially extend the effective capabilities of a static LLM, particularly on long-horizon, scientific, and open-ended tasks (Ma et al., 2026; Wu et al., 2026). At the same time, this broad definition creates an enormous design space: for an application of interest, one must decide what information to expose to the model, what state to maintain, when and how to intervene, and how much computation to allocate. Designing an effective harness is therefore a challenging optimization problem in its own right.

A growing line of work seeks to automate this process through harness optimization (Anthropic, 2025; Lee et al., 2026b;a). For example, Meta-Harness (Lee et al., 2026b) adopts an outer-loop program-search approach, in which a separate agent proposes new harnesses based on the execution traces of previously evaluated candidates; Harness-R1 (Shao et al., 2026) trains a harness engineer with reinforcement learning (RL) to transform batches of agent failures into executable runtime patches. Despite their promise, existing approaches have two limitations. First, they optimize a single global harness that is then applied uniformly across all, or a batch of, test instances. Yet a harness that is effective for one instance may be suboptimal for another. For example, SWE-Benchstyle instances may come from different GitHub repositories with distinct development workflows and testing conventions, and may benefit from different harness configurations. Second, harness optimization is expensive and much of the information generated during this process is ultimately underutilized. During optimization, the system accumulates a rich history of candidate harnesses.

*Equal contribution. †Work is done during an internship at the Red Hat AI innovation team. Correspondence to: Tunyu Zhang (ty.zhang@rutgers.edu), Dimitris N. Metaxas (dnm@cs.rutgers.edu).

Figure

(a) Instance-specific harness adaptation

Figure

(b) Results on Terminal-Bench 2.1

Figure 1: Turbo Harness adapts a globally optimized harness H* to each instance. (a) A harness editor produces an instance-specific patch to H*, yielding a per-instance harness. (b) On Terminal-Bench-2.1 (Claude Sonnet 4.5, 44-task test split), Turbo Harness achieves the highest pass rate compared with several widely-used human-designed harnesses.

and evidence about which strategies succeed or fail under different conditions. Existing methods use this experience to improve the global harness (Lee et al., 2026b;a; Sengupta & Wang, 2026). Once optimization is complete, however, much of the instance-specific signal contained in this history is discarded. This leads to a fundamental question:

Can we adapt a globally optimized harness to each individual instance by reusing the experience accumulated during harness optimization?

In this paper, we introduce Turbo Harness 1^{1}. It is a new harness optimization framework that reuses artifacts from a completed outer-loop harness search to adapt a globally optimized harness to individual task instances.

Specifically, we reuse the search archive produced during outer-loop optimization and summarize it into a structured playbook (Zhang et al., 2026c). This playbook records both successful and unsuccessful harness-editing strategies, including the specific edits that lead to performance improvements and those that fail to do so. We then train a harness editor, an RL-fine-tuned open-source model responsible for adapting the global harness to each instance. At deployment time, the harness editor receives a test instance together with access to the playbook and proposes a patch to the globally optimized harness. The resulting instance-specific harness is then used by the main execution model, which can be any model, to solve the test instance. Figure 1 illustrates this instance-specific adaptation and shows its gains on Terminal-Bench-2.1.

Our framework offers three advantages. First, instance-adaptive harnessing provides more flexibility than a single global harness across all task instances, consistently improving task performance in our experiments. For example, on SWE-smith-MR, Turbo Harness improves pass rate from 50.7% to 64.0% with Claude Haiku 4.5 and from 70.7% to 88.0% with Gemini 3.7 Flash. Second, training the harness editor is lightweight: rather than generating a new harness from scratch, it only needs to patch a globally optimized harness, guided by a playbook that summarizes successful and unsuccessful edits from the outer-loop search. This allows us to use a relatively small editor model (Qwen3.5-9B in our experiments). Finally, Turbo Harness adds little inference-time overhead because the editor is called only once per instance; moreover, the adapted harness can often reduce the number of execution steps required by the much larger execution model, potentially even lowering overall inference-time compute (see e.g., Table 2 and 3).

In short, our contributions are:

• We formulate instance-adaptive harness optimization and highlight the limitations of deploying a single globally optimized harness across all task instances.

1^{1}We adopt the name “Turbo Harness” by analogy to a turbocharger, which recovers energy from exhaust gas and reuses it to improve engine performance.

• We propose Turbo Harness, which reuses the artifacts collected during the outer-loop harness search to train a harness editor that adapts the global harness to each individual task instance.

• We show that Turbo Harness is lightweight: the editor only patches a globally optimized harness, can be instantiated with a small model, and is invoked only once per task instance.

• We demonstrate that instance-specific harness adaptation consistently outperforms globally optimized harnesses across seven benchmarks spanning interactive agent tasks, software engineering, and long-horizon terminal tasks, while often reducing execution steps and costs.

References (52)