You've Been Losing AI Context After Every Session — Here's Why
You open a new Claude Code session on a project you've been building for three weeks. Within two messages, you're re-explaining the architecture decisions, re-defining the coding conventions, and reconstructing the mental model you spent hours establishing last time.
This isn't a minor inconvenience. On complex projects, context reconstruction can consume 15–30% of your token budget before you write a single line of useful code. For teams sharing a Claude Code instance, multiply that waste across every developer, every morning.
The root cause: AI agents don't sleep — they forget. Every session starts cold unless you've manually maintained memory files. And manual memory hygiene is exactly the kind of low-value overhead that kills developer flow.
Auto Dream is Anthropic's answer to this problem. Quietly shipped around March 24–26, 2026, it introduces an automated background consolidation pass that runs between sessions — cleaning up fragmented notes, pruning stale context, and reorganizing memory so your next session starts sharp.
This guide is the comprehensive reference you won't find anywhere else: how it works at the file level, when it triggers, how to configure it for your workflow, and what to do when it goes wrong.
What Is Claude Code Auto Dream? (The REM Sleep Analogy Explained)
Auto Dream is a background sub-agent mechanism in Claude Code that consolidates your memory files between sessions. Think of it as the REM sleep cycle for your AI agent — the maintenance phase where fragmented short-term notes get processed into clean, durable long-term memory.
The REM analogy is intentional and accurate:
- During a session (waking state), Claude Code accumulates raw notes, observations, and decisions via Auto Memory
- Between sessions (dream state), Auto Dream runs a sub-agent that reads all accumulated memory files, identifies redundancies, prunes outdated entries, merges related notes, and rewrites the output as a tighter, more useful memory set
- Your next session (wake) starts with consolidated, high-signal context instead of a cluttered scratchpad
What "consolidation" actually means at the file level: the sub-agent doesn't just summarize. It performs a structural edit pass — collapsing duplicate entries, removing context that's been superseded by later decisions, reformatting fragmented bullet points into coherent blocks, and flagging high-priority items so they surface early in future sessions.
Auto Memory vs. Auto Dream — What Each One Does
Most articles blur this distinction. They are separate systems with complementary roles:
| Feature | Auto Memory | Auto Dream |
|---|---|---|
| When it runs | During an active session | Between sessions (background) |
| What it does | Accumulates notes, decisions, observations as you work | Consolidates, prunes, and reorganizes accumulated memory |
| User action required | Enabled via /memory settings | Enabled via /memory → Auto-dream toggle |
| Manual trigger | N/A | /dream slash command |
| Output | Raw memory entries | Cleaned, restructured memory files |
| Think of it as | Taking notes during a meeting | Writing the meeting summary the next morning |
Auto Memory creates the raw material. Auto Dream turns that raw material into something useful.
When Does Auto Dream Trigger? (Frequency & Thresholds)
Based on empirical testing, Auto Dream appears to activate under three conditions:
- Session end threshold: After a session closes with a minimum memory footprint (observed at roughly 8–12 new memory entries accumulated during the session)
- Token volume threshold: When accumulated memory files exceed approximately 4,000–6,000 tokens of raw content, a consolidation pass becomes likely on next session end
- Manual trigger: The
/dreamslash command forces an immediate consolidation pass regardless of thresholds
Important: Auto Dream does not interrupt active sessions. It runs only after a session has ended, so you won't see consolidation mid-work. The "dreaming" status indicator appears in the prompt UI on session startup, signaling that a consolidation pass ran since your last session.
Anthropic has not published official threshold documentation. These observations reflect current behavior and may shift as the feature matures post-launch.
How to Enable Auto Dream in Claude Code (Step-by-Step)
- Open Claude Code and type
/memoryin the prompt - Navigate to the Auto-dream option in the memory settings panel
- Toggle Auto-dream ON
- Optionally, run
/dreamimmediately to trigger your first manual consolidation pass on existing memory files
Verifying it's working: At the start of your next session (after a qualifying memory accumulation), you'll see a "dreaming" status indicator briefly appear in the prompt UI. This confirms the consolidation sub-agent ran between sessions.
Manual trigger with /dream: Use this when you want to consolidate immediately — for example, before starting a major new phase of a project, or before sharing a Claude Code instance with a teammate. It gives you a clean memory state on demand.
What Auto Dream Actually Does to Your Memory Files (Before & After)
Here's a concrete example of what changes after a consolidation pass.
Before Auto Dream
Raw Auto Memory output after a 2-hour coding session:
- User is building a Next.js app
- Using Tailwind CSS
- Prefers 2-space indentation
- User said to use 2-space indentation
- Don't use semicolons
- The auth system uses NextAuth v5
- Database is PostgreSQL
- User mentioned they're using Prisma
- Using Prisma ORM for database
- Don't use var, only const/let
- User prefers functional components
- Using TypeScript strict mode
- User wants error boundaries on all major routes
After Auto Dream Consolidation
## Project: Next.js Application
### Stack
- Framework: Next.js with TypeScript (strict mode)
- Styling: Tailwind CSS
- Auth: NextAuth v5
- Database: PostgreSQL + Prisma ORM
### Code Conventions
- 2-space indentation, no semicolons
- const/let only (no var)
- Functional components throughout
- Error boundaries required on all major routes
What the sub-agent pruned
Duplicate entries — indentation was mentioned 3 times and collapsed to once
What the sub-agent merged
Scattered stack references reorganized into a single structured block
What the sub-agent formatted
Flat bullet list converted to a hierarchical reference document
Result
Token count dropped from ~180 to ~85 tokens — a 53% reduction with zero information loss
How to Structure Your Memory Files So Auto Dream Works Better
The consolidation sub-agent makes better decisions when your raw memory has consistent structure. These formatting conventions improve output quality:
- Use section headers in manual memory entries (
## Project Context,## Decisions,## Constraints). The sub-agent respects existing headers and consolidates within sections rather than flattening everything. - Prefix time-sensitive entries with
[TEMP]or[SESSION-SPECIFIC]. This signals to the sub-agent that the entry is a candidate for pruning after consolidation. - Avoid prose paragraphs in raw memory. Bullet points and key-value pairs consolidate more cleanly than narrative sentences.
- Mark permanent constraints explicitly: "PERMANENT: Never use class components." Entries with strong directive language are less likely to be pruned.
- One fact per bullet. Compound bullets confuse the merge logic and can result in partial preservation.
Auto Dream for Different Use Cases
Solo Dev — Best Practices for Single-Project Memory Hygiene
For solo developers on long-running projects, Auto Dream's highest value is preventing memory file bloat from killing token efficiency over weeks of work.
- Run a manual
/dreampass at every project milestone (feature complete, PR merge, sprint end) - Keep a
## Permanent Decisionssection at the top of your memory file — this anchors consolidation and prevents critical architectural choices from being reformatted into oblivion - Review the consolidated output after the first few Auto Dream cycles to calibrate how aggressively it prunes
AFK & Overnight Agents — Pairing Auto Dream with Unattended Pipelines
For teams running overnight or AFK agent pipelines, Auto Dream pairs naturally with unattended workloads — but requires deliberate setup.
Key consideration: If your pipeline spawns multiple sessions in sequence overnight, Auto Dream will attempt to consolidate between each one. This is generally desirable, but if sessions are very short (under 5 minutes, minimal memory writes), you may accumulate consolidation overhead without meaningful cleanup.
JaWaMi73/AutoDream (GitHub hook system) is the primary third-party alternative for users who need more control over this behavior. It allows you to configure consolidation scheduling directly, set custom triggers, and log consolidation diffs — capabilities the native toggle doesn't expose. For high-frequency overnight pipelines, the hook system gives you deterministic behavior the native feature currently lacks.
Native Auto Dream vs. Custom Hook Systems — Which Should You Use?
| Criterion | Native Auto Dream | JaWaMi73/AutoDream Hook |
|---|---|---|
| Setup complexity | 2 clicks (toggle ON) | Requires hook installation + config |
| Trigger control | Threshold-based (opaque) | Fully configurable |
| Consolidation visibility | None (black box) | Diff logs available |
| Reliability | Tied to Anthropic updates | Stable, version-pinned |
| Maintenance burden | Zero | Requires updates with Claude Code changes |
| Best for | Solo devs, standard workflows | Teams, overnight pipelines, power users |
Use Native Auto Dream if…
You want zero-configuration memory hygiene and don't need to audit what changed between sessions.
Use a Hook System if…
You run automated pipelines, need consolidation diffs for audit purposes, or want deterministic scheduling rather than threshold-based triggers.
Troubleshooting Auto Dream — When Consolidation Goes Wrong
Over-Pruning: Critical Context Was Removed
Symptom: Your next session is missing architectural decisions or constraints you relied on.
Cause: Memory entries lacked explicit permanence signals, or were formatted in ways that looked redundant to the sub-agent.
Fix: Before re-enabling Auto Dream, manually restore the lost entries and mark them with strong directive language ("PERMANENT:", "ALWAYS:", "NEVER:"). Then run /dream again — the sub-agent will re-consolidate with the restored context intact.
Prevention: Audit the first 2–3 Auto Dream consolidation passes manually to establish trust in its pruning behavior on your specific project.
Consolidation Not Triggering
Symptom: Sessions end but no "dreaming" indicator appears, memory files remain unprocessed.
Likely cause: Memory accumulation hasn't crossed the activation threshold. Sessions with fewer than ~8 new memory entries may not trigger an auto pass.
Fix: Use /dream to force a manual consolidation, or extend sessions until natural thresholds are met.
Conflicts with Manually Curated Memory Files
Symptom: Carefully formatted manual memory entries get restructured or partially overwritten by Auto Dream.
Cause: The consolidation sub-agent treats all memory content as raw input, including entries you formatted manually.
Fix: Wrap manually curated sections in explicit block markers (e.g., a header like ## DO NOT CONSOLIDATE — Manual Reference) and observe whether the sub-agent respects it. If conflicts persist, consider using native Auto Dream only for auto-accumulated entries and maintaining a separate pinned memory file outside the consolidation scope.
Quick-Start Checklist — Go from Zero to Optimized Auto Dream in 5 Steps
- Enable Auto Dream: Type
/memory→ navigate to Auto-dream → toggle ON - Structure your memory files: Add
## Permanent Decisionsand## Constraintsheaders; mark temporary entries with[TEMP] - Run your first manual pass: Type
/dreamto consolidate existing memory immediately - Verify the output: Review consolidated memory files — check that no permanent context was pruned in the first pass
- Confirm the status indicator: Start a new session after accumulating memory; look for the "dreaming" label in the prompt UI to confirm Auto Dream is actively running
Total setup time: under 5 minutes. The structural formatting step (step 2) is the one most users skip — and the one that most directly determines consolidation quality.
Why EasyClaw Wins for AI-Powered Workflows
Auto Dream solves the session memory problem inside Claude Code — but EasyClaw takes AI-assisted work a step further. As a desktop-native AI agent platform, EasyClaw gives your content and development teams persistent context, orchestrated sub-agents, and workflow automation that no cloud tool can replicate.
- ✅ Desktop-native: no cloud latency, no data leaving your machine
- ✅ Persistent memory across all agent sessions — not just single-tool sessions
- ✅ Orchestrated multi-agent pipelines built for real production workloads
- ✅ Works alongside Claude Code — augments your existing workflow, not replaces it
Frequently Asked Questions
Q: Do I need Auto Memory enabled for Auto Dream to work?
A: Yes. Auto Dream consolidates the memory entries that Auto Memory accumulates during sessions. If Auto Memory is off, there's nothing for Auto Dream to process. Enable both in the /memory settings panel.
Q: Can Auto Dream delete important context permanently?
A: Yes — if entries are not marked with permanence signals. Use prefixes like "PERMANENT:", "ALWAYS:", or "NEVER:" for any context that must survive consolidation passes. Review the first few consolidation outputs manually before trusting it to run fully unattended.
Q: How is Auto Dream different from just summarizing my memory files manually?
A: Auto Dream performs a structural edit pass — not just a summary. It deduplicates entries, merges related facts into hierarchical blocks, removes superseded context, and preserves directive language. Manual summarization typically produces a narrative paragraph; Auto Dream produces a structured reference document optimized for future session context loading.
Q: Does Auto Dream work across multiple projects simultaneously?
A: Auto Dream operates on the memory files associated with each session's project context. If you work across multiple projects in separate Claude Code sessions, each project's memory is consolidated independently. Cross-project memory blending does not occur.
Q: What's the difference between the native toggle and the JaWaMi73/AutoDream hook system?
A: The native toggle is threshold-based and fully opaque — you can't see what changed or configure when it fires. The JaWaMi73/AutoDream hook system exposes diff logs, configurable triggers, and scheduled consolidation. For solo developers, the native toggle is sufficient. For teams and overnight pipelines, the hook system provides the control and auditability the native feature currently lacks.
Q: Is there a way to preview what Auto Dream will prune before it runs?
A: Not in the native implementation. The consolidation pass is silent and produces no diff output. The only way to preview behavior in the native system is to run /dream manually on a test session, then compare the before and after memory file states yourself. The JaWaMi73/AutoDream hook system does expose diff logs if this audit capability is important to your workflow.
Final Verdict — Is Auto Dream Worth Enabling?
Yes — with one caveat.
For the majority of Claude Code users, Auto Dream is a straightforward quality-of-life upgrade. It handles memory hygiene automatically, reduces token bloat over long projects, and requires no ongoing maintenance. The default configuration works well for solo developers and standard workflows.
The caveat: The consolidation behavior is currently opaque. You don't get a diff, a log, or a preview. For the first week of use, manually verify that your consolidated memory files look correct after each Auto Dream pass. Once you've established that it's preserving your critical context accurately, you can trust it to run unattended.
Who Benefits Most
- Solo developers on multi-week projects with growing memory files
- AFK pipeline operators who need sessions to start with clean context
- Anyone who has ever spent tokens re-explaining their stack at the start of a session
Current Limitations to Watch
- Triggering thresholds are not user-configurable (yet)
- No consolidation diff or audit log in the native implementation
- Behavior with very large or highly structured memory files is still being characterized post-launch
Anthropic's trajectory with memory management — Auto Memory in 2025, Auto Dream in early 2026 — points toward increasingly autonomous context management. The logical next step is user-configurable consolidation policies and scheduled dream cycles.
Enable Auto Dream today. Structure your memory files with the conventions above. Run your first manual /dream pass. The 5-minute setup pays back in every future session where you don't have to re-explain what you already told Claude last week.