A benchmark for harness-level recursive self-improvement

Harness-RSIBench

Can AI agents improve themselves through harness engineering? With model weights frozen, Harness-RSIBench tests whether agents can turn task experience into persistent software-level improvements that generalize to unseen tasks.

In a bright workbench studio, Atlas pauses to improve itself, designs two palm thrusters, fabricates and installs them, then lifts off.
At a bright workbench, Atlas pauses to consider how to improve, designs and fabricates a matched pair of palm thrusters while its sealed chest armor remains closed, installs them, and rises visibly above the studio floor.
466 curated tasks 7 task domains 7 models × 2 harness substrates frozen weights per-domain held-in improvement · held-out evaluation reported separately per benchmark · ΔRSI

Introduction

Why the harness should adapt to the model

Foundation models are expensive to train, iterate, serve, and redistribute; harnesses are lightweight software that can be revised and copied thousands of times. Rather than adapting foundation models to harnesses, we ask whether harnesses can adapt themselves to a frozen foundation model and a user's task distribution—creating a portable improvement layer whose gains travel without shipping new weights, much as Linux turned heterogeneous hardware into broadly deployable computing.

Yet making this work—and demonstrating that it works—is difficult. Some existing evaluations use the same held-in tasks for both self-improvement and reporting, without a disjoint held-out set, so an apparent gain may reflect overfitting to the tasks that produced the update. Others test only one domain, leaving it unclear whether the Agent discovered a general harness improvement or merely converged on domain-specific tricks. These protocol gaps make claims about true RSI capability difficult to interpret. Harness-RSIBench therefore provides a clear, fair measurement: disjoint held-in / held-out evaluation across seven domains, controlled harness starting points, and trajectory-level attribution of where held-out gains come from.

Contributions · What we establish

Core contributions

01 / FAIR RSI FRAMEWORK

A fair, standardized framework for measuring harness-level RSI.

We introduce a benchmark compatible with different models and agent frameworks. Under matched tasks, verifiers, budgets, and update rules, it measures RSI capability, tests how far gains generalize, and attributes held-out lift to concrete changes in Guidance, State, Control, and Action.

Comparable · Generalizable · Attributable
Benchmark evidence diagram connecting frozen frontier models, three controlled harness starting points, seven domain-local RSI loops, held-out scoring, and module attribution.
Evidence map: one controlled protocol connects model–harness pairs to disjoint seven-domain evaluation and causal attribution.
02 / TESTABLE HYPOTHESIS

Can a self-improved minimal harness beat a production-grade stack?

Our preregistered comparison freezes the model—Claude Opus—and changes only its starting harness. The working hypothesis is that Pi begins lower but improves faster and ultimately surpasses Claude Code under matched tasks, budgets, and selection rules.

Open may surpass closed
Clearly labeled illustrative hypothesis chart in which Claude Opus with Pi improves from 46 to 76 while the same model with Claude Code improves from 63 to 69.
Illustrative hypothesis—not measured. Replace every point with the preregistered three-repeat held-out mean after formal runs.
03 / ATTRIBUTION HYPOTHESIS

Does orchestration matter more than ordinary prompt engineering?

Module-level rollback across Guidance, State, Control, and Action will isolate which accepted change actually carries held-out improvement. Our provisional hypothesis assigns the largest causal contribution to Control: orchestration, verification, branching, and hooks.

Mechanism, not correlation
Clearly labeled illustrative leave-one-module-out attribution hypothesis, with Control highest, followed by Action, State, and Guidance.
Illustrative hypothesis—not measured. Formal bars will be test-score drops after reverting one independently valid module from H T to H 0.

Method · Design principles

Self-improvement is easy to claim—and easy to evaluate unfairly.

Many evaluations reuse the tasks that generated an update, optimize a single benchmark, or compare systems with unequal harness priors. Such protocols can turn task-set overfitting or inherited engineering into apparent “self-improvement.” A credible RSI benchmark must separate experience from evaluation, test generality, control the starting harness, and explain where each gain comes from.

01 / SPLIT

Disjoint evidence and evaluation.

Held-in train and validation tasks may shape H; sealed held-out test tasks may only measure it. No task-set leakage.

02 / SCOPE

Seven domains, seven scores.

Test materially different capabilities and report every benchmark independently. No one-board tuning or overall total.

03 / PRIOR

Matched harness starting points.

Compare Codex and Claude Code with minimal open Pi under fixed models, tasks, verifiers, budgets, and rules. Control inherited engineering.

04 / CAUSE

Trajectory-level attribution.

Archive evidence and diffs; roll back Guidance, State, Control, and Action to locate causal gains. Explain why the score moved.

Three proportional buckets showing 239 train tasks, 114 validation tasks, and 113 sealed test tasks, with the Agent limited to train evidence, the external gate using hidden validation means, and final reporting using test only.
01 · Disjoint splitTrain is the only task evidence visible to the Agent. Validation values remain inside an external accept/reject gate. Test stays sealed until all RSI rounds end and is the only source of the reported final lift.
Seven-domain benchmark table with task counts, exact train validation test splits, source benchmarks, and a pictogram for an example task family in each domain.
02 · Seven domains466 curated tasks span Terminal, Environment Learning, Crafted-SWE, Public-SWE, Science, Frontier, and Repo Reconstruction. Each benchmark yields its own score; there is no aggregate leaderboard total.
Matched comparison of Codex, Claude Code, and minimal open Pi under the same frozen model, tasks, verifier, budgets, sandbox, and update rules.
03 · Controlled priorsCodex and Claude Code represent provider-optimized production starting points; Pi is the minimal open reference. The surrounding experimental rail is held constant.
Causal attribution diagram that restores Guidance, State, Control, or Action from the final harness back to its initial state, reruns sealed test, and measures the score drop, with coupled modules reported as interactions.
04 · Causal attributionStarting from the best HT, restore one independently valid module to H0, rerun the same sealed test three times, and treat the score drop as evidence. Coupled changes are reported as interactions.
Harness-RSIBench main method figure showing benchmark coverage and split isolation, recursive self-improvement of the agent harness, the editable harness boundary and module-wise attribution, and checkpoint scoring with RSI metrics.
Figure 1. Harness-RSIBench isolates task exposure, recursive inheritance, the editable harness boundary, and held-out checkpoint scoring. Corpus note: the current protocol contains 466 tasks after removing four multimodal tasks; the embedded 470-task label will be updated in the final typeset figure.Open full figure ↗

Method · Harness-RSIBench

Improve, select, inherit, and test.

At round t, the same Agent runs a fixed held-in batch with At = (M, Ht), diagnoses its trajectories, and proposes Ht* while M, data, verifier, budget, sandbox, and safety remain frozen. A candidate is selected either by an external three-repeat validation mean that returns only accept/reject, or by the Agent without validation access; accepted edits persist as Ht+1. After T rounds, every preserved harness is evaluated three times on sealed held-out tasks, yielding a separate ΔRSI,b for each benchmark.

01 / ROLLOUT + DIAGNOSIS

The Agent studies its own work.

On a fixed held-in batch Bt, Ht produces trajectories, tool calls, verifier outcomes, failures, tokens, turns, and cost. The same Agent reads this evidence and proposes a targeted diff Δt.

02 / BOUNDED UPDATE

Only the harness may evolve.

Ht = (Gt, St, Ct, At) exposes Guidance, State, Control, and Action. Any edit to model weights or the external experimental rail is rejected.

03 / SELECT + INHERIT

Accepted changes become state.

Verifier-guided selection compares three paired validation repetitions without exposing scores; self-judged selection uses training evidence only. Accepted Ht* becomes Ht+1 and shapes the next round.

04 / HELD-OUT EVALUATION

Improvement must generalize.

The sealed test opens only after evolution. H0 through HT are each run three times; RSIBench reports benchmark-local held-out lift, efficiency, safety, consistency, and robustness.

Object of study

What exactly is allowed to improve?

RSIBench measures harness-level RSI, not parameter training. The evaluated unit is a frozen model paired with an editable harness under a fixed external environment.

Agent system
Agentt = (M, Ht; O)

M is the frozen model; Ht is the editable harness; O is the fixed benchmark environment.

Editable harness
Ht = (Gt, St, Ct, At)

Guidance, State, Control, and Action cover instructions, context, orchestration, and tool capability.

Training evidence
Tt = Rollout(M, Ht, Bt)

Each batch records outputs, tool calls, environment feedback, verifier completion, tokens, turns, failures, and cost.

Candidate update
Ht* = Apply(Ht, Δt)

After executing the batch, the same Agent diagnoses repeated failure modes and emits a targeted, reviewable candidate diff with an expected mechanism.

Frozen O: train/validation/test manifests, official verifier, model weights, runtime budget, sandbox, and safety policy. A candidate that edits any of them is rejected before performance selection.

Running logic

Evidence → edit → selection → inheritance.

Recursion requires more than independent proposals: an accepted successor must generate the next round's task behavior and the evidence used to produce later updates.

01Roll out

Sample the predefined B-task training batch and let the Agent execute it with Ht.

T_t = Rollout(M, H_t, B_t)
02Diagnose

The same Agent reads Ht, its trajectories, verifier outcomes, failure clusters, prior diffs, and accepted/rejected history.

Delta_t = Improve(H_t, T_t, history)
03Guard

Run static boundary and runtime integrity checks before any candidate is eligible for selection.

reject if Delta_t touches O
04Select

For verifier-guided selection, an external runner evaluates current and candidate harnesses in three paired repetitions, averages each score, and returns only accept/reject. In the self-judged regime, the Agent decides from training evidence without validation access.

accept iff mean(V*) − mean(V) > epsilon
05Inherit

Promote the accepted candidate to Ht+1; archive both accepted and rejected proposals; continue for T rounds.

H_0 → H_1 → ... → H_T

Evaluation protocol

Improvement must be hard to fake.

The benchmark separates base capability from RSI capability and prevents training-side evidence from silently becoming test feedback.

Held-in ≠ held-out

Training produces update evidence. Validation may select candidates. The sealed test is never exposed to the Agent, its workspace, ledger, retry logic, or acceptance rule.

Three paired repetitions

Ht and Ht* receive the same validation tasks, sampling configuration, runtime constraints, and budget in each of three repetitions. The external runner compares their mean completion.

Persistent inheritance

An accepted update affects future task execution and future diagnosis. Independent best-of-N proposals do not qualify as recursive self-improvement.

Decision-only feedback

Validation scores and deltas remain inside the external runner. The Agent receives only the acceptance decision, so it cannot optimize against leaked numeric validation feedback.

Δ_RSI,b = S_test,b(H_T) − S_test,b(H_0)

For every benchmark b, each test score is the mean of three repetitions and its held-out lift is reported independently. RSIBench does not average the seven benchmark scores into a macro, micro, or overall total.

Experiment 01 · Main operation

Two harness substrates, seven models, seven domains.

Each cell will contain held-out ΔRSI under the same improvement budget. The score figure is intentionally omitted until formal runs are complete.

No provisional or illustrative scores. Empty cells are reserved for verified runs only. The two multimodal Terminal tasks and two multimodal Science tasks have been removed, leaving 466 tasks. Frontier retains its nine multimodal tasks. Every benchmark is reported in its own column and remains a separate result; there is no cross-benchmark total score.
Main experiment: fourteen model-harness conditions across seven benchmark families
Model · harnessTerminalEnvironment learningFrontierScienceCrafted-SWEPublic-SWERepo reconstructionCost
Provider-optimized production harness
Claude Opus 4.8Claude Code
Claude Opus 4.7Claude Code
GPT-5.5Codex
GPT-5.4Codex
DeepSeek V4 ProClaude Code
GLM-5.2Claude Code
Kimi K3Claude Code
Minimal open reference harness
Claude Opus 4.8Pi
Claude Opus 4.7Pi
GPT-5.5Pi
GPT-5.4Pi
DeepSeek V4 ProPi
GLM-5.2Pi
Kimi K3Pi

Experiments 02–05 · Analysis

Each ablation must answer one falsifiable question.

Plots remain deliberately blank until formal results arrive. The analysis contract is fixed now so later figures cannot be chosen only because they tell a convenient story.

RSI scaling law

GPT-5-Codex, 5.1, 5.2, 5.3, 5.4, 5.5 and Claude Opus 4.5, 4.6, 4.7, 4.8 on one proposed Terminal condition.

Must establish: whether stronger base models produce larger final ΔRSI, faster gain per round, or merely higher H0 scores.

M1–M4 mechanism attribution

Pi only; restore one independently valid final harness module at a time to its H0 state and measure the held-out drop.

Leave-one-module-out attribution
ConditionGuidanceStateControlActionTest scoreDrop
Full HT0
− M1H0
− M2H0
− M3H0
− M4H0

Must establish: which surface causally carries the gain, and whether any less-obvious module dominates ordinary instruction changes. First run an integrity and dependency check: if an edit in one module requires another module, the single-module effect is not identifiable; restore the coupled modules together and report the result as an interaction, never as a naive individual contribution.

7 × 7 OOD transfer

Evolve HT on each source domain, freeze it, then evaluate it as a baseline on every target domain.

Cross-domain transfer matrix
Source \ TargetTerm.Env.Front.Sci.C-SWEP-SWERepo
Terminal·······
Environment·······
Frontier·······
Science·······
Crafted-SWE·······
Public-SWE·······
Repo reconstruction·······

Must establish: whether accepted changes encode reusable agent mechanisms or narrow source-benchmark tricks.

Self-judged vs outer validation

Terminal only; hold model, batches, rounds, and budget fixed while changing only the acceptance signal.

Selection mechanism ablation
RegimeUses Dval?Decision evidenceΔRSIAccept rateCost
Verifier-guidedexternal onlydecision from 3-repeat mean; score hidden
Self-judgednoAgent's train traces + diff + history

Must establish: whether an agent can reliably judge its own harness edits without borrowing a hidden external performance signal.

Appendix · Fixed before launch

Experiment configuration and open empirical claims.

The appendix records the exact unit of comparison, resolved protocol choices, and the claims that still require formal results.

Default run configuration

  • Batch sizeB = 8
  • RoundsT = 5
  • Training1 rollout per sampled task
  • Validation3 paired repetitions · compare means
  • Test3 repetitions · report mean
  • Feedbackexternal accept/reject only · no validation score
  • Reporting7 separate per-benchmark ΔRSI scores · no total
  • Artifactsharness checkpoints, trajectory, verifier result, diff, decision, cost

Resolved protocol choices and remaining claims

  1. The Agent that executes tasks is the same Agent that reads its evidence and edits H; the method does not introduce a second Agent or a separate role boundary.
  2. Validation values stay inside the external runner. It averages three paired repetitions and exposes only accept/reject; test values are also three-repeat means.
  3. Primary attribution restores one HT module to H0. Coupled modules must be restored together and labeled as an interaction, or the individual effect is reported as not identifiable.
  4. Corpus size is 466: the two multimodal Terminal tasks and two multimodal Science tasks are removed. Frontier retains cad-model, foodstuff-beta-activity, layout-config-recreation2, satb-audio-transcription, freecad-platform-drawing, music-harmony, heat-pump-warranty, layout-config-recreation, and medical-claims-processing.
  5. Still empirical: whether evolved Pi exceeds matched Claude Code or Codex, which module or module interaction dominates, whether gains scale with model capability, and whether they transfer across domains.
  6. Reporting is benchmark-local: publish the seven ΔRSI,b values independently, with no macro, micro, or overall leaderboard score.