Anthropic has explained how it gives Claude a memory that lasts between sessions — and the centrepiece is a process the company calls "dreaming." In an engineering post published on November 6, "The components of agent memory," Anthropic describes how Claude uses idle time between sessions to reread its own logs, correct notes that turned out to be wrong, and build linked wiki pages it can draw on later.

The idea borrows from sleep-time compute, a concept proposed by researchers at Letta and UC Berkeley: models use the quiet periods between interactions to reorganise what they already know, much as the human brain consolidates memories during sleep. Anthropic stresses that dreaming changes no model weights — memory here means experience-derived context, stored as files Claude can read in later sessions.

Four layers of memory

Anthropic breaks agent memory into four layers. At the bottom sit transcripts — the raw record of conversations and activity. Above them are memory notes, short lessons, rules and plans Claude writes for itself. Then come memory representations, organised structures such as linked wiki pages. At the top is injected context: a small memory layer preloaded into every new session, with deeper material retrieved only when needed.

Dreaming runs between all four layers. Between sessions, Claude reviews its transcripts, checks its notes against what actually happened, fixes errors, writes new notes and decides which few facts deserve to be loaded every time. A Dreams API runs the process as an asynchronous job, consuming between one and 100 session transcripts and producing refined outputs without altering the original data.

One design rule stood out in Anthropic's testing: tell Claude what memory is for, but not how to use it. When the company told strong models to record only their failures, the models got weaker — over-constraining the process backfired.

What dreaming changed in the tests

The results come from Anthropic's own evaluations, and the company is candid that several are single runs. On a database task from the Continual Learning Bench, Opus 5.5 improved from 0.655 to 0.838 when it could draw on persistent memory. A wiki built over 128 dreaming sessions from roughly 350,000 internal documents lifted scores on 25 company questions from 13% to 48% of graded criteria; search combined with the wiki reached 61%, against 53% for search alone.

The most vivid example came from a Pokémon playthrough. Sonnet 3.7 wrote 413 memory files across 225 folders — and logged the wrong side of the map for a PokéCenter near Mt. Moon, walking off a one-way ledge and into a loop. Dreaming caught the error by checking the note against the session transcript and rewrote it; the corrected run reached Cerulean City, while the uncorrected one never got past the mountain.

A design write-up, not a product launch

Anthropic is careful about what this is not. The post describes research setups on Managed Agents and Claude Code's auto memory — it does not announce dreaming as a general product feature. Claude Code already limits the memory index it loads automatically to the first 200 lines or 25 KB of a MEMORY.md file, whichever comes first.

Still, the post amounts to Anthropic's working theory of how AI agents should remember: not by cramming everything into context, but by letting the model sleep on its own notes — and wake up with better ones.

By Hamza Faisal