Agent·

Anthropic on agent memory — Offline dreaming (memory consolidation) — What does it mean?

The news. On November 6, 2026, Anthropic published a post on the components of agent memory. It describes memory as a hierarchy: searchable session transcripts at the bottom, then notes Claude writes during a session and linked wikis, and at the top a small injected context loaded into every new session. It reports evaluations of memory and dreaming on Pokémon Red, the CL-Bench 1.0 database task, a corpus of about 420M tokens of internal documents, and the Harvey LAB legal benchmark. Read the post →

Picture a detective on a long case. During the day they jot quick notes in a pocket notebook while the interviews run, and every interview is also on tape. The notebook is fast, but it is written in the moment, before the detective knows which details will matter, so some lines are wrong. At night they play the tapes back, cross out the wrong lines, pin the confirmed facts to an evidence board with string between related ones, and write the two or three things to remember tomorrow on a card taped to the door. The next morning they read the card first, and go to the board or the tapes only when a question needs them.

Anthropic's design maps onto the same four places. Transcripts are the tapes: complete, and searched only when a detail is needed, the way retrieve-then-generate pulls documents at the moment of use. Memory notes are the notebook — the same move as keeping a NOTES.md file in structured note-taking. Notes are not agent state, the per-run object the loop rewrites every tick; notes survive into later sessions. Wikis are the evidence board and the injected context is the card on the door. Dreaming moves the slow, careful work offline, to a pass that sees the whole transcript instead of only the current moment.

Dreaming corrects notes against the transcript

In one Pokémon Red run, Claude wrote down that its landmark at Mt. Moon, the PokéCenter, was on the east side of the mountain. It was not. Trusting the note, Claude marked the cave as done, walked over a one-way ledge, and dropped back onto the route it had come from. In the run that kept the wrong note, this happened three times, and Claude never reached the next city. When Anthropic ran dreaming on that memory folder, Claude checked the note against the session transcript, caught the error, and rewrote it — and with the corrected note it went back into the cave and reached Cerulean City. A wrong note is context poisoning that outlives the session: every later session reads it as fact, so the fix has to happen in the store, not in the window.

Writing less, but the right things

Dreaming does not replace judgment in the moment; it works on whatever the session wrote. Anthropic compared two memory folders about 10,000 steps into Pokémon Red. Sonnet 3.7 wrote everything down — 413 memory files across 225 folders — and earned one badge; Fable 5 wrote nine files in two folders plus one top-level global.md, and earned four badges. The large folder kept going out of date, because the game state changes every turn, and the agent spent its turns maintaining memory instead of playing: over one 17-step stretch it created six files, deleted nine, and took no action in the game. Fable 5 stored only what the screen would not show it again — plans, strategies, and rules it had tested.

Promotion keeps the top layer small

The card on the door has to stay short. Injected notes use tokens in every session, a wrong injected note reaches every session, and the post cites Claude Code documentation that warns longer instruction files reduce adherence. So much of dreaming's work at the top of the hierarchy is demotion: moving details down a layer and leaving a link behind. Claude Code's auto memory follows the same rule, though Claude maintains it during the session: it loads only the first 200 lines or 25 KB of MEMORY.md, which serves as an index of what Claude knows and where to find it. It is the cost profile of an agent applied across sessions — whatever is injected is paid for again in every session that loads it.

LayerWritten whenRead howMain risk
Session transcriptsAs the session runsSearched when a detail is neededGrows with every session
Memory notesIn-session, when the agent judges something salientRead or searched by later sessionsWrong from the start, or stale as the environment changes
Wikis (representations)Built, edited, and pruned by dreamingNavigated through page linksCan grow larger than the source documents (post)
Injected contextPromoted by dreaming, or kept small in-session as in Claude CodeLoaded at the start of every sessionCosts tokens in every session; Claude Code loads only the first 200 lines or 25 KB of MEMORY.md (post)

Worked example: what the wiki adds to search

Hold the corpus and the questions fixed: about 350,000 internal files (roughly 420M tokens) from Stainless, a company Anthropic acquired, and 25 graded questions. With the search tool alone, Claude met 53% of the graded criteria. Over 128 dreaming sessions, Opus 5 agents explored the files, wrote and corrected linked wiki pages, merged duplicates, and checked claims against the sources. Answering from the wiki alone rose from 13% after 2 sessions to 48% after 128 — still below search alone. Search plus the wiki rose from 54% to 61% as the wiki grew. So the wiki added about 8 points over search alone (61% vs 53%) and saved about 20,000 tokens per question — roughly 500,000 tokens across the 25 questions (our arithmetic: 25 × 20,000).

Where a wiki pays, and where it does not

The gain depends on how answers are assembled. On 24 questions about a merger, more than half needed facts from several documents; on those items Claude met 87% of criteria from the wiki versus 73% from search alone. On a Harvey LAB task where most criteria could be met from a single document, the wiki showed no clear gain, and on another LAB task the wiki grew larger than the documents themselves — a map as big as the territory, abstracting nothing. A representation earns its upkeep when answers must be stitched together across documents. The dreaming instructions also decide what survives: when several agents wrote contract terms into one shared wiki table at the same time, they overwrote one another and a brief built from the wiki met 41 of 57 graded facts (72%); after a reflection loop rewrote the instructions to one agent per contract, quoting terms word for word, 57 of 57 were met.

The tradeoff dreaming leaves open

Writing a note in the moment captures salience at the source and makes it available on the very next turn, but it pulls attention from the task. Dreaming moves that work to the background, but its output is not available until the pass runs, and it costs compute. The post does not claim a fixed cadence; it suggests focusing dreaming on information likely to change, or tuning how often it runs by how often memories are accessed. For a detective, that means re-checking the notes about a suspect's alibi tonight, and leaving the street map for the weekend.

Goes deeper in: AI Agents → Context Engineering → The 4 Fixes

Frequently Asked Questions

Check what you knowMap your AI & GPU knowledge across every track — free, role-based