fix(memory-core): default dreaming storage to "separate" to stop polluting daily memory files#66948
Conversation
…ing daily memory files (openclaw#66947)
Greptile SummaryThis PR changes the default dreaming storage mode from
Confidence Score: 4/5Not safe to merge until four stale test assertions are updated to expect "separate" as the default storage mode. The logic change itself is correct and consistent across both files, but four unit tests still assert the old "inline" default and will fail on pnpm test extensions/memory-core. extensions/memory-core/src/dreaming.test.ts — lines 186–189, 225–229, 261–264, and 296–299 all need mode: "inline" changed to mode: "separate".
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc8d95b6d5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| export const DEFAULT_MEMORY_DREAMING_TIMEZONE = undefined; | ||
| export const DEFAULT_MEMORY_DREAMING_VERBOSE_LOGGING = false; | ||
| export const DEFAULT_MEMORY_DREAMING_STORAGE_MODE = "inline"; | ||
| export const DEFAULT_MEMORY_DREAMING_STORAGE_MODE = "separate"; |
There was a problem hiding this comment.
Preserve inline mode for legacy separateReports-only configs
Switching DEFAULT_MEMORY_DREAMING_STORAGE_MODE to "separate" changes behavior for existing configs that still use the legacy shape dreaming.storage.separateReports without dreaming.storage.mode. In resolveMemoryDreamingConfig, normalizeStorageMode(storage?.mode) now falls back to "separate", so a stored config like { separateReports: false } silently flips from inline daily writes to separate-only reports. That is a backward-compatibility regression for previously persisted configs, so this default should be gated to brand-new storage blocks (or legacy-only configs should be explicitly mapped).
Useful? React with 👍 / 👎.
|
Closing as superseded by #66412. Thank you! |
Summary
DEFAULT_MEMORY_DREAMING_STORAGE_MODEfrom"inline"to"separate"insrc/memory-host-sdk/dreaming.tsso Light/REM phase blocks are written tomemory/dreaming/<phase>/YYYY-MM-DD.mdinstead ofmemory/YYYY-MM-DD.md.extensions/memory-core/src/dreaming.tswhenparams.config.storageis entirely missing.Fixes #66947.
Why
The current default writes Light/REM dreaming output directly into the agent's daily memory file (
memory/YYYY-MM-DD.md). The dreaming sweep runs at 3 AM, so by the time the first real heartbeat fires later that day, the daily file already exists with dreaming content. The LLM-driven heartbeat then judges "file exists, nothing new" and repliesHEARTBEAT_OKwithout logging any actual session activity, producing days with zero agent-curated content despite active conversations.The
"separate"storage mode is already implemented —resolveSeparateReportPathwrites Light/REM tomemory/dreaming/<phase>/YYYY-MM-DD.md, and the Deep phase already writes only to that separate location. The codebase also already shipsstripManagedDailyDreamingLineson the ingest side, which confirms the system already treats dreaming blocks as "not real content". This change simply stops producing that pollution in the first place for new default installs.Existing workspaces that explicitly set
storage.modein their config are unaffected.Test plan
pnpm test extensions/memory-coredreaming.storage.mode— verify Light/REM output lands inmemory/dreaming/light/YYYY-MM-DD.mdandmemory/dreaming/rem/YYYY-MM-DD.md, and thatmemory/YYYY-MM-DD.mdis no longer created by the dreaming sweep alone.storage.mode: "inline"— verify inline behavior is preserved for backwards compatibility.Notes
memory/2026-04-14.md) still contain inline dreaming blocks after this change and would need a separate migration or manual cleanup.