Your OpenClaw agent forgets things. Not the model’s fault – you haven’t told it what to keep.
Enable Dreaming: 3 AM every night, your agent reviews conversations, scores memory candidates with six weighted signals, promotes only the patterns that cross three evidence thresholds. Everything else? Gone.
MEMORY.md is what loads at session start. What goes in there matters.
What You Get After the First Dream Cycle
Run /dreaming run or wait for the scheduled sweep. Then: ~/.openclaw/workspace/MEMORY.md.
New section under a datestamp:
## Promoted From Short-Term Memory - 2026-04-14
- User prefers TypeScript over JavaScript for all new code
- Project uses PostgreSQL 16 with Drizzle ORM
- Deployment via PM2 reload, never stop+start
Three facts passed. Everything else – weather questions, one-off date lookups, fleeting debugging context – stayed in short-term storage. Eventual expiration.
Think of your brain forgetting what you had for lunch Tuesday but remembering how to drive. Most conversation material: useful in the moment, useless long-term. Without consolidation you either bloat MEMORY.md with noise or lose patterns that actually matter.
Enable Dreaming (Two Methods)
Disabled by default. Pick one:
Method 1: Edit the Config File
~/.openclaw/openclaw.json – add this under plugins.entries:
{
"plugins": {
"entries": {
"memory-core": {
"config": {
"dreaming": {
"enabled": true
}
}
}
}
}
}
Restart:
openclaw gateway restart
Memory-core auto-manages one cron job for the full sweep: light → REM → deep.
Method 2: Slash Command
Any chat connected to your gateway:
/dreaming on
Gateway restart reconciles the cron job. Config changes? Next restart.
Pro tip:
/dreaming statusshows next scheduled run + current phase counts. Nothing scheduled? Config didn’t apply. Check for JSON syntax errors or orphaned blocks from the Control UI bug that writes config at the wrong path.
Preview What Gets Promoted
Scoring system: opaque. Phase policy, thresholds, storage behavior – all internal. Not user-facing config.
Preview Deep phase output without writing anything:
openclaw memory promote
Shows which candidates would promote right now. Plus scores. MEMORY.md stays untouched.
Why a specific topic scored that way:
openclaw memory promote-explain "PostgreSQL Drizzle ORM"
Six-signal breakdown: Relevance (0.30), Frequency (0.24), Query diversity (0.15), Recency (0.15), Consolidation (0.10), Conceptual richness (0.06).
Didn’t promote? Explain output tells you which gate it failed.
Three Phases (What Runs at 3 AM)
Light → REM → deep. Only Deep writes to MEMORY.md.
Light: Ingest and Stage
Reads recent daily files (memory/YYYY-MM-DD.md), ingests session transcripts into per-day corpus, deduplicates using Jaccard similarity (0.9 threshold), stages candidates in short-term recall store.
Nothing permanent. Sorting the inbox.
REM: Extract Patterns
Builds theme summaries from short-term traces. Records reinforcement signals for deep ranking. Never writes to MEMORY.md.
Scoring prep layer – finds recurring themes, flags “candidate truths” that showed up multiple times.
Deep: Promote to MEMORY.md
Ranks candidates with weighted scoring. Three gates must pass: minScore, minRecallCount, minUniqueQueries.
As of April 2026: minScore 0.8, minRecallCount 3, minUniqueQueries 3.
Pass all three? Appended to MEMORY.md. Summary goes to DREAMS.md for human review.
The Recall Signal Gotcha
No competitor tutorial mentions this.
Promotion scores depend on recall signals in short-term-recall.json. But signals only generate when memory_search is explicitly called. Facts from read/exec? Score ~0.00 (recallCount=0). Never promote.
Documented limitation. Agent discovers something by reading a file or querying a DB. Writes it to daily notes. Dreaming ignores it.
Why? Agent never searched for that fact later. Manual memory search required after discoveries – same key terms. Which means remembering to do it every time. And inventing the right query string.
Workaround: after the agent writes something important, ask it to search for that topic. Search generates a recall signal. Non-zero recallCount. Can promote now.
Ideal? No. Reality as of April 2026? Yes.
When Dreaming Breaks
| Scenario | Why | Fix |
|---|---|---|
| External memory plugin (memory-lancedb-pro) | Dreaming needs memory-core. Memory-core disabled when another plugin owns the memory slot. Pick one: external memory OR dreaming. | None yet (#61936) |
| Multi-agent setup | Session content from every agent ingests into shared corpus. No agent identifier. Only date tags. | Disable dreaming or single-agent workspaces |
| Nothing promotes despite active usage | Recall signals missing (read/exec discoveries don’t generate signals) | Explicitly search for important topics after agent writes them |
Multi-agent contamination: subtle. One case: ‘cybera’ workspace snippets bled into ‘shodan’ workspace dream corpus. Generated haiku read as first-person prose describing another agent’s crisis.
Check the Dream Diary
After each cycle: DREAMS.md gets a human-readable summary. Open it. Read what the system noticed.
Sections like:
## Dream Cycle - 2026-04-14 03:00 UTC
### Promoted to Long-Term Memory
- User prefers TypeScript (score: 0.87)
- Project uses PostgreSQL 16 with Drizzle ORM (score: 0.81)
### Discarded (below threshold)
- Weather question (score: 0.12)
- One-off date lookup (score: 0.09)
### Stats
Cycles run: 5 | Promoted: 2 | Discarded: 18 | Total long-term: 23
Your audit trail. Something promoted that shouldn’t have? Edit MEMORY.md directly. Remove it. Dreaming appends and refines existing long-term memory – never wholesale deletes.
Adjust the Schedule
Default: "0 3 * * *" (3 AM daily). Daily works for most – low resources, steady promotion. Every 6 hours for active agents with high memory throughput. Weekly (0 3 * * 0) for agents that don’t accumulate much short-term memory.
Change it:
{
"plugins": {
"entries": {
"memory-core": {
"config": {
"dreaming": {
"enabled": true,
"timezone": "America/Los_Angeles",
"frequency": "0 */6 * * *"
}
}
}
}
}
}
Restart the gateway. Schedule changes take effect.
What Dreaming Won’t Fix
Memory curation, not intelligence amplification.
Weak model reasoning? Won’t fix that. Doesn’t fix weak reasoning. Can reduce friction by helping the agent stay grounded in context that actually matters.
Remember everything you said? No. That’s the design. Most conversation: noise.
External memory backends? Won’t work until the multi-slot architecture gets built.
Cost
Dreaming uses your configured LLM for REM pattern extraction and narrative generation. Default: same primary model as your bot. Override with dreaming.model to use a cheaper model for consolidation.
Edge case: 94 dreaming sessions in 65 minutes. Cost: $4.35. 95% of 7,942 entries had zero recalls. Runaway loop bug. Reported. May still occur under certain conditions.
Typical single-agent usage? Minimal cost. 18 agents with dreaming enabled and the loop bug triggers? You’ll know.
Next Step: Manual Cycle
Don’t wait for 3 AM.
/dreaming run
Check ~/.openclaw/workspace/DREAMS.md. What promoted? What got discarded? Nothing promoted when you expected it? Run openclaw memory promote-explain on a specific topic. See which gate failed.
That’s where tuning starts.
Does Dreaming delete old entries from MEMORY.md automatically?
No. REM flags entries that haven’t been reinforced by recent conversations. Low-confidence tag for operator review. Not automatic deletion.
Can I adjust the promotion thresholds?
Thresholds managed internally by memory-core. Can’t adjust via config currently. Preview candidates and manually promote with openclaw memory promote --apply. Scoring gates: hardcoded.
What happens to candidates that don’t promote?
Stay in short-term recall store. Keep accumulating signals on future recalls. Eventually cross all three gates? Promote in a future sweep. But entries exceeding maxAgeDays expire and get removed.