An AI agent can improve its performance by changing the software that manages its prompts, tools and execution, without retraining the underlying model. This paper introduces Self-Improvement Memory (SIM), which preserves the reasons behind previous software changes and their measured results so that optimization can continue when the model or task distribution changes.
Problem
Recursive self-improvement (RSI) typically optimizes an agent harness against a fixed model and benchmark. Transferring the resulting harness to a new setting does not necessarily transfer its benefits: a completion check, tool parser or retrieval strategy that works for one model or dataset may fail in another.
The final harness contains the implementation, but may not explain why a change was introduced, which failures it targeted, or whether those failures were actually resolved. Without this history, subsequent optimization can repeat unsuccessful attempts or remove useful mechanisms without understanding their purpose.
Method
The authors define Continual Recursive Self-Improvement (CRSI) as continued harness optimization after a change of benchmark or policy model, assuming a compatible executable interface. Cross-dataset continuation keeps the policy fixed; cross-model continuation keeps the benchmark and evaluation split fixed.
SIM accompanies the evolved harness into the next optimization stage. Unlike memory used by an agent to solve tasks, SIM is consumed by the agents responsible for improving the harness itself.
An agent harness is the software controlling how a language model receives context, calls tools and completes tasks. Yu et al. place Self-Improvement Memory (SIM) in the outer optimization loop: the proposer and selector consult the rationale and measured results of earlier harness changes, while the model executing tasks remains frozen. The optimizer can reuse experience across tasks or model changes by revising the harness rather than training the task-solving model. In the matched cross-dataset experiments, full memory improves final held-out scores by 2.43–4.35 points over transferring only the evolved harness.
Each memory entry represents a root-cause hypothesis, such as premature task completion. It contains a history of selected modifications, their rationale, predicted task-level improvements, observed outcomes, and provenance (domain, benchmark, policy model and optimization round).
The optimization loop works as follows:
The evaluator executes the current harness and collects scores, traces and errors.
The proposer reads the harness, run history and SIM, then proposes candidate modifications.
The selector screens candidates and chooses among evaluated modifications, considering performance, complexity, specificity and regression risk.
SIM records the selected modification and measured outcomes, appending to an existing problem or creating a new entry. Unsuccessful predictions are retained; if no candidate is accepted, SIM remains unchanged.
Optimization architecture
Optimization architecture redrawn from Method §§3.1–3.3 and Figure 2; policy weights remain frozen within each run.Diagram
Conceptual diagram based on Sections 3.1–3.3 and Figure 2. The policy model remains frozen throughout.
Both proposer and selector read the complete memory. Held-out evaluation is excluded from optimization feedback.
A completion gate is a harness check that prevents an agent from declaring a task finished prematurely. In Yu et al.’s coding transfer experiment, both optimizers inherit the same gate; the one with Self-Improvement Memory (SIM) sees why it was introduced and its prior outcomes, retaining completion verification while adding checks appropriate to the new tasks. Without SIM, the optimizer tightens the gate, has to repair completion deadlocks twice, and misattributes the inherited gate to its own first round. Storing edits, rationale, predicted versus measured outcomes and evaluation context under a recurring problem can help distinguish a persistent requirement from an obsolete implementation.
Experiments cover coding, text classification, agentic workspace and engineering design. The authors compare fresh optimization from the seed harness, transfer of the evolved harness alone, transfer with root causes only, and transfer with full SIM. The three transfer conditions share the same starting harness and optimization budget.
Setting
Reported final held-out score advantage
Six cross-dataset transitions
Full SIM exceeds harness-only transfer by 2.43–4.35 points
Same cross-dataset transitions
Full SIM exceeds root-cause-only memory by 0.20–6.06 points
Four Opus-to-Gemini transitions
Full SIM exceeds harness-only transfer by 3.60–11.33 points
Ten independent coding source runs
Mean paired advantage of 2.36 points over harness-only transfer; p = 0.003
Transferring an optimized agent harness (the software around a model) preserves its code but not necessarily the evidence behind the code. Yu et al. compare continued optimization from the same evolved harness with no Self-Improvement Memory (SIM), root causes alone, or the complete record of diagnoses, edits, predictions and measured outcomes. Across six dataset transitions covering coding, classification, workspace and engineering, full SIM finishes above harness-only transfer by 2.43–4.35 points on a 0–100 held-out score scale. This supports transferring optimization experience along with the implementation when adapting an agent to a new task distribution.
The workspace experiment illustrates why continued optimization matters: the transferred harness starts at 68.41, below the new model's seed score of 73.89. After optimization, harness-only transfer reaches 73.42, whereas full SIM reaches 84.75.
Workspace transfer: held-out scores
Condition
Starting score
Final score
Gain
Harness only
68.41
73.42
+5.01
Full SIM
68.41
84.75
+16.34
flowchart LR
A[Transferred harness: 68.41] --> B[Harness only: 73.42]
A --> C[Full SIM: 84.75]
Diagram
Matched starting harness and optimization budgets; scores from Section 4.3.1. Gains are calculated from the reported endpoints.
An evolved harness contains prompts, tools and execution controls tuned against a particular environment. In Yu et al.’s cross-dataset experiments, source optimization raises held-out source scores by 2.75–6.41 points in all six settings, yet one classification harness starts its new dataset at 72.92 versus the unoptimized seed’s 75.72. When a harness evolved with Claude Opus 5.5 is transferred to Gemini 3.8 Flash on the same benchmark and split, it starts below Gemini’s seed in all four domains (0.60–5.48 points lower), and harness-only continuation still finishes below fresh optimization in three. Thus source improvement is not sufficient evidence that a harness will benefit a new environment; re-evaluate it against a target seed.
Yu et al. transfer harnesses (the software controlling agent execution) optimized with Claude Opus 5.5 to Gemini 3.8 Flash while holding benchmarks and splits fixed. Continuing with Self-Improvement Memory (SIM), which carries previous diagnoses, edits and measured outcomes, yields final held-out scores 3.60–11.33 points above code-only transfer in four domains. In workspace, both start at 68.41; the code-only run finishes at 73.42 and full memory at 84.75. Optimization history can therefore be useful even when the inherited harness initially performs poorly with the new model.
Yu et al. compare three ways to continue optimizing an agent harness after a dataset change: transfer code alone, code plus diagnoses of recurring failures, or code plus Self-Improvement Memory (SIM), which also records modifications, rationale, predicted and observed outcomes, and provenance. Across six transitions, diagnosis-only memory ranges from 1.82 points worse to 2.40 points better than code alone; full SIM beats diagnosis-only memory by 0.20–6.06 points in every setting. The implication is that remembering what went wrong is less reliable than remembering what was tried and what actually happened.
In Yu et al.’s AHE coding harness transfer from Terminal-Bench 2.1 to Terminal-Bench 4, all transfer conditions begin with the same source held-out score of 90.22. Full Self-Improvement Memory (SIM), preserving earlier edit rationale and evaluation results, loses only three successful source rollouts out of 225, compared with four for root-cause-only memory and six for harness-only transfer. Its target score also gains 6.67 points, versus 0.61 with root-cause-only memory. This demonstrates a case where adapting to new tasks need not trade off as much previous performance when prior optimization evidence is retained.
Yu et al. compare adaptation of two coding harness seeds, AHE and Terminus-2, from Terminal-Bench 2.1 to Terminal-Bench 4. Full Self-Improvement Memory (SIM), which supplies the optimizer with earlier diagnoses and measured outcomes, is best or tied across rounds 1–10 for both seeds. It exceeds the strongest control’s final held-out score of 20.61 by round 5 for AHE and round 2 for Terminus-2. This suggests that memory can reduce the number of optimization rounds needed to reach a given performance threshold.
Yu et al. evolve ten independent Terminus-2 harnesses on Terminal-Bench 2.1, then continue each on Terminal-Bench 4 twice under matched target model, tasks, starting harness and optimization budgets. The run using Self-Improvement Memory (SIM), which retains previous diagnoses, edits and outcomes and appends new ones, wins nine of ten pairs; mean final scores are 21.70 with memory and 19.33 without it. The paired improvement is 2.36 points (95% CI 1.05–3.68; p = 0.003), supporting a repeatable benefit in this coding setup rather than a result driven by one lucky initialization.
Yu et al. test text classification across Grok, Claude Opus and Gemini using a common harness (the software around the model). A unified synthesis approach using feedback from all three models obtains an average held-out score of 75.24, compared with 75.20 for separate per-model optimized harnesses and 73.28 for the shared unoptimized seed. Sequential continual optimization reaches 74.20, while harnesses individually optimized for one model and then shared score 66.84–72.24 on average. The experiment suggests that optimizing a shared harness with feedback from its intended models can be a viable alternative to maintaining separate implementations.
Yu et al. carry an evolved harness and Self-Improvement Memory (SIM), a record of prior harness diagnoses and edits, through successive Gemini models on Terminal-Bench 2.1. Relative to optimizing the original seed independently at each generation, inherited optimization scores 76.8 versus 73.3 on Gemini 3.5 Flash and 90.5 versus 88.9 on Gemini 3.8 Flash, but 94.8 versus 95.6 on Gemini 4 Argon. Thus a chain of past improvements can help new models but should still be compared against a freshly optimized baseline rather than assumed to be superior.
The experiments assume compatible harness interfaces and fixed optimization procedures. Independent repetitions focus on coding; other domains use one optimization run per condition. SIM is evaluated as a combined procedure, so the effects of inherited memory and subsequent memory updates are not isolated. The complete memory is supplied without retrieval or truncation, leaving long-term scaling an open question.
Yu et al.’s Self-Improvement Memory (SIM) stores earlier diagnoses and selected harness edits, and both optimization agents read the entire record each round without retrieval or truncation. Their comparison changes the full memory procedure together: inherited source experience and new target-stage updates are both enabled, so the measured advantage cannot be attributed separately to either. The paper supports the tested full-memory procedure, not a conclusion that unlimited memory is scalable or that inherited memory alone accounts for the gains.
The central contribution is to preserve the experience of improving an agent, not merely the improved agent implementation. The reported results support this approach under the tested transitions, rather than establishing that every future model or dataset change will benefit.