RSS
News

Anthropic explains how Claude "dreams" to organize its memory

Anthropic's essay "The components of agent memory" explains how Claude writes notes between sessions and uses an offline "dreaming" pass to fix, merge and reorganize them. Here is what the tests showed and what the Dreams docs say.

The Milky Way galaxy above dark mountain silhouettes and a layer of low clouds
Photo by Chan Hoi on Unsplash

Updated November 20, 2026: Expanded with the benchmark results, how the Dreams API works, limits and cost.

Anthropic published "The components of agent memory" on November 6, 2026, an essay by Lance Martin about how Claude keeps what it learns between sessions. Its central idea is dreaming: an offline pass in which Claude rereads past transcripts and its notes, corrects mistakes, merges duplicates and reshapes what the next session starts with. Separately, Anthropic ships a Dreams feature in Claude Managed Agents, a research preview since May 19, 2026.

What Anthropic means by agent memory

The essay keeps the definition narrow: knowledge Claude gains from experience and saves as context for a later session. It excludes weight changes, learning inside one conversation, and compaction.

Read across the essay, the pieces form a rough hierarchy (our summary, not Anthropic's list): searchable transcripts at the bottom, then notes Claude writes for itself, then larger structures such as a linked wiki, and at the top a small block the harness loads into every session. Claude Code's auto memory, for example, loads only the first 200 lines or 25 KB of MEMORY.md.

What the tests showed

On a database task from Continual Learning Bench 1.0, Claude answered each question in a fresh session with only a memory folder carried over. Mean reward without and with memory: Opus 5.5 0.655 to 0.838, Sonnet 5.5 0.644 to 0.833, Opus 5 0.564 to 0.828, Opus 4.7 0.383 to 0.700, Sonnet 5 0.306 to 0.610, Sonnet 4.6 0.330 to 0.364. Opus 5, Opus 5.5 and Sonnet 5.5 saved validated rules for future questions on their own.

A Pokemon Red test looked at what to save. About 10,000 steps in, Sonnet 3.7 had 413 memory files across 225 folders and one badge; Fable 5 had nine files in two folders plus a global.md dashboard, and four badges. The lesson: store what the environment will not tell you again, such as strategy and tested rules.

Steering cut both ways. Telling Opus 5 and Opus 4.7 to record only failures erased much of their gain. Prompting Sonnet 4.6 to read its memory and test its theories nearly doubled its score; Sonnet 5 already reads its memory first 9 times out of 10 unprompted. Anthropic's advice for current models is to say what memory is for and leave the rest to Claude.

What dreaming adds

  • Correcting notes: in a Pokemon run Claude noted the wrong side of Mt. Moon for a landmark and kept dropping off a one-way ledge. Dreaming checked the note against the transcript and rewrote it; with the fix Claude went back in and reached Cerulean City. With the uncorrected note it fell back three times and never got there; a no-memory run also failed.
  • Building wikis: on about 350,000 Stainless files (around 420M tokens), 128 dreaming sessions raised wiki-only scores on 25 questions from 13% to 48%. Search plus wiki rose from 54% to 61% as the wiki grew, against 53% for search alone, saving about 20,000 tokens per question. On 24 merger questions that mostly needed several documents, the wiki scored 87% against 73% for search.
  • Focusing on a goal: on a legal brief task, agents sharing one table overwrote each other, and the brief built from that wiki included 41 of 57 contract facts (72%). With one agent per contract quoting terms word for word, the brief met 100% of the criteria.

It also reports misses: on one legal task the wiki added nothing over search, and on another it grew larger than the source files. These are small, single-task tests, so the numbers describe Anthropic's runs, not your data.

How to try dreams in Managed Agents

Dreams are a research preview on the Claude API; you must request access first. A dream is an asynchronous job: you pass an existing memory store (create an empty one if you only have transcripts) and 1 to 100 past sessions, and it writes a new, reorganized store. The input is never modified, so you can review the result and discard it. The docs show this Python call:

dream = client.beta.dreams.create(
    inputs=[
        {"type": "memory_store", "memory_store_id": store_id},
        {"type": "sessions", "session_ids": [session_a, session_b]},
    ],
    model="claude-opus-5-5",
    instructions="Focus on coding-style preferences; ignore one-off debugging notes.",
)

Poll the dream by ID until it is completed, failed or canceled, then attach the output store to future sessions. A failed or canceled dream keeps its partial output; deleting an input store or session mid-run makes it fail. The instructions field steers the overall synthesis, not line-level edits; use the Memory Stores API for targeted fixes. Dream endpoints need the dreaming-2026-04-21 beta header, memory store calls agent-memory-2026-07-22, sessions managed-agents-2026-04-01; the SDK sets them.

Limits and cost

  • Billed at standard token rates for the chosen model, with no flat price; cost scales roughly with the number and length of sessions. Anthropic suggests starting small.
  • Runs take minutes to a few hours. Default rate limits apply during the preview.
  • Models: Fable 5.2, 5.1, 5; Opus 5.5, 5, 4.8, 4.7; Sonnet 5.5, 5, 4.6. Others have limited support.
  • Not ZDR-eligible except self-hosted Managed Agents; not HIPAA-eligible at all. Transcripts persist until deleted.

Our take

The essay is useful because it shows failures next to the wins: wikis that abstract nothing, rules that hurt stronger models, injected notes that cost tokens every session. Our suggestion for long-lived agents: keep the always-loaded layer small, let the model choose what to save, and rerun a cleanup pass when notes are likely stale. Anthropic calls dreaming cadence an open question; in our view, how fast your agent's world changes is what to weigh against the token cost.

Source: The components of agent memory (Anthropic, November 6, 2026), New in Claude Managed Agents: dreaming, outcomes, and multiagent orchestration (Claude blog, May 19, 2026), Dreams (Claude Platform docs, research preview)

This story first appeared in the claudefox daily briefing for November 7, 2026.