Harness²: Recursive Agent Harnessing for an Open World
Abstract
LLM agents’ capabilities depend not only on their underlying models but also on their execution harnesses. Recursive self-improvement (RSI) offers a promising approach to automatically evolve these harnesses. However, deploying RSI in open-world settings still faces two critical challenges. First, open-world tasks are typically unseen during the harness design phase and novel at test time, leaving no ground-truth verifiers to reliably guide online harness edits. Second, the RSI process remains highly task-specific and fails to generalize to novel scenarios. We introduce Harness2, a plug-and-play, recursive agent harnessing framework that addresses these challenges through two connected levels of recursion. Task-level recursion refines the current task’s harness using a contrastive Propose–Probe–Compose step that reliably guides edits without ground-truth verifiers, and can be scaled further via parallel or sequential recursion. Harnessing-level recursion then extracts experience from these edits to update a continual improvement harness, enabling the agent to better adapt to future tasks. Across three professional benchmarks and four model–harness configurations, a single step consistently improves GLM-5 and Gemini 3.5 Flash over their base harnesses, yielding gains of up to 11.5 points on WorkBuddy-Bench, 4.5 points on JobBench, and 11.8 percentage points on LAB, with further gains as the task-level recursion budget increases.
1 Introduction
An LLM agent’s effectiveness depends not only on its underlying model, but also on its harness: the prompts, memory, skills, tools, and orchestration through which the model performs tasks (OpenAI, 2025; SST, 2024; Weng, 2026). Even a strong model can perform substantially differently under different harnesses (Team et al., 2026). As agents expand beyond coding into office workflows and high-stakes domains such as legal work, harness design must accommodate increasingly diverse tasks and operational requirements (Team et al., 2026; Harvey AI, 2026). Manually designing and refining harnesses for these demands requires repeated engineering effort, motivating recursive self-improvement on harness design (Lee et al., 2026b; Lin et al., 2026; Qian et al., 2026; Weng, 2026; Meng et al., 2026). Recursive self-improvement (RSI) pursues AI that improves AI: a system autonomously makes persistent changes to itself, and these changes further shape how later improvements are generated, evaluated, and retained (Duan et al., 2026).
Early harness RSI methods (Lee et al., 2026b; Lin et al., 2026) focus on optimizing candidate components against fixed training tasks, unit tests, or validation feedback, selecting the best configuration before deployment. However, a static harness selected beforehand often fails to generalize to the diverse, unpredictable environments encountered in the open world (Wang et al., 2026a), a dynamic setting where agents continually encounter new tasks with diverse and evolving requirements. To address this, researchers have moved harness RSI to the open world, allowing systems to dynamically adapt to newly arriving tasks. Current open-world methods typically address this by recursively improving a harness for the current task (Lee et al., 2026a; Wang et al., 2026a), or by carrying a successful execution harness forward across successive task batches (Nie et al., 2026b).
However, open-world harness evolution faces two connected challenges. First, tasks typically lack ground-truth labels or reliable verifiers. While existing methods rely on proxy signals, assumed ground truth answers, or pairwise output judgments (Lee et al., 2026a; Nie et al., 2026b; Liu et al., 2026), safely using imperfect execution evidence to guide harness changes remains difficult. Second, improving a harness for one task does not automatically improve how the next task is refined. Task-specific edits often fail when requirements change, and directly inheriting a highly tailored execution harness can cause noisy recursive improvement as task distributions shift. The refinement process itself, however, produces highly reusable experience: how a weakness is diagnosed, which changes are tested, and what their execution reveals. Therefore, the improvement process itself must become a source of learning, enabling the system to recursively upgrade its own refinement mechanism. This leads to our central question:
Can recursive self-improvement improve both the current harness
and how future harnesses are improved?
To this end, we introduce Harness2, a plug-and-play framework for recursive agent harnessing in an open world. We use harnessing to describe the process of optimizing the runtime scaffolding around a frozen base model to enable it to act as an autonomous agent. Harness2 improves the harness for the current task and extracts lessons from that process to guide future harnessing. It implements these updates through two coupled levels of recursion: ❶ Task-level recursion refines the current task’s execution harness. To overcome the absence of ground-truth feedback, we introduce a contrastive Propose–Probe–Compose step: it proposes harness edits, tests their effects under matched conditions, and composes changes supported by behavioral contrasts. Building on this, parallel recursion explores multiple candidates simultaneously and composes changes from their execution evidence, while sequential recursion builds successive revisions iteratively. ❷ Harnessing-level recursion uses the resulting task-level explorations to update a continual improvement harness. Instead of inheriting the previous execution harness, this improver selectively retains reusable components and lessons about when and why they worked, guiding future proposals and composition.
We evaluate Harness2 on WorkBuddy-Bench, JobBench, and Harvey’s Legal Agent Benchmark (Team et al., 2026; Li et al., 2026; Harvey AI, 2026) across four executor–harness configurations. One contrastive step improves performance on all three benchmarks in every configuration, with gains of up to 11.511.5 points on WorkBuddy-Bench, 4.54.5 points on JobBench, and 11.811.8 percentage points in LAB Partial pass rate. Parallel recursion adds up to 3.93.9 points on WorkBuddy-Bench, 4.24.2 on JobBench, and 6.76.7 percentage points on LAB Partial (Figure 1); the budget study shows gains from both parallel and sequential recursion. Importantly, task-level exploration also benefits subsequent harnessing. Libraries accumulated with a larger recursion budget support stronger subsequent harness edits even without additional probing, and a library transferred from JobBench improves performance on WorkBuddy-Bench (Figure 7). Our contributions are threefold:
①
Recursive agent harnessing: Harness2 refines the current execution harness and learns from the refinement process to guide future harnessing.
②
Task-level recursion without ground-truth feedback: We introduce a contrastive Propose–Probe–Compose step that supports both parallel and sequential recursion.
③
Experimental results: We demonstrate consistent gains across three benchmarks and four executor–harness configurations, including settings where the same model serves as both executor and editor.
Refer to caption
Figure 2: The eight harness components in Harness2, grouped by their role in the runtime.
2 Harness2
We first define recursive agent harnessing and its open-world setting (§2.1). We then present task-level recursion for refining the execution harness (§2.2), followed by harnessing-level recursion for updating the improvement harness across tasks (§2.3).
2.1 Recursive Agent Harnessing
Harness Configuration and Setting. Let ℳ\mathcal{M} be a model with frozen parameters. A harness ℋ=(c1,…,cK)\mathcal{H}=(c^{1},\ldots,c^{K}) consists of KK editable components, with cic^{i} denoting component i∈{1,…,K}i\in{1,\ldots,K}. It composes with ℳ\mathcal{M} to form an agent 𝒜(⋅,ℳ,ℋ)\mathcal{A}(\cdot;\mathcal{M},\mathcal{H}) without changing its weights (Lee et al., 2026b; Huang et al., 2026b; Qian et al., 2026). For the execution harness, we adopt the file-level decomposition of AHE (Lin et al., 2026) and extend it by one component, exposing K=8K=8 components: a system prompt, guardrails, memory, skills, tool guidance, scripts, subagents, and a middleware plugin. Each component is mounted as a file in the runtime. Figure 2 shows their runtime roles, and Table 5 in Appendix D.3 lists their files, activation, and definitions. We study harness evolution over a stream of NN open-world tasks q1,…,qNq_{1},\ldots,q_{N}, without ground-truth answers or labeled validation feedback. Each task starts from the common execution harness ℋ0\mathcal{H}_{0}. The pipeline may rerun the current task within a bounded budget before returning its final deliverable.
Recursive Agent Harnessing. Recursive self-improvement (RSI) is the capability of an AI system to turn execution outcomes and internal reflections into persistent changes to itself, such that these changes also affect how later improvements are generated, evaluated, and retained (Duan et al., 2026). The object of such changes varies: model weights, as in self-rewarding language models (Yuan et al., 2024); improvement programs, as in STOP (Zelikman et al., 2024); and agent code, as in the Darwin Gödel Machine (Zhang et al., 2026b). The agent harness can be such an object as well. It is the system surrounding a base model that enables it to act as an autonomous agent (Agent=Model+Harness\text{Agent}=\text{Model}+\text{Harness}), without changing the model weights (Weng, 2026). We call the process of optimizing this layer harnessing. Rather than only revising an execution harness under a fixed improvement procedure (Lee et al., 2026a; Lee et al., 2026b), we also update the harness guiding future revisions:
Definition: Recursive Agent Harnessing
Recursive agent harnessing couples two recursive updates: task-level recursion refines the current execution harness using generated harnesses and execution evidence; harnessing-level recursion updates the improvement harness that guides this refinement, using adopted harnesses and improvement experience after each task to inform subsequent refinement.
Recursive agent harnessing thus extends the model–harness view from an agent that executes tasks to an agent that also learns how to improve its harness: the execution harness is the system being improved, and the improvement harness is the mechanism that improves it. In Harness2, as shown in Figure 3, the execution harness is refined for the current task, while the continual improvement harness supports refinement across tasks. The improvement harness remains fixed during task-level recursion and is updated afterward through its harness improvement library. This library retains adopted harnesses together with lessons from their refinement, making both available for reuse and adaptation in subsequent proposals and composition.
2.2 Task-Level Recursion
Task-level recursion aims to improve the execution harness for the current task. The challenge in our open-world setting is to guide revisions without ground-truth feedback. We therefore introduce a contrastive improvement step that proposes changes, executes them, and examines their behavioral consequences. Building on this step, parallel and sequential recursion use the generated harnesses and execution evidence for further refinement.
2.2.1 A Contrastive Improvement Step
Refer to caption
Figure 3: The Harness2 pipeline. Task-level recursion proposes invariant and domain-specific harness edits, probes their effects, and composes a successor execution harness. After each task, harnessing-level recursion updates the improvement harness with reusable harnesses and lessons from the refinement process.
A contrastive step consists of Propose, Probe, and Compose. Let e=(τ,y)e=(\tau,y) denote an execution record, with trajectory τ\tau and deliverable yy. The step applies an improvement operation Φ\Phi to the current execution harness ℋ\mathcal{H} and the available task-local execution and improvement history ℰ\mathcal{E}:
| (ℋ′,e′,ξ)=Φ(qt,ℋ,ℰ,ℛt).(\mathcal{H}^{\prime},e^{\prime},\xi)=\Phi(q_{t},\mathcal{H},\mathcal{E};\mathcal{R}_{t}). | (1) |
It returns a successor harness ℋ′\mathcal{H}^{\prime}, its execution record e′e^{\prime}, and a step record ξ\xi containing the reference executions, candidate harnesses and probes, composition decisions, and successor execution. The model and environment are omitted because they stay unchanged; the improvement harness ℛt\mathcal{R}_{t} also remains fixed throughout the task.
Propose. The pipeline first obtains a reference execution e0∼𝒜(qt,ℳ,ℋ)e^{0}\sim\mathcal{A}(q_{t};\mathcal{M},\mathcal{H}). Here ∼\sim denotes sampling an execution from the agent. The reference reveals how the harness behaves, not whether its deliverable is correct. Conditioned on the task, current harness, reference, earlier history, and library in ℛt\mathcal{R}_{t}, the pipeline proposes two candidates. The invariant candidate targets agentic deficiencies that may recur across domains, such as planning, tool use, context management, or delegation. The domain-specific candidate targets the knowledge, procedures, and constraints of the current domain or environment. Each candidate is an executable harness obtained by editing the current harness’s component files. Proposals may reuse or adapt existing harness components from the library, but task-specific facts must be checked against the current task’s evidence.
Probe. Each candidate harness is executed on the same task under matched model and environment configurations. Comparing its trajectory and deliverable with those of the reference execution yields a behavioral contrast, providing evidence of whether the edits mitigate the targeted deficiency, leave the relevant behavior unchanged, or introduce regressions. These contrasts inform subsequent composition rather than verify task correctness, as execution stochasticity and shared model biases limit the reliability of the evidence.
Compose. The pipeline reads the reference, candidate harnesses, their diffs against the current harness, and all available task-local execution evidence to form the successor ℋ′\mathcal{H}^{\prime}. Composition is selective: it may merge supported changes, revise conflicting edits, adopt one candidate, or preserve the current harness. Each decision is tied to a concrete observation rather than a presumed score gain. The composed harness is then executed to produce e′e^{\prime}, and the decisions and their evidence are recorded in ξ\xi. The step therefore returns an executed successor together with the evidence and decisions behind its refinement.
2.2.2 Parallel and Sequential Recursion
Refer to caption
Figure 4: Two forms of task-level recursion. (a) Parallel recursion probes multiple candidates and independently composes successor harnesses. (b) Sequential recursion carries each refined harness and accumulated execution evidence into the next step.
Building on the contrastive improvement step, we introduce two forms of task-level recursion (Figure 4): parallel recursion composes refinements from multiple candidate harnesses and their executions, while sequential recursion carries the refined harness and execution evidence into subsequent steps. A positive integer kk controls the exploration budget: kk candidates per scope and kk compositions in parallel, or kk chained steps in sequence. The improvement harness ℛt\mathcal{R}_{t} remains fixed throughout.
Parallel Recursion. Parallel recursion follows the aggregation principle of RSA (Venkatraman et al., 2025), but operates on executable harnesses and their behavioral consequences rather than reasoning outputs. The pipeline collects kk reference executions of the current harness ℋ\mathcal{H}, then independently proposes and probes kk invariant and kk domain-specific candidates. Let ℬ\mathcal{B} denote the reference executions and 𝒫\mathcal{P} the pool of candidate harnesses paired with their execution records. Each of kk independent composition sessions receives the full pool:
| ℋj′=Composej(qt,ℋ,ℬ,𝒫;ℛt),j=1,…,k.\mathcal{H}^{\prime}{j}=\textsc{Compose}{j}(q_{t},\mathcal{H},\mathcal{B},\mathcal{P};\mathcal{R}_{t}),\qquad j=1,\ldots,k. | (2) |
Each session selectively combines or revises supported edits to produce a successor ℋj′\mathcal{H}^{\prime}_{j}, which is then executed. The recursive update thus uses generated harnesses and execution evidence for further refinement, not merely output ranking. Our implementation performs one population update; kk controls its width rather than its depth.
Sequential Recursion. Sequential recursion applies iterative self-refinement (Madaan et al., 2023) to the execution harness. Starting from ℋ(0)=ℋ0\mathcal{H}^{(0)}=\mathcal{H}_{0}, it chains kk contrastive steps, each conditioned on the preceding harness and accumulated execution history ℰ(r−1)\mathcal{E}^{(r-1)}:
| (ℋ(r),e(r),ξ(r))=Φ(qt,ℋ(r−1),ℰ(r−1);ℛt),r=1,…,k.(\mathcal{H}^{(r)},e^{(r)},\xi^{(r)})=\Phi(q_{t},\mathcal{H}^{(r-1)},\mathcal{E}^{(r-1)};\mathcal{R}_{t}),\qquad r=1,\ldots,k. | (3) |
Here, Φ\Phi is the contrastive step defined in Equation 1, returning the refined harness, its execution record e(r)e^{(r)}, and the step record ξ(r)\xi^{(r)}. The initial history contains kk base executions and is extended after each step with ξ(r)\xi^{(r)}. Later steps can therefore retain, revise, or correct earlier changes using both current and previous evidence.
Final Selection. For k>1k>1, an agentic selector compares anonymized deliverables against the task request and source materials. It returns an existing output without access to its originating harness or synthesizing new content. The corresponding harness is denoted ℋt⋆\mathcal{H}_{t}^{\star}, where the star indicates adoption rather than verified optimality. Selection adds no harness revision. At k=1k=1, both forms reduce to the basic contrastive step and bypass selection. Appendix H provides the stage prompts.
2.3 Harnessing-Level Recursion
Harnessing-level recursion uses the experience of refining the current execution harness to improve future harnessing. After each task, the pipeline updates the library within the improvement harness ℛt\mathcal{R}_{t}, making adopted harnesses and lessons from their refinement available to subsequent tasks.
Reflect on the Improvement Process. After returning the deliverable, the pipeline reviews the complete improvement record, denoted by 𝒟t\mathcal{D}_{t}. This record includes reference executions, candidate harnesses and probes, composition decisions, and the selected result. Reflection extracts lessons about which changes addressed the observed deficiencies, under what conditions, and with what consequences. Lessons are retained only when supported by execution contrasts; selecting an output alone does not establish transferability.
Update the Improvement Harness. The pipeline retains the adopted harness ℋt⋆\mathcal{H}_{t}^{\star} and supported lessons in the harness improvement library. We summarize reflection and the resulting library update as
| ℛt+1=Update(ℛt,ℋt⋆,𝒟t).\mathcal{R}{t+1}=\textsc{Update}(\mathcal{R}{t},\mathcal{H}{t}^{\star},\mathcal{D}{t}). | (4) |
Each library entry contains an executable harness and an EXPERIENCE.md recording the applicable situation, lessons, and supporting evidence. An index enables subsequent sessions to inspect relevant entries on demand. Existing harnesses provide components for direct reuse or adaptation, while the accompanying experience guides their application. When evidence is insufficient, reflection adds no new experience entry. Appendix D.2 describes the library organization.
Reuse in Subsequent Improvement. The next task starts from the common execution harness ℋ0\mathcal{H}_{0}, but refinement is guided by the updated improvement harness ℛt+1\mathcal{R}_{t+1}. Earlier components are selectively reused or adapted through Propose, rather than automatically inherited; accumulated experience also informs Probe and Compose. Model weights, stage instructions, and the decision rule remain fixed, while the library evolves. Increasing task-level exploration produces additional execution evidence and composition decisions from which future harnessing can learn. Figure 7 examines this connection using libraries accumulated under different recursion budgets.