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.
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.
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.
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.
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.
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.’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 memory is consumed by the harness optimizer rather than serving primarily as the executing agent's task history. Improvements occur in the orchestration layer rather than requiring model weight updates.
Organizing attempts by underlying problem rather than only by chronological iteration allows an optimizer to compare alternative interventions and their outcomes. Recording the evaluation environment helps distinguish transferable findings from environment-specific results.
A harness checkpoint preserves the current implementation but not the reasoning behind earlier changes. Self-improvement memory retains optimization experience for subsequent stages, allowing the optimizer to reuse prior evidence when models or tasks change.
Table 5 reports that on LoCoMo with GPT-4.1-mini the no-consolidation score was 0.902. HDBSCAN minimum cluster size 5 compressed the memory store by 21.7% at score 0.896; size 10 compressed by 16.3% at 0.892; size 2 compressed by 30.9% but fell to 0.876. Treat semantic similarity as a candidate-merge signal rather than proof of equivalence; preserve source provenance and evaluate loss after consolidation.
An agent can write a lesson while doing a task, or return to session records later and consolidate them in an offline process known as dreaming. Immediate writing makes the information available to the next session but competes with the current task for attention. Offline review can compare past experiences, correct outdated notes, and improve organization, but it requires compute and its results may not be ready immediately. A sensible design is to preserve searchable records and review important, frequently used or change-prone knowledge more often than rarely used stable notes.
An agent writing a knowledge page sees only part of the material, and may link to a page that does not exist or miss useful relationships. In Anthropic's legal-document wiki example, a later offline review found nine links to a nonexistent page and redirected them to an existing page about the same document. It also created three pages, including an index, increasing the wiki from 38 to 41 entries and from 225 to 278 links. This illustrates a two-stage workflow: extract knowledge first, then review the collection as a whole to resolve missing references and improve navigation.
Multiple agents building the same wiki may overwrite one another's edits or summarize away details that matter to the final task. In Anthropic's Harvey Legal Agent Benchmark contract example, agents initially wrote contract terms into a shared table; the resulting brief covered only 41 of 57 required facts. After assigning each contract its own page and a single writer, and requiring the exact contractual wording to be preserved, the brief covered all 57. For tasks that depend on precise evidence, partition writing responsibilities and preserve important source details before merging or summarizing them.
When answering a question over a document collection, an AI agent can search original files or use a wiki that has already organized facts and links between them. In Anthropic's 24-question merger-document evaluation, wiki-assisted answers satisfied 87% of graded criteria on items requiring synthesis or judgment/arithmetic, compared with 73% for direct search. In a separate legal task where most criteria could be satisfied from one document, the wiki provided no clear advantage. Another wiki grew to 203 KB from a 115 KB source collection, illustrating that organization without useful abstraction can add clutter. A practical approach is to use direct search for precise lookups and consider curated representations for recurring cross-document reasoning.
An AI agent with a long history cannot fit every past experience into each new conversation. Anthropic describes four layers of persistent memory: searchable session records, notes about useful experiences, linked knowledge such as wikis, and a small amount of context loaded at startup. A short startup index tells the agent what knowledge exists and where to find it, while detailed notes stay available for on-demand retrieval. Claude Code illustrates this approach by loading only the first 200 lines or 25 KB of its MEMORY.md index.
A new session usually lacks the reasoning that led to earlier successes and failures. In Anthropic's CL-Bench database exercise, Claude answered questions in separate sessions, received the correct answers, and could keep files between sessions. Opus 5 used those files to record rules, the basis for trusting them, and pitfalls; its average reward rose from 0.564 without memory to 0.828 with memory. Sonnet 4.6 mostly saved untested explanations and saw a much smaller improvement, from 0.330 to 0.364. A useful learning loop is therefore to record feedback, form and test an explanation, and store the validated lesson instead of treating a guess as knowledge.
Repeatedly searching a large document collection can require an agent to rediscover the same relationships each time. Anthropic had agents build and refine a wiki over about 350,000 Stainless company files (420 million tokens), then evaluated answers to 25 questions. As wiki construction increased from 2 to 128 sessions, the wiki-only score rose from 13% to 48% of graded criteria met; the wiki-plus-search score rose from 54% to 61%, compared with 53% for search alone. Combining the wiki with search reportedly also reduced per-question token use by about 20,000. The wiki supplies an organized map of known facts, while search can retrieve original evidence and information missing from that map.
A mistaken memory can mislead later sessions even if the agent has access to current information. In Anthropic's Pokémon Red example, Claude incorrectly recorded that a Pokémon Center was beyond Mt. Moon, so it thought the cave had been completed and repeatedly backtracked. An offline review process called dreaming examined the earlier session record, corrected the landmark's location, and let Claude resume the right route; the corrected run reached the next city at action 1,935, while the uncorrected and no-memory runs did not reach it within the plotted 3,000 actions. This illustrates why persistent memory needs a way to check, revise and trace claims back to their evidence.
An agent working in a changing environment can waste time maintaining notes about facts that are already visible, such as its current position or balance. In Anthropic's Pokémon Red comparison at roughly 10,000 steps, Sonnet 3.7 saved 413 files (977,930 characters) and earned one badge, whereas Fable 5 saved 10 files including a top-level dashboard (43,406 characters) and earned four badges. Fable 5 kept route plans, goals and gameplay strategies rather than duplicating transient screen information. The useful distinction is between facts that can be retrieved cheaply from the environment and knowledge that would otherwise require repeating difficult reasoning or experiments.
Giving an agent a persistent memory folder is not enough if it never reads its notes or saves incorrect explanations. Anthropic tested Claude models on database questions with feedback and found that Opus 5 and Opus 4.7 used memory effectively with general guidance; requiring them to save only failures reduced their memory-related performance gains by 0.234 and 0.150 respectively. For Sonnet 4.6, telling it to consult earlier notes and test its explanations raised average reward from 0.364 with memory alone to 0.641, versus 0.330 without memory. Memory instructions should therefore be adjusted to the agent's demonstrated ability, not applied as one rigid policy to every model.