ERA OF MINDS

How to use Claude dreaming: auto-dream in Claude Code vs the API preview

Short answer

There are two ways to use Claude dreaming today. If you use Claude Code, type /memory and turn on the Auto-dream row (the setting is autoDreamEnabled). It runs in the background, by default after at least 24 hours and 5 sessions. If you build on the Claude API, dreaming is a Managed Agents research preview: request access, then call POST /v1/dreams with a memory store and 1 to 100 past sessions, billed at normal API token rates. The viral "13% to 48%" number comes from a 128-session wiki test, not from a toggle you flip.

Era of Minds cover: How to use Claude dreaming. A retyped copy of the @AnthropicAI post (720K views on X) above a table of what we checked: Claude Code has an Auto-dream setting (autoDreamEnabled); default trigger is 24 hours and 5 sessions; Managed Agents Dreams API is a research preview with access by request; dreams read 1 to 100 sessions; billed at API token rates; wiki test went from 13% to 48% over 128 sessions.
Figure: the @AnthropicAI post retyped by us (not a screenshot), with what we checked in Anthropic's docs and the Claude Code 2.1.319 package, November 7, 2026.

What did Anthropic post about Claude dreaming?

On November 6, 2026 at 21:16 UTC (01:16 Dubai on November 7), @AnthropicAI posted: "Memory is what allows Claude to learn from experience. In a new Engineering Blog post, we share how 'dreaming' helps Claude organize what it's learned, correct its mistakes, and find what it needs more easily the next time." When we pulled it through the X API on November 7 around 10:20 Dubai, it had 719,894 impressions, 7,636 likes, 6,201 bookmarks, 624 reposts, 555 replies and 401 quotes. That bookmark count is the tell: people saved it to try later.

Posts mentioning Claude or Anthropic dreaming jumped from 21 on November 5 to 442 on November 6, and 683 more by 06:21 UTC on November 7. The linked post, The components of agent memory, is by Lance Martin. It is a research write-up with test results. The obvious next question is the one this page answers: can I use it, and where?

What is Claude dreaming, in plain terms?

Claude writes memory notes while it works. Those notes are guesses about what a future session will need, and some are wrong or go stale. Dreaming is a later pass where Claude rereads the original session transcripts next to its notes and cleans up. Anthropic lists five jobs it does:

  • Correct notes that were wrong from the start or drifted.
  • Build new representations, such as a wiki of linked pages.
  • Promote a few notes to the top layer that loads into every new session.
  • Focus memory on a goal you set (for example, contract terms in a legal brief).
  • Fill gaps a single session left, like links to pages that were never written.

Anthropic is clear about what this is not. Agent memory, in their definition, excludes changes to model weights, in-context learning, and compaction. Dreaming edits notes. It does not retrain Claude.

How do you turn on auto-dream in Claude Code?

This is the version most people can try today, and it costs nothing extra to switch on. Anthropic's memory docs do not describe it yet, so we checked the Claude Code package itself: version 2.1.319, the current release on npm on November 7, 2026. Here is what is in it:

  • The setting: autoDreamEnabled, described as "Enable background memory consolidation (auto-dream). When set, overrides the server-side default." So Anthropic can switch it on or off for you remotely, and your setting wins.
  • The toggle: the /memory dialog has an Auto-dream row that shows whether it is running, never ran, or when it last ran. It cannot be toggled while auto memory is off.
  • When it runs: the built-in defaults are 24 hours and 5 sessions since the last consolidation, and both can be changed from the server. With too few sessions it skips and logs that it needs 5.
  • Safety: it takes a lock so two sessions do not consolidate the same files, and it rolls the files back if you abort a run.

To try it:

  1. Update Claude Code (claude update, or reinstall the npm package).
  2. Run /memory. Make sure auto memory is on, then switch Auto-dream on.
  3. Or add "autoDreamEnabled": true to ~/.claude/settings.json.
  4. Keep working. After a day and five sessions in that project, check /memory for "last ran".

Why it matters: Claude Code's memory docs say only the first 200 lines or 25KB of MEMORY.md, whichever comes first, load at the start of a session. Anything past that is dropped. Auto-dream is the cleanup that keeps the useful part inside that window. If you already track token use in Claude Code, our Headroom test covers the context side of the same problem.

How do you use dreaming on the Claude API?

The API version lives in Claude Managed Agents. The Dreams docs mark it as a research preview, so you need to request access first. Once you have it:

  • Inputs: one existing memory store plus 1 to 100 sessions. If you only have transcripts, create an empty store and pass that.
  • Call: POST /v1/dreams with the beta headers managed-agents-2026-04-01 and dreaming-2026-04-21. The managed-agents header alone does not unlock dreams.
  • Models: the docs list 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.
  • Steering: an optional instructions field, for example "Focus on coding-style preferences; ignore one-off debugging notes." It guides the whole pass. Line-level edits like "change sentence X" generally do nothing.
  • Time: minutes to a few hours, mostly driven by how many transcripts you pass.
  • Output: a new memory store. Your input store is never modified, so you can review the result, attach it to the next session, or delete it.
  • Cost: standard API token rates for the model you choose, roughly linear with the number and length of sessions. The docs suggest starting with a small batch.
  • Data: dreams are not eligible for zero data retention. Transcripts persist until you delete them.

If you want full control without waiting for access, Anthropic's Dreaming with a dynamic workflow cookbook shows how to build your own dream: analyzer agents distill each transcript into linked memory files, an organizer tidies the store, and the next session mounts it read-only. It can run every night from cron.

What did Anthropic's dreaming tests actually show?

These are the numbers people are quoting, with the setup that produced them:

TestSetupResult
Company wiki, 25 questionsOpus 5 agents built a wiki over ~350,000 Stainless files (~420M tokens), 2 vs 128 dreaming sessions, wiki only13% to 48% of graded criteria
Same corpusSearch tool alone53%
Same corpusSearch plus the growing wiki54% to 61%, about 20,000 fewer tokens per question
Merger, 24 questionsWiki vs search alone (multi-document items)87% vs 73%
Contract briefSeveral agents writing one shared table vs one page per contract, terms quoted word for word41 of 57 facts (72%) vs 100% of criteria
Pokémon Red, ~10,000 stepsSonnet 3.7 vs Fable 5 memory folders413 files in 225 folders, 1 badge vs 9 files plus global.md, 4 badges

Two caveats Anthropic gives itself. The wiki alone (48%) never beat plain search (53%); the win came from using both. And on one legal task the wiki grew larger than the documents it summarized, which helped nothing. The Pokémon story is the most fun: Claude wrote that the PokéCenter sat on the wrong side of Mt. Moon, kept falling off the same ledge, and wrote "I'm going to stop rather than keep looping." After a dream checked the note against the transcript and fixed it, Claude went back into the cave and reached Cerulean City.

What should you tell Claude to remember?

This is the part we would copy into any agent setup today, dreaming or not:

  • Say what memory is for, not how to use it. When Anthropic gave Opus 5 and Opus 4.7 the rule "record only failures," both lost much of the gain memory gave them.
  • Older models need more steering. Prompting Sonnet 4.6 to read its memory before answering and to test its theories nearly doubled its CL-Bench score. Sonnet 5 read memory first 9 times out of 10 without being told.
  • Do not store what the agent can see. Fable 5 skipped facts readable on screen and kept plans, strategy and tested rules. That is why 9 files beat 413.
  • Keep the always-loaded layer small. Longer instruction files reduce adherence, which is why MEMORY.md is capped at 200 lines.

More Claude Code add-ons we have checked: Ponytail and Anatomy. For a third-party take on memory for coding agents, see Beacon.

Who should bother with dreaming right now?

If you use Claude Code daily in the same repos, switch auto-dream on and look at MEMORY.md after a week. It costs one toggle. If you run long-lived agents on the API with memory stores, request preview access and test one dream on 5 to 10 sessions before scaling, because cost scales with transcripts. If you only chat in the Claude app, nothing here applies to you yet: Anthropic's post mentions Claude Duet as an assistant that benefits from person-focused memory, but it does not say dreaming is on for app users.

FAQ: how to use Claude dreaming

How do I use Claude dreaming?

There are two ways. In Claude Code, open /memory and switch on the Auto-dream row (or set "autoDreamEnabled": true in your settings); it needs auto memory on and runs in the background after enough sessions. On the Claude API, dreaming is a Managed Agents feature in research preview: request access, then call POST /v1/dreams with the managed-agents-2026-04-01 and dreaming-2026-04-21 beta headers, a memory store and 1 to 100 past sessions.

Is Claude dreaming free?

Not as a separate free product. The Managed Agents Dreams API is billed at standard API token rates for the model you pick, and cost grows roughly with the number and length of sessions you feed it. Claude Code's auto-dream has no separate price or waitlist, but it is a background Claude task on your own account, so expect it to use your normal Claude Code usage.

What is Claude dreaming?

Dreaming is Anthropic's name for a background pass where Claude rereads past session transcripts and its memory notes, then fixes wrong notes, merges duplicates, builds new structures such as a linked wiki, and decides what should load at the start of the next session. Anthropic explains it in The components of agent memory, published November 6, 2026 and written by Lance Martin.

When does auto-dream run in Claude Code?

Not after every session. In the Claude Code 2.1.319 build we checked, the defaults are at least 24 hours and 5 sessions since the last consolidation, and the server can change those numbers. If there are too few sessions it skips with a log line like '[autoDream] skip, 2 sessions since last consolidation, need 5'. It takes a lock so two sessions do not consolidate at once, and it rolls files back if you abort it.

What did the 13% to 48% result measure?

Anthropic had Opus 5 agents build a wiki over about 350,000 Stainless documents (roughly 420M tokens) across 128 dreaming sessions. On 25 questions, answering from the wiki alone rose from 13% of graded criteria after 2 sessions to 48% after 128. Search alone scored 53%, and search plus the wiki rose from 54% to 61% while using about 20,000 fewer tokens per question.

Does dreaming change Claude's model weights?

No. Anthropic defines agent memory as knowledge saved as context Claude can read later, and it explicitly excludes changes to model weights, in-context learning and compaction. Dreaming rewrites memory files or memory stores, not the model.

Can a dream break my existing memory?

On the API, no: a dream never modifies its inputs and writes a new output memory store you can review, attach or delete. If you delete an input store or session mid-run, the dream fails. In Claude Code, auto-dream edits your local memory files directly but restores them if the run is aborted.

What is the best way to tell Claude what to remember?

Anthropic found it helps to tell Claude what memory is for, but not how to use it. When Opus 5 and Opus 4.7 were given the rule 'record only failures', they lost much of the gain memory gave them. Older models were different: prompting Sonnet 4.6 to read memory first and test its theories nearly doubled its CL-Bench score.

Sources

FREE WEEKLY AI BRIEF

Free. Unsubscribe anytime. Free gift: 50 AI prompts that actually work, sent the moment you join. More about Decoded