AI-FirstAI-First
Back to blog
Technical article
March 30, 2026
7 min read

AutoDream: Claude Code Can Now 'Sleep' and Consolidate Its Memory Between Sessions

Claude Code just launched AutoDream: a persistent memory system that cleans and reorganizes itself in the background, like a human brain during sleep. Here's how it works and why it matters.

Vincent

Vincent

AI expert, AI-First

AutoDream lets Claude Code consolidate its memory between sessions like a sleeping brain. How it works, how to activate it, its limits, and best practices.

Claude Code just launched AutoDream. It's probably the most underrated update in recent months. No flashy interface, no spectacular demo, just a feature that runs in the background while you sleep, fundamentally changing how Claude Code handles memory between your sessions.

  • 🔑 AutoDream is a persistent memory system that consolidates, cleans, and reorganizes Claude Code's .md files between sessions.
  • 🎯 Three layers exist: normal sessions with no context, auto-memory that captures key information, and AutoDream that periodically defragments everything.
  • 💡 Activation is as simple as typing 'run a Dream now', with duration ranging from a few seconds to 8-10 minutes depending on the project.
  • 🚀 AutoDream never touches your code, only Markdown memory files, guaranteeing zero risk to your project.
  • ⚠️ Experimental mode: compaction may delete content you consider important. Do not automate without manual oversight.

If you use Claude Code seriously, here's why this changes everything.

The Problem AutoDream Solves

Without AutoDream, Claude Code's memory behaved like a hard drive that never gets defragmented. The .md files grew unchecked, the so-called 'blob' problem. Claude had to sift through more and more information, often redundant or outdated, just to find what was relevant.

The result: increasingly slow sessions, declining accuracy, and a token bill that ballooned needlessly. Every new session started with a polluted context.

Without AutoDream, a Claude Code project's memory can grind to a halt from sheer disorder, much like a human brain that suppresses difficult memories to protect itself.

The Three Layers of Claude Code Memory

Understanding AutoDream requires understanding the full memory architecture in Claude Code. There are three levels:

Layer

Description

Availability

Normal session

Zero context between sessions. Starts from scratch every time you open it.

Always

Auto-memory

Claude captures key decisions and patterns in .md files in the background.

Available

AutoDream

Periodic process that cleans, compacts, and reorganizes all memory.

Experimental

Auto-memory has been around for a while; many people use it without even knowing. AutoDream is the layer on top that gives the whole system a cleanup intelligence.

How AutoDream Actually Works

When AutoDream triggers (manually or automatically), it runs a background sub-agent that follows five precise steps.

It starts by reviewing all recent sessions, 10, 15, sometimes 300 sessions depending on the project's age. Then it reads the existing memory files to get the full context. It synthesizes what was learned into durable, organized memories. It eliminates duplicates and outdated information. Finally, it updates the .md files, and only those files, never your code.

AutoDream never touches your project's code. It operates exclusively on Markdown memory files.

Execution time ranges from a few seconds on a lightweight project to 8-10 minutes on a heavy one. The four possible states: Dreaming (in progress), Last Run (timestamp of the last execution), Never Run (never activated), and Idle (waiting).

How to Activate It

The simplest way: talk directly to Claude Code in your open session.

Type: 'Run a Dream with AutoDream now'. Claude launches the process immediately and reports back what it consolidated. You can also use the `/memory` slash command from the VSCode extension, then enable AutoDream in the Memory panel.

For automation: ask Claude to schedule a daily AutoDream, or configure it to trigger after a certain number of accumulated sessions.

The Real Limits You Should Know

AutoDream is in experimental mode. Anthropic hasn't made an official announcement, and the feature could change or disappear without notice. The rollout is gradual; some accounts don't have it yet, but most do by now.

The main risk: automatic compaction can delete content you considered important. AutoDream cuts aggressively to lighten the memory (that's its purpose), but it can misjudge what's essential.

Automatic scheduling is also finicky: triggers can fire early or late relative to your configuration. It's not a dealbreaker, but regularity is not guaranteed.

When to Use It

My recommendation: don't automate it yet. Run it manually at the end of a long session, when you feel a lot of context has been generated. Simply say 'run a Dream now', and Claude will execute the process and tell you what it consolidated.

Over time, you'll notice your sessions starting faster, with cleaner context and more precise answers. It's measurable.

AutoDream points to something bigger: a Claude Code that continuously learns and improves on your projects, without manual intervention. We're not there yet, but the direction is clear.

Take action with AI-First

Transform your business with AI. Audit, implementation and follow-up by certified experts.

Request an audit →

More articles