Anthropic's 6 November 2026 research post explains how Claude agents build, prune and correct memory across sessions through a process it calls dreaming.
Anthropic published a technical breakdown of how Claude agents build, prune and correct memory across sessions on 6 November 2026. The post, The components of agent memory, describes dreaming: an offline pass that rereads an agent's session transcripts and memory notes, then writes a cleaned-up memory store. It backs the claims with benchmark numbers from a database quiz, a Pokemon Red playthrough and two legal-document tasks.
Dreaming is Anthropic's term for an offline process where Claude rereads past session transcripts and existing memory notes, then writes a cleaned-up memory store: duplicates merged, stale entries corrected against the transcript, and new structures such as wikis built from what it finds. The agent's live session never runs this step; it only reads the result later.
Anthropic describes agent memory as four layers: transcripts (a searchable event log), memory notes (salient observations Claude writes as it works), memory representations such as wikis (notes linked into a navigable map), and injected context (loaded automatically into every new session). Dreaming moves information between these layers.
On a database quiz from Continual Learning Bench (CL-Bench) 1.0, mean reward with memory versus without rose for every model Anthropic tested: Claude Opus 5.5 from 0.655 to 0.838, Sonnet 5.5 from 0.644 to 0.833, Opus 5 from 0.564 to 0.828, Opus 4.7 from 0.383 to 0.700, Sonnet 5 from 0.306 to 0.610, and Sonnet 4.6 from 0.330 to 0.364. Sonnet 5 read its own memory files before answering 9 of 10 times without being told to; Sonnet 4.6 did so less than half the time.
Anthropic also used a Pokemon Red playthrough as a test of what Claude chooses to remember. By step 10,000, Claude Sonnet 3.7 had written 413 memory files across 225 folders and earned one badge. Claude Fable 5 wrote nine files in two folders plus a single dashboard file, and earned four badges, because it skipped logging facts the game screen already showed.
Giving a model a fixed rule about what to remember backfired. When Anthropic told Opus 5 and Opus 4.7 to "record only failures," their memory-driven score gains dropped by 0.234 and 0.150. Anthropic's stronger models did better when left to judge salience themselves.
Dreaming also built a wiki from an internal document corpus of about 350,000 files and roughly 420 million tokens, from Stainless, the software company Anthropic acquired in May 2026. Scaling dreaming from 2 to 128 sessions raised Claude's score on a 25-question eval from 13% to 48% using the wiki alone, and from 54% to 61% when paired with a search tool; search alone stayed flat at 53%. Using both together cut about 20,000 tokens per question.
On a Harvey LAB benchmark task with 24 questions about a merger, most of which needed combining facts from several documents or doing math, a wiki-backed answer scored 87% against 73% for file search alone on those items. On a separate LAB task where every answer sat in a single document, the wiki gave no advantage.
Instructions decided what the wiki kept. When several agents wrote to one shared contract-terms page, they overwrote each other's entries and only 41 of 57 graded facts survived (72%). When each contract got its own page, quoted word for word by a single agent, all 57 survived (100%).
Context injection stays deliberately small. Claude Code's own auto memory loads only the first 200 lines or 25 KB of its MEMORY.md file into a session, treating that file as an index rather than loading everything Claude knows.
The Dreams feature itself is a research preview on the Claude API, gated behind the managed-agents-2026-04-01 and dreaming-2026-04-21 beta headers, and it is not eligible for zero data retention or HIPAA workloads.
Writing memory in the moment, during a live session, has a cost: it pulls attention away from the task, and a note can go stale before anything reads it again. That is what cost Claude Code Sonnet 3.7 badges in the Pokemon test: it logged everything it saw and still fell behind. Anthropic's numbers point to a different fix: run a second, offline pass that checks notes against the original transcript before trusting them in a future session.
That offline pass is also where a security tradeoff shows up. Anthropic's Memory Stores documentation warns that a store attached with read_write access to an agent that processes untrusted input, a user prompt, fetched web content, or third-party tool output, can have malicious content written into it by a successful prompt injection. A later session then reads that content as trusted memory. Anthropic recommends read_only access for agents handling untrusted input. Each memory in a store is capped at 100 KB, about 25,000 tokens, and a store holds at most 10,000 memories.
Builders outside Anthropic's own harness cannot call Dreams directly yet, since it is still a research preview, but the pattern itself does not require Anthropic's infrastructure: the post links to a cookbook recipe for building an equivalent dreaming loop with any model and prompts a developer chooses.
Not every wiki Anthropic built was an improvement. On one LAB benchmark task, a wiki grew to 203 KB and 68 pages from a 115 KB, 10-document corpus, 1.77 times the size of the material it was meant to summarize. That is the failure mode Anthropic is watching: a memory system that transcribes instead of abstracting. Dreams also remains a research preview with no ZDR or HIPAA path, so regulated teams have no supported way to adopt it as shipped.
Dreaming is an offline job that rereads an agent's past session transcripts alongside its existing memory notes, then produces a new, reorganized memory store with duplicates merged and stale entries corrected against the transcript. Anthropic described it in a research post published 6 November 2026.
Dreams is a research preview feature of Claude's Managed Agents platform, gated behind the managed-agents-2026-04-01 and dreaming-2026-04-21 beta headers, and it is not eligible for zero data retention or HIPAA workloads. Anthropic's cookbook separately shows how to build an equivalent dreaming loop with any model and custom prompts.
Each individual memory in a Claude memory store is capped at 100 KB, roughly 25,000 tokens, and a single store holds at most 10,000 memories, according to Anthropic's Memory Stores documentation.
Source: Anthropic Discussion: Hacker News
Teams comparing agents built to retain context across sessions can browse what is live today in the AI Agents directory on AI Agents Listing.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.
Goldman Sachs limited Claude Code and GitHub Copilot to its roughly 12,000 engineers in October 2026, cutting off traders and bankers, Bloomberg reports.
Perplexity launched Teammates on 6 November 2026, agents built on its Computer platform that own ongoing work like sales follow-ups, not single tasks.
Runlayer's free interactive guide, MCP Explained, walks through every JSON-RPC message in the Model Context Protocol, including the 2026-07-28 spec.