SKIP TO CONTENT
ON AIR — VIBE CODING ACADEMY · EN · LIVE
All articles
QUICK TIP·May 26, 2026·7 MIN READ

Claude Can Dream Now — What Agent Memory Consolidation Means for Your Builds

By EndOfCoding

Anthropic just shipped 'dreaming' — an inter-session memory consolidation system for Claude agents. Legal AI firm Harvey enabled it and saw a 6x task completion rate improvement. This isn't a minor feature update. It changes the architecture of what's possible with multi-session Claude agent products. If you're building anything with Claude agents, here's what it means for you.

What You'll Learn

What 'dreaming' actually does (in plain engineering terms), why Harvey's 6x improvement makes sense once you understand the mechanism, what other features shipped alongside dreaming at Code with Claude 2026, how to decide if dreaming is relevant to what you're building, and the one architectural change this enables that wasn't practical before.

What Dreaming Does

Before dreaming, Claude agents were amnesiac between sessions. Session 2 started as cold as Session 1. You could work around this with RAG pipelines and manual context injection, but the agent couldn't autonomously retain what it learned.

Dreaming changes that:

Old flow:
Session 1 → Agent learns → Session ends → All learning lost
Session 2 → Agent starts fresh → No memory of Session 1

New flow with Dreaming:
Session 1 → Agent learns → Dreaming synthesizes key patterns → Memory stored
Session 2 → Agent loads prior memory → Starts with Session 1's knowledge
Session 3 → Builds on Sessions 1 + 2 → Compounding improvement

The synthesis step is the key: at session end, the agent reflects on what it learned, extracts structured memory objects (preferences, patterns, corrections), and stores them with metadata (type, confidence, decay policy, scope).

The Harvey 6x Number Explained

Harvey uses Claude agents for legal document analysis. The tasks require institutional knowledge: client preferences, document conventions, negotiated precedents.

Without dreaming, attorneys re-briefed Claude on context it had already learned in prior sessions — wasted cycles. With dreaming, the agent carries that institutional knowledge. It already knows 'this client always flags assignment clauses.' Result: more tasks completed per session, less human re-briefing. 6x is the compound effect of eliminating that setup overhead at scale.

What Shipped Alongside Dreaming (Code with Claude 2026)

1. Dreaming — cross-session memory consolidation
2. Routines — repeatable named workflows ("do the daily code review")
3. Outcomes — agent self-evaluation against specified criteria
4. Parallel Subagent Orchestration — concurrent background sessions

These four together form a platform: persistent state + structured execution + self-evaluation + parallelism. This is the agent infrastructure layer that previously required significant custom engineering.

When Does Dreaming Matter for Your Build?

Dreaming is high-value when your agent needs to:

  • Learn user preferences over multiple sessions
  • Accumulate institutional domain knowledge
  • Build on prior task outcomes rather than rediscovering context
  • Serve the same user repeatedly with personalization

Dreaming adds less value when:

  • Each session is truly independent (one-shot queries)
  • Your context fits in a single session's window anyway
  • You're already managing memory state externally

The sweet spots: customer-facing AI assistants, development agents that learn your codebase conventions, educational tutors that track student progress, enterprise knowledge workers.

The Architectural Shift

Before dreaming, building memory for Claude agents looked like this:

// Manual memory management (before dreaming)
async function loadUserContext(userId: string) {
  const memories = await vectorDb.query(userId, currentTask);
  const systemPrompt = buildSystemPrompt(memories);
  return callClaude(systemPrompt, userMessage);
}

async function saveUserContext(userId: string, session: Session) {
  const summary = await summarizeSession(session);
  await vectorDb.upsert(userId, summary);
}

With dreaming, this moves to the platform:

// Dreaming handles memory consolidation
const session = await claude.createSession({
  agentId: 'my-agent',
  memoryScope: 'user',
  dreamingEnabled: true   // That's it
});
// Post-session synthesis and storage happens automatically
// Next session loads relevant memories automatically

The engineering burden shifts from your infrastructure code to the platform. You get the API; the platform manages the rest.

Common Challenges

'Does dreaming mean the agent remembers everything forever?' — No. You control memory scope (user-level, project-level, global) and decay policies (how long memories remain relevant). The agent doesn't accumulate unbounded state. 'Is the memory store private and controllable?' — Yes. Developers have full API access to read, write, delete, and scope memories. It's not a black box — you can inspect what the agent learned and correct bad memories. 'What if my agent learns something wrong and keeps repeating it?' — The memory store is fully editable via API. Incorrect memories can be deleted or corrected programmatically. 'Does dreaming work with existing Claude Code agents or only new agent SDK implementations?' — Dreaming is part of the Anthropic Agent SDK platform layer. Claude Code's own background sessions benefit from related architectural improvements, but the explicit dreaming API is for Agent SDK implementations.

Advanced Tips

Use dreaming to eliminate re-briefing overhead before measuring its value. The Harvey 6x number came from a workflow that required substantial per-session setup. Measure how much time in your sessions goes to context re-establishment — that's your dreaming ROI estimate. Set memory decay policies based on information volatility. User preferences (stable) should have long decay. Factual market data (volatile) should have short decay. The right decay policy prevents stale memories from misleading agents. Combine dreaming with CLAUDE.md constraints for production deployments. Dreaming gives the agent persistent learned context; CLAUDE.md gives it permanent architectural constraints. The two complement each other — CLAUDE.md prevents the agent from learning bad patterns that contradict your system's design. The full deep-dive on dreaming architecture is at EndOfCoding. The Vibe Coding Ebook Chapter 6 covers agent architectures that integrate well with dreaming. Keep building.

Conclusion

Dreaming is the memory layer that makes multi-session Claude agents architecturally tractable without custom infrastructure. Harvey's 6x completion rate is what institutional knowledge retention looks like at scale. If you're building multi-session agent products — assistants, tutors, enterprise knowledge workers — add dreaming to your architecture evaluation. The platform is doing work you were previously doing manually. Use it.