Harness optimization is often studied with a fixed policy model and benchmark. When either changes, the optimizer must decide which parts of an evolved harness to reuse or revise, but the harness alone may not explain why earlier edits were made or how they performed. In this work, we study Continual Recursive Self-Improvement (CRSI), a setting for continuing existing harness-optimization methods across compatible benchmarks or policy models. We propose Self-Improvement Memory (SIM) for the harness optimizer, rather than the task-solving policy. SIM groups edits by recurring harness problem and records their rationale, predicted and observed outcomes, and evaluation context. New attempts extend this history as optimization continues. In our experiments across four domains, SIM achieves higher final scores than harness-only and root-cause-only continuation in cross-dataset and pairwise cross-model comparisons. Across ten independent source runs in coding, paired continuations with SIM improve final scores by an average of 2.36 points over harness-only continuation (p=0.003).
Figures & tables
Figure 1: SIM in the agentic outer loop. Starting from (HS,MS) , the proposer and selector consult SIM (dashed arrows) to improve the harness on evolve-set tasks. After selection, SIM records the chosen edit and its measured outcome (teal arrow). Held-out evaluation stays outside the loop.
Figure 2: Cross-dataset CRSI: held-out target scores before (open bars) and after (filled bars) target RSI. The three transfer conditions share the source-evolved harness; Cold Start uses the seed. Axis limits vary by domain. Table 5 lists exact scores.
Figure 3: Cross-model CRSI from Opus 5.5 to Gemini 3.8 Flash, with benchmark and split fixed. Open and filled bars show held-out scores before and after Gemini’s target RSI. Transfer conditions share the Opus-evolved harness; Cold Start uses the seed (Table 6 ).
Gemini model
Seed
Fresh RSI
CRSI
2.5 Flash
17.8
21.4
22.4
3.5 Flash
70.2
73.3
76.8
3.8 Flash
87.2
88.9
90.5
4 Argon
89.7
95.6
94.8
Table 1: Success rates on held-out TB2.1 across Gemini generations. Seed uses the unevolved harness; Fresh RSI optimizes it independently. CRSI adds SIM in the first generation and inherits the previous generation’s harness and SIM thereafter. Bold compares Fresh RSI and CRSI.
Harness construction
Evolve
Held-out
All
B1: Per-model harnesses
77.40
75.20
76.30
B2: Shared seed
72.36
73.28
72.82
S1: Sequential CRSI
76.72
74.20
75.46
S2: Unified synthesis
78.92
75.24
77.08
S3: Source policy used for RSI
Gemini 3.8 Flash
74.28
71.24
72.76
Table 2: Text-classification scores averaged over Grok 4.20 Reasoning, Claude Opus 5.5, and Gemini 3.8 Flash. S3 rows name the policy used to evolve each harness; each harness is evaluated with all three models. All averages the equally sized evolve and held-out splits. Bold marks the highest mean in each column.
Figure 4: Coding optimization (TB2.1 → TB4). (a,b) Held-out TB4 scores of retained harnesses after each target round; round 0 is the starting harness. (c) Final-score differences (SIM minus No SIM) across ten paired continuations from independently evolved Terminus-2 harnesses. The dashed line marks the mean; Table 3 gives individual scores.
Run
Start
No SIM
SIM
Δ
1
18.18
20.61
22.42
+1.81
2
16.97
17.58
19.39
+1.81
3
17.58
20.00
20.61
+0.61
4
18.18
18.18
23.64
+5.46
5
17.58
18.79
20.61
+1.82
6
19.39
20.00
23.64
+3.64
Table 3: Paired coding continuations from ten independent Terminus-2 source runs. Start is the evolved harness’s held-out TB4 score; No SIM and SIM are scores after ten target rounds. Δ is SIM minus No SIM (mean +2.36 ; paired p=0.003 ).
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
Domain
Benchmark
Total
Evolve tasks / rollouts
Held-out tasks / rollouts
Metric
Coding
S: TB2.1
89
44 / 220
45 / 225
pass@1
T: TB4
66
33 / 165
33 / 165
pass@1
Text cls.
S: 3 datasets
412
206 / 1,030
206 / 1,030
accuracy
T: 8 datasets
1,000
500 / 2,500
500 / 2,500
accuracy
Workspace
S: Harvey LAB
160
80 / 400
80 / 400
rubric
T: JobBench
65
32 / 160
33 / 165
rubric
Appendix
Table 4: Benchmark inventory used in our experiments, with source (S) and target (T) roles for cross-dataset CRSI. Split sizes are tasks / rollouts (examples / rollouts for text classification). Each inventory is split uniformly at random into approximately equal halves, with five nominal rollouts per task. Frontier-Eng’s overlapping EngDesign component receives no credit but remains in the denominator. The three workspace targets are evolved jointly and reported as their equal-weight mean; the merged row sums their task and rollout counts.
Condition
Harness
SIM during target RSI
Cold Start
H0
None
Harness Transfer
HS
None
Problem-Only
HS
Root causes only
Full SIM
HS
Full record; updated on target
Appendix
Figure 5: Transfer conditions. The last three rows share the source-evolved harness. The listed memory condition persists throughout target RSI; the full record contains root causes, edits, outcomes, and provenance. Target round and candidate budgets match.
Figure 6: Source RSI with Gemini 3.8 Flash: scores of the seed harness H0 and the source-evolved harness HS on the source evolve set and the held-out source evaluation set. (a) Coding on TB2.1 from the AHE seed; (b) coding on TB2.1 from Terminus-2; (c) text classification on the source suite from NoMemory; (d) the same from FewShotAll; (e) workspace tasks on Harvey LAB; (f) engineering design on EngDesign. HS is the starting harness of Harness Transfer, Problem-Only Memory, and Full SIM in Figure 2 . Open and teal bars show seed and source-evolved scores for each split, with both values labeled. All panels share a zero baseline and the same score scale.
Cold Start
Harness Transfer
Problem-Only Memory
Full SIM (ours)
Domain / seed
Before
After
Before
After
Before
After
Before
After
Coding / AHE
16.36
19.39
18.18
20.61
18.18
18.79
18.18
24.85
Coding / Terminus-2
18.18
19.39
19.39
19.39
19.39
20.61
19.39
21.82
Text cls. / NoMemory
68.60
72.00
71.40
71.00
71.40
73.40
71.40
73.60
Text cls. / FewShotAll
75.72
75.92
72.92
74.12
72.92
75.52
72.92
77.92
Workspace / ReAct
73.89
82.98
74.93
85.07
74.93
85.54
74.93
87.89
Appendix
Table 5: Cross-dataset CRSI: held-out target scores before and after target RSI for the six settings of Figure 2 . The first column identifies the domain and seed harness. Bold marks the highest final score in each setting.
Cold Start
Harness Transfer
Problem-Only Memory
Full SIM (ours)
Domain / seed
Before
After
Before
After
Before
After
Before
After
Coding / AHE
16.36
19.39
13.94
18.18
13.94
20.61
13.94
21.82
Text cls. / FewShotAll
78.32
82.72
77.72
80.20
77.72
81.32
77.72
83.80
Workspace / ReAct
73.89
82.98
68.41
73.42
68.41
79.22
68.41
84.75
Engineering / ReAct
39.13
40.87
34.78
42.61
34.78
46.96
34.78
50.43
Appendix
Table 6: Cross-model CRSI (Claude Opus 5.5 to Gemini 3.8 Flash): exact held-out scores for Figure 3 . Before and After refer to Gemini’s target RSI. Both stages use the same benchmark and split; the three transfer conditions share the Opus-evolved starting harness. The first column identifies the domain and seed harness. The Terminus-2 Cold Start counterpart for coding scores 18.18 before and 19.39 after target RSI. Bold marks the highest final score in each row.
Figure 7: Source scores during target RSI (coding, TB2.1 → TB4, Gemini 3.8 Flash): held-out TB2.1 score (45 tasks, 225 rollouts; one rollout is 0.44 points) of the harness retained after each target round from the AHE seed, with one run per condition. The three transfer conditions start from the source-evolved harness; Cold Start begins from the seed.
Gemini 3.8 Flash
Claude Opus 5.5
Set
Seed
Before
After
Gain
After
Gain
Evolve
AHE
86.82
90.45
+3.63
91.23
+4.41
Terminus-2
85.91
89.09
+3.18
92.21
+6.30
Held-out
AHE
85.78
90.22
+4.44
91.28
+5.50
Terminus-2
87.56
91.56
+4.00
91.61
+4.05
Appendix
Table 7: Source RSI on TB2.1 with Gemini 3.8 Flash or Claude Opus 5.5 as the harness agent, the optimization agent that proposes and selects harness edits: the score of the seed harness, and the score after source RSI with each harness agent. Gain is the change from Before; bold marks the higher After score within each row.
Figure 10: Target gains and edit histories with and without SIM. (a) The six cross-dataset target gains from Figure 2 , measured from the common source-evolved starting harness. (b) Selected edits in target rounds 1–9 from Terminus-2 (TB2.1 → TB4). Both runs inherit the same harness and completion gate. “Gate +” adds a check; — marks no selected edit; round 10 is not listed. The round-4 P8 block was later changed (§ F.2 ); rounds 5 and 6 extend P3 (Figure 11 ).
Stage
Selected modification
Recorded outcome
Source TB2.1, round 4 Carried forward
System prompt. Execution and Verification Guidelines: deliverable integrity, schema conformance, defensive API compatibility, evaluation hygiene, and invariant checks instead of silent suppression.
1 of 4 fixed. Fixed gpt2-codegolf ; protein-assembly , torch-pipeline-parallelism , and train-fasttext remained unresolved.
Target TB4, round 5 Appended
Verification layer. Add a schema-deliverables clause to the completion interlock and prompt templates; extend the checklist to programmatic assertions and a test-suite audit.
0 of 2 fixed. Neither atrx-vep-crispr nor intrastat-meldung was fixed.
Target TB4, round 6 Appended
Verification layer. Add a defensive-contract detector to the completion checklist.
1 of 2 fixed. Fixed embedding-drift-monitor ; biped-contact-dynamics remained unresolved.
Appendix
Figure 11: SIM entry P3 across source and target RSI. The source attempt realizes one of four task-fix predictions; target rounds 5 and 6 realize zero of two and one of two. All attempts retain their outcomes and provenance under the same root-cause hypothesis, including unresolved predictions.
Domain / shift
Reused directly
Reused with adaptation
Inherited and extended
Setting-dependent
Coding Dataset
Shell, terminal, and process layer
Paste-buffer transport (key normalization, foreground detection)
Calibrations to one model’s failure rate or API schema
Appendix
Table 8: Mechanism reuse across datasets and models. The last column includes inactive or removed components as well as assumptions and heuristics that require reassessment in a new setting. A dash means that no mechanism is listed. § F.5.1 –§ F.5.4 give the supporting cases.
Recursive self-improvement (RSI) envisions agent systems that autonomously improve their own models and harnesses, with each updated system continuing to improve itself. Existing approaches typically restrict optimization objectives, editable components, or evaluation procedures, limiting open-ended exploration and continuity across generations. We introduce RSI-Env, a persistent environment for coordinated model-harness improvement, supporting autonomous training, harness modification, and retention of research state. An independent Host Controller manages services, evaluation, and versioning. Under Self, each accepted model-harness version takes over the next improvement round. We define three settings that vary goal specificity and access to benchmark feedback: Open-General, Capability-Directed, and Benchmark-Guided. Across these three settings, we compare Self with two fixed external Teachers on seven tasks, starting from Qwen3.8-27B with a minimal harness. Without benchmark feedback, Open-General Self raises GPQA Diamond accuracy from 65.2% to 73.2% and AIME 2026 accuracy from 53.3% to 56.7%. All three Capability-Directed Self runs achieve target-aligned gains. Knowledge Self demonstrates continued improvement across system updates, with SimpleQA accuracy rising from 82.0% to 85.0% and then 88.0%. Benchmark guidance and Teacher benefits vary by task. These results demonstrate RSI-Env's support for open-ended exploration and sustained recursive improvement within the studied runs, while highlighting challenges in preserving gains across capabilities.
Wanying Qu, Zhiyuan Fan, Jiyao Liu +4
Fudan University · The Hong Kong University of Science and Technology · Georgia Institute of Technology +3
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.
A harness is the code around a language-model agent that organizes prompts, calls tools, manages context, and controls execution. As models grow stronger, recent work has begun to let agents improve their own harnesses, a line of work known as self-evolving harnesses. In most existing methods, a separate proposer running on a human-designed harness modifies the solver's harness, and a separate harness is evolved for each benchmark. Real-world tasks come from many domains, so both the evolution and the evaluation of a harness should cover a diverse range of tasks. We propose a framework close to recursive self-improvement: the same frozen model, on the same version of the harness, first solves tasks as the solver and then, as the proposer, reads the complete run records and directly edits the harness that runs it. Each evolution batch draws tasks from five benchmarks in different domains. To measure generalization, training and held-out tasks are strictly separated, and we additionally evaluate on five out-of-distribution benchmarks never used during evolution. We frame the evolution process as deep-learning training with two stages, multi-task pretraining and continual training. Starting from a 49-line seed harness, the harnesses evolved by GLM-5.3 and GPT-5.6 Sol gain about 5 points on the in-distribution benchmarks, matching or exceeding Claude Code and Codex, and the GPT-5.6 Sol harness is on par with Codex on five out-of-distribution benchmarks. Continued evolution on Claw-Eval in the second stage then lifts GPT-5.6 Sol and GLM-5.3-Flash above Codex and Claude Code. We also provide an in-depth analysis of the mechanisms that emerged during evolution, including output truncation, history compaction, completion checks, independent review, and visual inspection. Code and the evolved harnesses are available at https://github.com/xqkkk/self-evolving-harness.