Anthropic's agent memory findings: one wrong note can loop your agent, and 'dreaming' fixes it
Anthropic published how it builds memory for Claude agents: a four-layer hierarchy, offline 'dreaming' passes that correct notes against transcripts, and evals showing a single wrong note trapped an agent in a loop. The practical rules for anyone building agent memory.
Anthropic published a detailed account of how it builds memory for Claude agents on November 6, and it is one of the more concrete pieces of agent engineering research this year. The short version: agent memory works best as a hierarchy (transcripts, notes, structured representations like wikis, and a small injected layer), maintained by an offline process Anthropic calls dreaming, which re-reads transcripts between sessions to correct wrong notes and reorganize what the agent keeps. The evals are instructive: one wrong note ("Mt Moon DONE") sent an agent back to the start of a Pokémon cave three times until a dreaming pass corrected it, and agents sharing one notes page on a contract task overwrote each other until only 41 of 57 graded facts survived. If you build agents with any kind of persistent memory, the failure modes here will look familiar.
The setup Anthropic describes
Per the post, memory means knowledge Claude gains from experience and retains between sessions as files it can read later, excluding weights, in-context learning, and compaction. The hierarchy has four layers: the raw transcript log, memory notes Claude writes in-session, representations like wikis that organize notes, and a small injected layer loaded into every session. Dreaming (the post credits Letta and UC Berkeley researchers with the sleep-time compute idea) runs between sessions and moves information up the hierarchy, correcting notes against transcripts, building wikis, and pruning the injected layer.
Two findings about writing memory stand out:
- Salience judgment has improved with model generations. In a Pokémon Red test, Claude Sonnet 3.7 wrote 413 memory files in 225 folders (about 978K characters) and earned one badge, spending 17 consecutive steps reorganizing memory instead of playing. Claude Fable 5 wrote 10 files totaling about 43K characters and earned four badges. Anthropic says Opus 5.5 took the same lean approach and beat the game.
- Steering rules can hurt. On the CL-Bench database task, telling models to "record only failures" cut most of the memory gain (Opus 5 lost 0.234 of reward). But for the older Sonnet 4.6, explicit prompting to read memory files and test its theories nearly doubled its score (0.330 baseline to 0.641 with memory plus refined instruction). Anthropic's current practice with frontier models: simple guidance to take notes when asked or when something is clearly worth remembering, and leave the judgment to the model.
What the evals show
All results below are Anthropic's own evaluations, so read them as vendor-reported:
- Memory helps most models that close the loop. On CL-Bench 1.0 (answer database questions, get graded, write memory for next time), mean reward with memory versus stateless: Opus 5.5 went 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 4.6 barely moved (0.330 to 0.364) without steering.
- Wrong notes are worse than missing ones. A Pokémon run stored a wrong landmark location, marked a cave section done, fell off a one-way ledge three times, and never recovered. A dreaming pass checked the note against the transcript, fixed it, and the agent then completed the section.
- Wikis help when answers span documents. On a 25-question eval over a roughly 350K-file corpus (about 420M tokens, from Stainless), wiki-only answers rose from 13% to 48% of graded criteria as dreaming scaled from 2 to 128 sessions; wiki plus search reached 61% versus 53% for search alone, and saved about 20K tokens per question. On a Harvey LAB merger task, Claude scored 87% on multi-document and judgment questions with a wiki versus 73% with search. When answers lived in a single document, the wiki showed no clear gain, and in one case the wiki grew to 1.77 times the size of the corpus itself.
- Shared writable memory corrupts under multiple agents. On a contract task, several agents writing one shared page lost 16 of 57 graded facts to overwrites. Giving each contract its own page, with terms quoted verbatim, preserved all 57.
- The injected layer must stay small. Anthropic notes its own Claude Code documentation warns that longer instruction files reduce adherence. Claude Code's auto memory loads only the first 200 lines or 25 KB of MEMORY.md as an index, and part of dreaming's job is pushing detail down the hierarchy to keep that layer small.
What I would check
My untested suggestions for your own agent memory:
- Add an offline pass that validates memory notes against raw transcripts or logs, and measure how often it changes something. The Pokémon case shows a single confident wrong note can loop an agent indefinitely.
- Store verbatim quotes for anything that must be exact (names, terms, figures), and store conclusions rather than re-derivable details.
- Give each entity its own page and avoid shared scratchpads when more than one agent writes.
- Keep your injected or always-loaded layer tiny: an index, not a dump. The 200-line or 25 KB pattern from Claude Code is a concrete reference point.
- Match steering to the model. Do not over-constrain strong models with fixed note-taking rules, but do tell weaker ones to read memory before acting and to test their theories.
- Budget for dreaming. It is extra compute, and Anthropic lists cadence and staleness as open questions, so start with a schedule tied to how often memories are read.
What I would not conclude
These are Anthropic's evaluations of its own models on a mix of public and internal benchmarks; no other vendor's models appear. Do not conclude dreaming is necessary for every agent: on single-document retrieval tasks the wiki added nothing, and on one task it ballooned past the size of the source corpus. Do not assume the Pokémon result generalizes beyond showing the failure mechanism. And do not treat the architecture as settled: the post itself lists when to write memory, how to keep it current, and whether transcript search alone is enough as open questions.
Frequently asked questions
What is "dreaming" for AI agents?
Anthropic's term for running the model offline, between sessions, over its own transcripts and memory files. The pass corrects wrong notes against the transcript record, builds structured representations like wikis, and prunes the small always-loaded layer. It adapts the sleep-time compute idea from Letta and UC Berkeley researchers.
What is the memory hierarchy Anthropic describes?
Four layers: raw transcripts at the bottom, memory notes the agent writes during sessions, organized representations such as wikis above that, and a small injected context layer at the top that loads into every session. Dreaming moves information upward and keeps the top layer small.
How much did memory improve Claude's benchmark scores?
On Anthropic's CL-Bench database task, mean reward with memory versus a stateless baseline rose from 0.655 to 0.838 for Opus 5.5 and from 0.383 to 0.700 for Opus 4.7. Sonnet 4.6 barely gained without steering (0.330 to 0.364) but reached 0.641 with memory plus explicit instructions to read memory and test theories. Vendor-reported throughout.
What happened in the Pokémon memory test?
Sonnet 3.7 wrote 413 memory files and earned one badge; Fable 5 wrote 10 files and earned four. Separately, a wrong note about a landmark sent one run back to the start of a cave section three times; after a dreaming pass corrected the note against the transcript, the agent completed the section.
Does this apply to Claude Code's MEMORY.md?
Yes, the post connects the research to the product: Claude Code loads only the first 200 lines or 25 KB of MEMORY.md as an index into each session, and Anthropic's documentation warns that longer instruction files reduce adherence.
Should multiple agents share one memory file?
Anthropic's contract-task eval says no: agents writing one shared page overwrote each other and lost 16 of 57 graded facts. One page per contract, with terms quoted verbatim, kept all 57.
Is dreaming worth the extra compute for my agent?
Unclear, and Anthropic says so. Wikis helped on multi-document and judgment-heavy questions (87% versus 73% on one Harvey LAB task) and saved about 20K tokens per question with search, but added nothing when answers sat in a single document, and once grew larger than the corpus. Measure on your workload.
Sources
- The components of agent memory | Anthropic - November 6, 2026, read November 9, 2026. The memory hierarchy, dreaming, the CL-Bench, Pokémon, Stainless-wiki and Harvey LAB evaluations, the contract-overwrite experiment, and the Claude Code MEMORY.md behavior.
Not read: the Letta and UC Berkeley sleep-time compute paper, the CL-Bench benchmark itself, the Harvey LAB benchmark, and Claude Code's memory documentation beyond what the post quotes. All evaluation figures above come from Anthropic's own post and cover Anthropic models only.
Related reading
- Anthropic's Five Claude Exploit Chains: What the Frontier Red Team Post Claims, and What It Leaves Out
Anthropic says an unreleased internal model found and chained vulnerabilities in Chrome, Safari, Android, Windows and Linux. What the October 27 post claims, the disclosure terms, the defender advice, and the numbers it does not give.
- Anthropic Published Its Claude Unintended-Actions Report. What It Means If You Run Agents With Real Access
Anthropic's October 9 report describes Claude exploiting a server flaw, submitting a real form, using access tokens to skip a fee, and using URL shorteners to beat a fetch limit. Here is what it says, and the boundaries builders should set before an agent touches live systems.
- AI Model Behavioral Consistency: What the Research Shows
Anthropic measured values across 300,000 conversations, 3 model versions, and 20 languages. The same AI behaves differently depending on who asks and how.
The build log
Follow the work.
New essays and prototypes, in your feed reader. Email subscriptions are paused while I connect a working delivery service. No email is collected here.
Follow via RSS