Claude dreaming is Anthropic's name for an offline pass in which Claude rereads past session transcripts and its own memory notes, then fixes what was wrong, merges duplicates and builds a cleaner memory for future sessions. Anthropic described it in a November 6, 2026 engineering post, and developers can run it today as Dreams, a research preview in Claude Managed Agents that writes a new memory store and never edits the original. It does not change model weights. If you are not on Managed Agents, you can build the same loop yourself or use Letta's dreaming subagents.

What Claude dreaming means

In The components of agent memory, Anthropic splits agent memory into two jobs. During a session, Claude writes notes about what seems important. Later, when no user is waiting, a separate pass reviews the logs with hindsight. That second pass is the dream. Anthropic credits the idea to sleep time compute, proposed by researchers at Letta and UC Berkeley in an April 2025 paper on using idle time between interactions to reorganize context.

The post is careful about scope. By "agent memory" it means knowledge Claude gains from experience and keeps between sessions as context it can read later. It explicitly excludes weight changes, learning inside one conversation, and compaction (the summaries that replace older turns so a long session can continue). So dreaming is file and store housekeeping, not training.

According to the post, a dream can do five things:

  • Correct notes. Check a saved fact against the original transcript and rewrite it if it was wrong.
  • Build representations. Turn scattered notes into a linked wiki that is easier to search.
  • Promote notes. Move a few important notes to the top layer that the harness loads into every new session.
  • Focus memory on a goal. Follow instructions about what matters, such as contract terms or a person's preferences.
  • Fill gaps. Look across many sessions for repeated patterns or broken links that no single session could see.

What Anthropic's own tests showed

These are the vendor's numbers on its own tasks, not independent benchmarks, but they show where dreaming helps and where it does not.

TestResult reported by Anthropic
Pokémon Red, about 10,000 stepsSonnet 3.7 wrote 413 memory files in 225 folders and earned one badge; Fable 5 kept nine files in two folders plus global.md and earned four
Wiki built by dreaming over about 350,000 internal filesScore on 25 questions rose from 13% to 48% of graded criteria as dreaming scaled from 2 to 128 sessions
Same corpus, search plus wiki54% rising to 61% as the wiki grew, versus 53% with search alone, and about 20,000 fewer tokens per question
24 merger questions87% with the wiki versus 73% with search alone
Contract facts in a legal brief41 of 57 facts survived with a shared table; 57 of 57 after Claude rewrote its own wiki instructions

The post also reports two failures worth remembering. On one legal task most answers sat in a single document, and the wiki gave no clear gain over plain search. On another, the wiki grew larger than the source documents, which means it abstracted nothing. Dreaming is not free improvement: it pays off when answers span many files or sessions.

One more finding matters for anyone writing memory prompts. Telling strong models to "record only failures" cut much of their gain from memory, while simply saying a memory folder exists worked better. Older models such as Sonnet 4.6 benefited from explicit steering to read memory first.

How Managed Agents Dreams work

The hosted version is documented on the Dreams page. A dream is an asynchronous job with two inputs: an existing memory store, and 1 to 100 past sessions. It produces a separate output memory store with duplicates merged, stale or contradicted entries replaced by the latest value, and new insights added. The input store is never modified, so you can review the result and discard it. If you only have transcripts, create an empty store first and pass that.

import anthropic

client = anthropic.Anthropic()
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.",
)
print(dream.id, dream.status)  # drm_..., pending

The optional instructions field steers the whole synthesis (what to keep, merge or drop). Anthropic notes that line level edits such as "change sentence X" usually do nothing; use the Memory Stores API on the output store for targeted fixes.

A dream moves through pending, running, then completed, failed or canceled. Anthropic says runs take minutes to a few hours depending on how many transcripts you pass. While it runs, session_id points at the underlying session, so you can stream its events and watch what it reads and writes. On failure or cancel, the output store keeps whatever was written so far. Deleting an input store or session mid run makes the dream fail with input_memory_store_unavailable or input_session_unavailable.

Practical limits from the docs:

  • Access. Research preview with an access request. Dream endpoints need the dreaming-2026-04-21 beta header; the managed-agents-2026-04-01 header alone does not grant access.
  • Models. Claude Fable 5.1, Fable 5, Opus 5.5, Opus 5, Sonnet 5.5, Sonnet 5, Opus 4.8, Opus 4.7 and Sonnet 4.6, on the Claude API only.
  • Cost. Standard API token rates for the model you choose, reported in the dream's usage field. Cost grows roughly linearly with the number and length of sessions, so start small.
  • Data handling. Not eligible for zero data retention or HIPAA, like the rest of Managed Agents.

For the wider service (sessions, sandboxes, pricing), see our Claude Managed Agents guide.

What we tested on our own machine

We do not have preview access, so we checked the developer surface instead. The anthropic Python SDK 2.6.0 exposes client.beta.dreams alongside memory_stores, sessions and agents. Against a local mock server, create, retrieve and cancel hit the documented paths and returned typed BetaDream objects. The SDK sent only dreaming-2026-04-21 in the beta header on dream calls, which matches the docs' note that the SDK sets the right header per call (the curl examples list both headers). A request to the live endpoint with a fake key returned 401, not 404. We did not run a real dream, so we cannot report quality or real run times.

Dreams versus other ways to get the same result

OptionWho runs itEdits in place?Good fit
Managed Agents DreamsAnthropic, async API jobNo, writes a new storeTeams already on Managed Agents who want a reviewable cleanup
Cookbook dynamic workflowYou, with Managed Agents workflowsYes, updates your storeCustom prompts, models and schedules, such as a nightly cron
Letta dreamingLetta background subagentsYes, commits to MemFSOpen source route not tied to one model provider
Claude Code auto memoryClaude, during the sessionYes, local filesCoding work on one machine, no extra job

Anthropic's dreaming cookbook, published November 2, builds a dream yourself: export finished sessions as transcript files, let a lead agent start a workflow that hands each transcript to an analyzer, then an organizer tidies a wiki style store with an _index.md. Future sessions mount that store read only.

Letta documents its own version on its memory and dreaming page: background subagents review recent conversations and update memory, configured with /sleeptime in the CLI or Dream settings in the app, triggered after a set number of steps or when the context is compacted. For extraction style memory instead of reflection, Mem0 is the usual pick; our Mem0 vs Letta vs Zep comparison covers the tradeoffs. Hermes Agent takes a lighter route: a background review after each turn may save memory entries, and you can add one external store beside them, as our Hermes Agent memory provider guide explains.

Claude Code does not run a dream job. Its auto memory keeps a MEMORY.md index and loads only the first 200 lines or 25KB at session start, which is the same "small top layer" idea Anthropic describes, maintained by Claude as it works. We found no dreaming entry in the Claude Code changelog as of November 7. Our explainer on agent memory in Claude Code shows where those files live.

When dreaming is worth it

Use a dream when an agent runs many sessions on the same domain and its notes drift: support agents, research agents, long running coding projects, or anything where answers combine facts from several documents. Skip it, or run it rarely, when tasks are one shot, when answers live in single documents that search already finds, or when transcripts contain data you cannot keep on a server.

Three risks to plan for:

  1. Wrong notes get promoted. Anything moved to the top layer loads into every session, so one bad note spreads. Review the output store before you attach it.
  2. Memory grows instead of shrinking. Anthropic's own wiki outgrew its source files once. Check store size after each run.
  3. Cost scales with transcripts. Start with a handful of sessions and measure usage before scheduling nightly runs.

If you are designing the loop yourself, the agent harness is where this lives: the harness decides which notes load at start, and the dream decides what those notes say.

FAQ

Is Claude dreaming available to everyone?

No. Dreams in Claude Managed Agents are a research preview that needs an access request, and they run on the Claude API only for a listed set of models. Anyone can build the same pattern with Anthropic's cookbook workflow or with Letta.

Does Claude dream in the Claude app or Claude Code?

Anthropic has not announced a dream feature for Claude Code, and we found no dreaming entry in its changelog as of November 7, 2026. Claude Code keeps its own auto memory files during sessions, which follow the same idea of a small index loaded at start.

How much does a Claude dream cost?

There is no separate fee listed. Anthropic bills dreams at standard API token rates for the model you choose, and the dream's usage field reports the exact token totals. Cost grows roughly with the number and length of input sessions.

Does dreaming retrain the model?

No. Anthropic's definition of agent memory excludes changes to model weights. A dream reads transcripts and rewrites memory notes or a memory store that later sessions load as context.

Will a dream overwrite my existing memory?

Not in Managed Agents. The input memory store is never modified; the dream writes a separate output store that you can attach to new sessions or delete. The cookbook workflow and Letta, by contrast, update memory in place.

What is sleep time compute?

It is the idea, from a 2025 paper by researchers at Letta and UC Berkeley, that a model can use idle time between user interactions to reorganize context ahead of future questions. Anthropic cites it as the basis for dreaming.