Anthropic published research on Nov. 6, 2026 describing how its Claude agents keep memory between sessions and repair their own mistakes. The post, The components of agent memory by Lance Martin, details "dreaming": a background pass in which Claude rereads session transcripts to fix, reorganize and promote its memory notes. Anthropic also offers dreaming to developers as Dreams, a research preview in Claude Managed Agents. The post's main finding is that newer Claude models are better at deciding what to remember, and that a later review pass can fix notes that were wrong.
What Anthropic means by agent memory
Anthropic defines agent memory as knowledge Claude gains from experience and keeps between sessions, saved as context it can read later. The definition excludes weight changes, in-context learning and compaction. The dreaming idea draws on "sleep-time compute," proposed by researchers at Letta and UC Berkeley. Anthropic compares the process to the brain replaying experiences during sleep.
What the tests showed
The post reports results from the CL-Bench 1.0 database task, run on Claude Managed Agents. Each question starts in a fresh session with a persistent memory folder. Sonnet 4.6 got only as far as untested theories in its notes. Opus 4.7 consolidated notes into one reference document that marked checked versus unconfirmed facts. Sonnet 5 marked answers as confirmed and wrote corrections. Opus 5 was the first to close the loop, recording rules, how it knew they were true, earlier answers and warnings about traps. Opus 5.5 and Sonnet 5.5 also closed the loop and scored about the same as Opus 5 with memory.
A second test used Pokémon Red. Anthropic compared the memory folders from one run each of two models, about 10,000 steps into the game. Claude Sonnet 3.7 wrote 413 memory files across 225 folders and earned one badge. Claude Fable 5 wrote nine files in two folders plus one global.md file and earned four badges. Opus 5.5 kept a small folder and beat the game.
Steering changed the results. Telling Claude what memory is for, rather than how to use it, worked best for stronger models. A rule to record only failures made Opus 5 and Opus 4.7 lose much of the memory boost. For Sonnet 4.6, prompting it to read memory first and test its theories nearly doubled its score. Sonnet 5 read its memory before answering 9 out of 10 times on its own, while Sonnet 4.6 did so less than half the time.
Can a dreamed wiki beat search?
Anthropic also tested dreaming as a way to build a wiki over a large document set. The test used about 350,000 files, roughly 420M tokens, of internal documents from Stainless, a software company Anthropic acquired in May 2026, along with 25 questions. Over 128 dreaming sessions with Opus 5 agents, the wiki-only score grew from 13% after two sessions to 48% of graded criteria. Search combined with the wiki rose from 54% to 61%, versus 53% for search alone, and saved about 20,000 tokens per question.
On merger questions, a set of 24 questions where more than half needed several documents, Claude scored 87% on the multi-document items when it consulted the wiki, compared with 73% with search alone. The results were not uniform. On one Harvey LAB legal brief task the wiki showed no clear gain, and on another the wiki grew larger than the source documents. The mixed findings add context to a paper we covered that found agent memory often loses to plain RAG.

How dreaming fixes wrong memory notes
Memory can carry errors forward. In the Pokémon test, Claude wrote a wrong note about which side of Mt. Moon the PokéCenter was on and marked "Mt Moon DONE." It then fell off a one-way ledge. With the uncorrected note it dropped back onto the earlier route three times and never reached Cerulean City. After a dreaming pass checked the note against the transcript and rewrote it, Claude went back into the cave and reached Cerulean City.
Dreaming can also promote notes to the top layer of memory, which the agent harness loads at the start of every session. Anthropic warns that injected memory uses tokens and that a wrong note gets carried into every session, so the top layer has to stay small. Claude Code auto memory loads only the first 200 lines or 25 KB of MEMORY.md as an index. See our earlier opinion piece on why a bigger context window is not better memory.

Telling dreaming what matters
The post also reports a goal-focused dreaming experiment on a simulated acquisition, where a legal brief was graded on contract terms. In the first version several agents wrote to one shared table of contract terms, and the brief from that wiki included only 41 of 57 graded facts, or 72%. The table missed some terms because agents overwrote one another's work. Anthropic then ran a loop in which Claude reflected on its failures and rewrote the build instructions. In the new version each contract got its own page, written by one agent that quoted the terms word for word. The brief from that wiki met 57 of 57 criteria, up from 72%.
What the Dreams API does
Dreams is a research preview on Claude Managed Agents, and developers have to request access. A dream is an asynchronous job that reads an existing memory store plus 1 to 100 past session transcripts and writes a reorganized memory store. The input store is never modified, so developers can review the output and discard it. According to the documentation, Dreams is available on the Claude API for models including Opus 5.5, Sonnet 5.5, Fable 5.1, Fable 5, Opus 5, Sonnet 5, Opus 4.8, Opus 4.7 and Sonnet 4.6. The Claude Cookbook includes a Dreaming with a dynamic workflow recipe for building your own version.
Anthropic names several open questions: when to write memory, since doing it in the moment distracts from the task; the compute cost of dreaming; and how often to dream. It also says an assistant like Claude Duet often benefits from memory organized around the person it helps, and that dreaming can be tuned toward that kind of goal.
Sources
- The components of agent memory, Anthropic, Nov. 6, 2026
- Dreams, Claude Platform docs
- Dreaming with a dynamic workflow, Claude Cookbook
- Claude Managed Agents overview, Claude Platform docs
