Open an agent the day after you gave it work, and yesterday's trial and error is often gone. Not because the model is dull, but because there was nowhere to leave what it learned. Anthropic's engineering post of November 6, "The components of agent memory," is a rare document that lays out how that place is designed, with numbers attached. Its central device is dreaming: while idle, the agent rereads past session transcripts to fix wrong notes, weave notes into a topic wiki, and choose what gets preloaded into the next session — an offline review pass. On the post's database task, models that used memory and models that did not split widely, but the average-reward figures carrying that gap still sit inside a figure, and the test site and the grader are both inside Anthropic — a point to read alongside the scores.
The short version
Memory in four layers — session transcripts, notes the model writes itself, representations woven from notes (a wiki), and injected context preloaded at session start (official post, checked directly)
Dreaming is offline tidying in idle time — checking notes against transcripts to fix errors, building new notes and wikis, and promoting or demoting notes into the injected layer
Every score is a company measurement and the CL-Bench rewards are figure transcriptions — the worth of adopting this is measured by the error rate in your own transcripts, not by someone else's 0.838
Anthropic's definition needs cutting first. Memory here is not weights changed by training, not context that works only inside one conversation, and not compaction, where a long conversation is swapped for a summary. Only knowledge gained from experience, left between sessions, and readable later as text counts as memory.
That memory stacks in four layers. At the bottom are session transcripts — logs of what happened, playing the role of ground truth. Above them sit notes Claude writes itself while working, and above those, representations that weave notes together by topic with links — a wiki is the representative case. At the top is the injected layer: a small context preloaded when a new session starts, without search. Claude Code's automatic memory, which loads only the first 200 lines or 25KB of MEMORY.md, is this layer's real-world shape.
Dreaming is the tidying work that moves between these layers: fixing wrong notes against transcripts (correction), finding patterns across sessions to build new notes and wikis (representation building), promoting important notes into the injected layer or demoting others (promotion and pruning), and shaping memory toward a specific goal. Its starting point, the post states directly, is sleep-time compute — the idea, proposed by Letta and UC Berkeley researchers, of using idle-time compute to reorganize existing context.
The measuring stage is the database-retrieval task of CL-Bench 1.0. Every question starts a new session, the only thing carried across sessions is the memory directory, and after answering, the correct answer is revealed. In a structure where good memory makes the next question easier, the quality of what each model left behind split. Sonnet 4.6 stopped at listing hypotheses about why it was wrong, untested; Opus 4.7 began merging notes into a single reference document and marking what was verified and what was not; Opus 5 was the first to close the learning loop, with entries carrying rules, the evidence behind them, and warnings about traps it had found.
The average rewards the figure carries read like this (figure transcription — see the caveat in Sources). Opus 5.5 rose from 0.655 without memory to 0.838 with it, Opus 4.7 from 0.383 to 0.700, and Sonnet 5 from 0.306 to 0.610. The figure says older models gained more, but the reading that fits the post's own narrative is not "memory makes weak models strong" — it is that models with the habit of verifying their own answers and leaving rules turn memory into an asset, while models without it only pile up files.
The Pokémon experiment shows the split most sharply. At about 10,000 steps, Sonnet 3.7's memory folder held 413 files across 225 folders, and it had earned 1 badge. Files made for every battle, item, and NPC went stale the moment they were written, as game state kept changing, and the agent began spending steps searching its own memory instead of playing. Fable 5, in contrast, earned 4 badges with 9 files in 2 folders plus a single top-level global.md. It did not record what the screen shows every turn — money held, current position — and kept only strategy and verified rules, the things that vanish unless the agent works them out itself. Opus 5.5 also kept a small folder, rewriting as it went, and cleared the game.
How instructions were given also split results. Saying what memory is for and leaving the method to the model worked better: fixing a rule like "record only failures" cost both Opus 5 and Opus 4.7 a large share of what memory had gained them. For older models, instruction was medicine instead. Sonnet 4.6 nearly doubled its benchmark score when prompted to read its memory files and test hypotheses before answering, while Sonnet 5 read memory on its own in 9 of 10 cases without being told, against fewer than half for Sonnet 4.6. Memory-system performance moves with instruction design, differently by model generation.
Dreaming has no separate price list. Nowhere in Anthropic's official pricing docs is there a per-unit row for dreaming, and the post itself says nothing about fees. Its price therefore has to be read in tokens. Dreaming is a model call that runs in idle time; what it reads is the session transcripts and the whole of memory, and what it writes is notes and wikis. The rates checked directly against the official pricing docs are Opus 5.5 at $4 per million input tokens and $20 per million output, and Sonnet 5.5 at $2 and $10. The longer an agent's records, the larger one review pass's input — dreaming's bill grows in proportion not to session count but to accumulated record size. Whether the Batch API's 50% discount (checked in the same docs) applies to this offline work is not settled in the official docs.
| Seat (official pricing docs, checked directly) | Rate | Relation to memory |
|---|---|---|
| Claude Opus 5.5 | Input $4 · output $20 / 1M tokens | Top CL-Bench model (figure transcription). The reference rate for dreaming's tokens |
| Claude Sonnet 5.5 | Input $2 · output $10 / 1M tokens | A similar endpoint to Opus 5.5 (figure transcription 0.833) at half the token price |
| Cache reads (Opus 5.5) | $0.20 / 1M tokens | A reference rate for gauging the cost of the injected layer being reread each session (not a claim that cache pricing applies to that layer) |
| Letta (the sleep-time compute team) | Free $0 (3 agents) · Pro $20/month (20 agents, $20 credit) | The same concept as a commercial product. Self-hosting terms not confirmed |
The saving is also given a number. Combining wiki and search saved about 20,000 tokens per question, by the company's measurement — about $0.08 a question at Opus 5.5 input rates. The injected layer, in reverse, is billed fresh every session. In a structure that loads a 200-line, 25KB index each time, one wrong note promoted into that layer damages accuracy across every session before it damages the bill. That is why Anthropic counts keeping the injected layer small among dreaming's core jobs.
Set Letta beside it as the same-tier comparison and the grammar of billing splits. Letta sells memory itself, dividing plans by agent count and storage size (Free: 3 agents, 5MiB per store; Pro: 20 agents, 50MiB, $20/month), while Anthropic treats memory as a feature of the model platform and charges only in tokens. Which is cheaper turns on whether agent count or record volume grows first — a seat where rate cards alone cannot rank the two.
The experiment closest to practice is the Stainless document study. Over roughly 350,000 internal documents — about 420M tokens — from a company Anthropic acquired, Opus 5 agents built and repaired a wiki across 128 sessions. As dreaming sessions accumulated, wiki-only answers rose from a 13% criteria pass rate to 48%, and wiki plus search rose from 54% to 61%, passing search alone at 53%. On the Harvey LAB legal benchmark, wiki-backed answers to multi-document questions reached 87% against 73% for search alone, and on a contract-terms task, a loop that reread failures and rewrote the instructions themselves lifted fact coverage from 72% to 100%.
The ownership of these cases must stay explicit. The document pile is the internal material of a company Anthropic itself acquired; Anthropic also designed and graded the experiments; and the post contains no named external customer publishing results won with dreaming. The Mt. Moon scene in Pokémon — one note placing a PokéCenter to the east when it was not, causing three falls from a one-way ledge and a give-up, until dreaming checked the note against transcripts, fixed that single line, and the agent passed through the cave to Cerulean City — is less a practice case than the most concrete picture of how this system's failure and recovery look. On the personal-assistant side, the post mentions that a helper like Claude Duet could aim dreaming at organizing memory around the person it helps.
First, who owns the test site. From CL-Bench's gains to the wiki's 13%-to-48% and the 20,000-token saving per question, every headline number in this post was measured by Anthropic on its own tasks with its own grading, and the per-model average rewards in the figure could not be settled from the text layer this round, so they are read as transcriptions. No independent body has yet re-measured the same memory folders on its own tasks.
Second, the blank in the bill. How often to dream is, by the company's own writing, an open question, and the token bill multiplies with that answer. If the whole record is reread every time, a paradox follows: the more memory accumulates, the more expensive review becomes. The post itself includes a case where a wiki grew larger than its source (1.77 times the original, by transcription) — the memory meant to tidy things adding reading instead. An adopting team should measure together: dreaming cadence, input tokens per pass, and the tokens that pass actually saved.
Third, aging and propagation. Memory stays wrong when the environment changes, and a wrong note in the injected layer is believed by every session. Dreaming is a correction device, but since dreaming itself runs on model judgment, the post does not deny that a correction can plant a new error. Including the result that wikis gained nothing on tasks a single-document search already covers, the post's conclusion sits closer to "memory is an operations target to design, repair, and sometimes discard" than to "accumulate memory."
The conclusion splits cleanly. Confirmed: Anthropic has defined memory in four layers — transcripts, notes, representations, injection — and published, in official documents and experiments, a structure where an offline pass called dreaming checks wrong notes against transcripts and builds wikis; in those experiments, company measurements show database-task average rewards rising sharply and wiki-plus-search passing search alone. Not yet confirmed: the figure's per-model tick values, any independent re-measurement, dreaming's real token bill and proper cadence, and quality on Korean-language work records. The test sits inside your own records: gather a month of your running agent's transcripts and count how many notes are wrong, and how many runs went astray believing them. Dreaming's worth is set not by someone else's 0.838 but by the error rate in your own records.
Puzz, in one line
Dreaming is not a feature for piling memory up but an operation for repairing it. The company measurements say the side that split memory into four layers and fixed wrong notes against transcripts while idle beat the side that only accumulated files — and adoption's worth is set by counting the error rate in your own records, ribbit.