TL;DR
Anthropic's The components of agent memory (Lance Martin, 6 Nov 2026), surfaced by Elvis Saravia's LinkedIn post, splits agent memory into four layers: transcripts, notes the agent writes, derived representations such as wikis, and a small injected layer loaded every session. An offline pass called dreaming reads transcripts to correct notes, build wikis, and promote or demote what gets injected.
The findings that matter for builders:
Memory helps strong models a lot, weak ones little. On a CL-Bench database task, memory lifted Opus 5 from 0.564 to 0.828 mean reward; Sonnet 4.6 only went from 0.330 to 0.364.
Say what memory is for, not how to use it. A fixed rule ("record only failures") cut Opus 5's memory gain by 0.234. Explicit read-then-test prompting nearly doubled Sonnet 4.6, so steering is for older models.
Less is more. In Pokemon Red, Sonnet 3.7 wrote 413 files and earned 1 badge; Fable 5 wrote 10 files (43K chars) and earned 4. Store what the environment won't tell you again: plans, tested rules.
Dreaming fixes wrong notes. A note corrected against the transcript got Claude past Mt. Moon; the uncorrected and no-memory runs never did.
Wikis pay off on cross-document questions, with search beside them. Wiki + search reached 61% vs 53% for search alone and saved about 20K tokens per question; on single-document lookups the wiki added nothing, and one wiki grew to 1.77x its corpus.
Keep the injected layer tiny. Claude Code's auto memory loads only the first 200 lines or 25 KB of MEMORY.md, as an index.
Saravia's own take: keep memory "extremely basic" (folders and files plus some episodic layer), and expect to keep upgrading it.
The memory hierarchy and dreaming
Memory here means knowledge Claude gains from experience and keeps between sessions as readable context. It excludes weight updates, in-context learning and compaction.
The session writes notes and logs transcripts; only the top layer is loaded automatically, the rest is read or searched when needed. Dreaming, borrowed from sleep-time compute (Letta and UC Berkeley) and the hippocampal replay analogy, runs offline and does four jobs: correct notes against transcripts, build representations such as wikis, promote a few items into injected context while pushing detail down, and fill gaps no single session could see (dangling links, duplicates, a missing index). It can also be aimed at a goal, for example organizing memory around the person an assistant serves.
Evidence
Each experiment isolates one layer or one dreaming job. Numbers are from the article's figures and alt text.
| Experiment | Setup | Result | What it shows |
|---|---|---|---|
| CL-Bench 1.0 database task | Fresh session per question, Claude Managed Agents, one persistent memory directory; correct answer revealed after each question | Mean reward, baseline to memory: Opus 5.5 0.655 to 0.838, Sonnet 5.5 0.644 to 0.833, Opus 5 0.564 to 0.828, Opus 4.7 0.383 to 0.700, Sonnet 5 0.306 to 0.610, Sonnet 4.6 0.330 to 0.364 | Opus 5 was first to close the loop: rule plus how it knew, answers, traps. Sonnet 4.6 left untested guesses |
| Steering rules on CL-Bench | One fixed rule per run vs "a memory folder is available" | "Record only failures": Opus 5 gain -0.234, Opus 4.7 -0.150, Sonnet 4.6 -0.020. Read-first and test-theories prompting took Sonnet 4.6 to 0.641 | Fixed rules hurt strong models; explicit procedure helps weak ones. Sonnet 5 read memory first 9/10 times unprompted |
| Pokemon Red, salience | Memory folder, about 10,000 steps in | Sonnet 3.7: 413 files, 225 folders, 978K chars, 1 badge. Fable 5: 10 files, 43K chars, 4 badges. Opus 5.5 beat the game with a small rewritten folder | Don't store what the environment shows every turn; store plans and tested rules. A global.md dashboard held goal, plan and memory rules |
| Pokemon, dreaming as correction | A wrong note about which side of Mt. Moon the PokeCenter sat on | Corrected run reached Cerulean at action 1,935; raw-memory run fell off the ledge 3 times and backtracked; no-memory run never arrived | The transcript is ground truth; a wrong trusted note is worse than none |
| Stainless corpus wiki | About 350,000 files (420M tokens), 25 questions, Opus 5 dreaming over 128 sessions with a shared log | Wiki alone 13% to 48% of criteria as dreaming grew from 2M to 128M tokens; wiki + search 54% to 61%; search alone flat at 53%; about 20K tokens saved per question | A wiki is a map that augments search, not a replacement |
| Merger questions and Harvey LAB briefs | Wiki vs direct file search | 87% vs 73% on 24 cross-document questions; no gain on a LAB task answerable from one memo; one wiki reached 1.77x its corpus (68 pages, 203 KB from 115 KB) | Wikis earn their keep on multi-document synthesis and judgment; on lookup they are overhead |
| Goal-shaped dreaming (LAB contracts) | Four agents writing one shared provisions page, then instructions rewritten by a reflect-and-rebuild loop | 41 of 57 graded facts survived concurrent writes; one page per contract, quoted verbatim, kept 57 of 57 | Concurrent writers to one page lose facts; tell the dreamer what matters |
| Gap-filling second pass | A second dreaming pass over a built wiki | 9 dangling links repointed, 3 pages added (one an index); 38 to 41 entries, 225 to 278 links | Cross-session passes fix what each session can't see |
Tradeoffs and failure modes
The article is candid that the design questions are open. The ones a builder has to decide:
When to write. In-session notes capture salience at the source but pull attention from the task. Dreaming moves the work offline, but its output isn't available until the pass runs.
Wrong notes are trusted. A note can be wrong at birth or drift as the world changes, and a later session will rely on it. Dreaming against transcripts is the fix, but checking every note is too expensive; target notes likely to change, or set cadence by access frequency.
Representations cost upkeep and can hallucinate. A wiki needs compute to build and maintain, can accumulate errors, and can grow past its source (the Borges map). Transcript search is a reasonable foundation on its own.
The injected layer is the expensive one. It costs tokens every call, carries any error into every session, and longer instruction files reduce adherence. Dreaming's main job at the top is pruning: push detail down and leave a link. A commenter on Saravia's post adds the caching angle: a small, stable injected prefix is nearly free under prefix caching, so churn there costs latency as well as tokens.
Hoarding. Writing everything turns memory into the task (Sonnet 3.7 spent 17 steps reorganizing files with no game actions).
Concurrent writers. Several agents editing one shared page overwrote each other and lost 28% of graded facts. Partition ownership: one writer per page.
Over-specified memory policy. Fixed rules about what to record cost strong models most of their gain.
Payback is unmeasured. Another commenter notes the 20K tokens saved per question has to repay the build and refresh cost; the article gives no cost per correct answer at realistic query and update rates.
Review checklist
Questions to ask of any agent memory design:
Are raw transcripts kept and searchable? They are the ground truth every other layer is checked against.
Is the injected layer bounded (lines or bytes) and written as an index that points down, not as content?
Does memory guidance state the purpose and leave salience to the model, with procedure added only for weaker models?
Does each stored rule say how it was verified, and are unconfirmed facts marked as such?
Is there an offline pass that checks notes against transcripts, and is it targeted at volatile notes rather than everything?
Is anything stored that the environment re-reveals every turn (state on screen, file contents, positions)? Drop it.
Does any derived representation (wiki, graph) sit beside search rather than replace it, and is its size tracked against the source?
Is the representation justified by the workload: cross-document synthesis, judgment or arithmetic, rather than single-document lookup?
Does each shared page have one writer, with source terms quoted rather than summarized when exactness is graded?
Is there a second pass for dangling links, duplicates and a missing index?
Is the build and refresh cost compared against tokens saved per query at realistic volumes?
Related entries and sources
R036 Ruben Hassid's Claude 101, checked: already drew on this article for config advice (small injected layer, purpose over procedure, a manual KEEP / FIX / DELETE pass as dreaming).
R059 Memory Tax: memory systems can lose to plain search over raw history. Anthropic's wiki-alone vs search-alone numbers agree; wiki + search is the configuration that wins.
R040 WikiTrace: lessons stored without their evidence degrade agents. Dreaming against transcripts is the same remedy: keep the source and re-check.
R057 SoMem: agents self-organizing memory as linked Markdown documents, close to Anthropic's dreamed wiki.
R123 Proactive agents: a scheduled "dreaming" rewrite for salience, expiry and duplication.
R088 MemCredit: pick memories by their effect on the next action; a measurable version of "salience".
R131 Self-Improvement Memory: memory for the optimizer, with rules carrying predicted vs observed outcomes, like Opus 5's rule plus how it knew.
R002 The 5 layers of agent memory and R083 15 building blocks: taxonomies; this article adds measured evidence for which maintenance steps matter.
Sources:
Anthropic, The components of agent memory (6 Nov 2026)
Elvis Saravia's LinkedIn post and its top comments