DEV Community

gentic news
gentic news

Posted on • Originally published at gentic.news

Claude Code's /dream Command: Automatic Memory Consolidation Like REM Sleep

Claude Code shipped /dream — a command that reviews your session history, prunes stale memories, and consolidates them automatically. Like REM sleep for your AI agent.

Claude Code has shipped /dream — a command that reviews your past session history, prunes stale or contradictory memories, and consolidates them into clean, structured knowledge. Think of it as REM sleep for your AI agent.

How It Works

/dream runs in the background after certain conditions are met (24+ hours since last dream, 5+ sessions completed). It:

  • Reviews 900+ past session transcripts
  • Identifies contradictions and outdated information in your CLAUDE.md and memory files
  • Replaces vague references like "today" or "recently" with actual dates
  • Prunes memories that are no longer relevant
  • Consolidates related memories into coherent knowledge

Why It Matters

Long-running Claude Code setups accumulate memory debt — stale instructions, contradictory rules, and outdated context that degrades performance over time. /dream is the first built-in mechanism to automatically maintain memory hygiene without user intervention.

Community Reaction

The r/ClaudeCode community has been overwhelmingly positive, with users reporting cleaner CLAUDE.md files and more consistent agent behavior after running /dream. Several users noted it caught contradictions they didn't even know existed in their memory files.

Original discussion on r/ClaudeCode


Originally published on gentic.news

Top comments (0)