Key Points
- Anthropic published research defining agent memory as knowledge Claude keeps across sessions as readable context.
- Testing covered a database benchmark, Pokémon Red, and roughly 350,000 internal files from Stainless.
- Builders get a tested recipe: judge relevance, keep notes small, add idle-time correction.
The latest:
Newer Claude models perform better with memory while writing far fewer files, according to research Anthropic published on 6 November 2026 under the title The components of agent memory, authored by Lance Martin. The paper breaks memory into three parts: memory notes, relevance judgment about what is worth saving, and dreaming, a background review during idle time that reorganizes notes and corrects them against original session transcripts.
Details:
- The definition: Anthropic defines agent memory as knowledge Claude acquires from experience and retains between sessions, stored as readable context. The paper excludes changing model weights, in-context learning inside a single conversation, and compaction summaries, narrowing the term to persistent written notes the agent can read back later.
- The test beds: Three environments were used: the CL-Bench 1.0 database benchmark, where each question starts a fresh session and only the memory folder survives; Pokémon Red with a writable memory folder; and the archive of Stainless, a company Anthropic acquired in May, holding roughly 350,000 internal files and about 420 million tokens.
- Model progression: On CL-Bench, Sonnet 4.6 scattered untested theories across files. Opus 4.7 consolidated them into one reference separating confirmed from unconfirmed. Sonnet 5 marked answers verified after correction. Opus 5 first closed the learning loop with a rule, a verification method and a warning about traps. Opus 5.5 and Sonnet 5.5 matched it with less structure.
- Saving and reading rules: Telling Opus 4.7 and Opus 5 that a memory folder existed produced a notable gain, while instructing them to record only failures erased most of it. Sonnet 4.6 often failed to read its own memory; prompting it to read first roughly doubled its score. Sonnet 5 reads memory unprompted about 9 times in 10.
- The game evidence: Sonnet 3.7 wrote 413 files across 225 folders and earned one badge; near step 10,000 it spent 17 steps creating 6 files and deleting 9 without acting in the game. Fable 5 wrote 9 files in two folders with a global.md board and took 4 badges. Opus 5.5 kept a small folder tracking its goal and next steps, and finished the game.
- Dreaming as repair: Claude recorded the Pokémon Center on the wrong side and fell off a ledge 3 times before getting stuck. Dreaming compared the note with the session transcript and fixed it, letting the agent reach Cerulean City; without the correction it ended in Pewter City. Transcripts are the ground truth, so dreaming requires keeping them.
- Archive results: On 25 questions answered with the wiki alone, criteria met rose from 13% to 48% as dreaming expanded from two sessions to 128. Search plus wiki scored 61% against 53% for search alone, saving roughly 20,000 tokens per question. On 24 multi-document synthesis questions, the wiki hit 87% versus 73% for search.
- The costs: Notes promoted to the top tier load in every session and consume tokens, a wrong note propagates everywhere, and loading a note does not guarantee the model acts on it. Claude Code’s automatic memory loads only the first 200 lines or 25 kilobytes of MEMORY.md, and its documentation warns longer instruction files reduce adherence.
- Parallel agents: Multiple agents writing a shared table of contract clauses overwrote each other, and the wiki got 41 of 57 facts right, or 72%. After an instruction-refinement loop assigning one agent per contract page and quoting clauses verbatim, it reached 57 of 57. Dreaming also redirected 9 broken links and added 3 pages, including an index.
- Stated limits: Anthropic notes the evaluations covered a database task, a Game Boy game and legal document archives, not code repositories. Dreaming consumes compute and its cadence is left undefined, and memory maintenance can fail by bloating past its own sources. In one task the wiki grew larger than the source documents.
Between the lines:
The pattern across all three environments points the same way: fewer, better-governed notes beat large collections. The Pokémon runs show write volume falling from 413 files to 9 to a single small folder as scores rise, and the instruction findings suggest the constraint sits in how models are told to use memory rather than in storage itself.
What’s next
Anthropic lists open questions it has not resolved: when memory should be created, how it stays current, and whether transcript search is the foundation. It has published a dreaming workflow in its Cookbook for builders to test.