openclaw - ✅(Solved) Fix Allow memory-core dreaming runtime to coexist with third-party memory slot plugins [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63067Fetched 2026-04-09 07:58:58
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
cross-referenced ×1mentioned ×1subscribed ×1

The exclusive memory slot in OpenClaw currently disables memory-core entirely whenever a third-party plugin (e.g. hindsight-openclaw, mem0, cognee, qmd, graphiti, NEXO Brain — see #52532) occupies the slot. As a side effect, the dreaming runtime that lives inside memory-core is also disabled, even though dreaming operates on the workspace .md files (MEMORY.md, daily notes, dreams.md) that are the shared substrate every memory plugin reads at bootstrap.

The result: every user who adopts a third-party memory plugin loses workspace file lifecycle management automatically — including the light/deep/REM phases, replay-safe deep promotion, recovery, and the Dream Diary surface introduced in v2026.4.5+.

Root Cause

Dreaming is one of the most valuable community-developed features in OpenClaw — three cooperative phases, replay-safe promotion, REM pattern detection, recovery on health degradation, multilingual conceptual tagging, the Dream Diary UI. The 4.5–4.7 release notes show heavy investment from @vignesh07 and others.

But because dreaming lives inside memory-core and memory-core is mutually exclusive with any other memory slot plugin, the value of dreaming is reserved exclusively for users who run memory-core as their primary memory backend. Every user who adopts a richer third-party memory layer (semantic recall via Hindsight, graph memory via Mem0/Cognee/Graphiti, etc.) is forced to give up dreaming entirely, even though their workspace .md files still need maintenance.

This pushes plugin authors toward two bad options:

  1. Reimplement dreaming inside their own plugin — duplicating code, fragmenting effort, diverging from the canonical implementation, losing every future improvement made upstream
  2. Leave their users without workspace file lifecycle management — accumulating drift, staleness, and silent truncation in bootstrap context (TOOLS.md/MEMORY.md exceeding bootstrapMaxChars)

Neither is healthy for the ecosystem.

Fix Action

Fix / Workaround

Workaround currently used

PR fix notes

PR #64155: fix(memory-core): keep dreaming active with external memory owners

Description (problem / solution / changelog)

Summary

  • Problem: when another plugin owns plugins.slots.memory, bundled memory-core gets disabled entirely, so dreaming disappears with it.
  • Why it matters: users lose /dreaming, managed dream cron, .dreams output, and DREAMS.md even though dreaming is presented as a separate capability.
  • What changed:
    • keep bundled memory-core loaded as a dreaming sidecar when another memory plugin owns the slot
    • still disable it when memory is explicitly none
    • keep exclusive memory registration off in sidecar mode, so the active memory owner stays authoritative
    • route /dreaming reads and writes through the selected memory owner config instead of hardcoding memory-core

Change Type

  • Bug fix
  • Refactor required for the fix

Scope

  • Memory / storage
  • API / contracts

Linked Issues

  • Closes #63831
  • Closes #63590
  • Closes #61936
  • Closes #63067

Root Cause

Dreaming lived inside memory-core, but slot resolution and loader policy treated memory-core as fully mutually exclusive with any other memory plugin. Even after config ownership fixes, the plugin never loaded, so its dreaming command, hook registration, and cron lifecycle never came up.

Implementation Notes

This is intentionally split into two commits:

  1. keep memory-core loaded as a sidecar for dreaming while another memory plugin owns the memory slot
  2. make /dreaming operate on the selected memory owner's config

Regression Test Plan

  • Unit test
  • Target files:
    • src/plugins/loader.test.ts
    • src/plugins/slots.test.ts
    • extensions/memory-core/index.test.ts
    • extensions/memory-core/src/dreaming-command.test.ts
  • Locked scenarios:
    • bundled memory-core stays loaded alongside another memory owner
    • bundled memory-core does not stay loaded when memory slot is none
    • memory-core sidecar keeps dreaming surfaces but skips exclusive memory registration
    • /dreaming persists and reads config from the active memory owner

Verification

Authoritative mb-server gates passed:

  • pnpm test -- src/plugins/loader.test.ts -t "enforces memory slot loading rules"
  • pnpm test -- src/plugins/slots.test.ts extensions/memory-core/index.test.ts extensions/memory-core/src/dreaming-command.test.ts

Risks and Mitigations

  • Risk: sidecar mode could accidentally keep memory-core alive when memory is intentionally disabled.
    • Mitigation: loader exemption only applies when another memory plugin actually owns the slot, not when slot is none.
  • Risk: sidecar mode could let memory-core compete for memory ownership.
    • Mitigation: sidecar mode skips exclusive memory capability/tool/CLI registration.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/memory-core/index.test.ts (modified, +39/-2)
  • extensions/memory-core/index.ts (modified, +6/-0)
  • extensions/memory-core/src/dreaming-command.test.ts (modified, +69/-2)
  • extensions/memory-core/src/dreaming-command.ts (modified, +9/-5)
  • src/memory-host-sdk/dreaming.test.ts (modified, +35/-0)
  • src/memory-host-sdk/dreaming.ts (modified, +6/-1)
  • src/plugins/loader.test.ts (modified, +111/-0)
  • src/plugins/loader.ts (modified, +41/-5)
  • src/plugins/slots.test.ts (modified, +5/-7)
  • src/plugins/slots.ts (modified, +33/-1)

Code Example

Config warnings:
- plugins.entries.memory-core: plugin disabled (memory slot set to "hindsight-openclaw") but config is present

---

{
  \"memory\": {
    \"dreaming\": {
      \"enabled\": true,
      \"frequency\": \"0 13 * * *\",
      \"timezone\": \"Europe/Rome\"
    }
  }
}
RAW_BUFFERClick to expand / collapse

Summary

The exclusive memory slot in OpenClaw currently disables memory-core entirely whenever a third-party plugin (e.g. hindsight-openclaw, mem0, cognee, qmd, graphiti, NEXO Brain — see #52532) occupies the slot. As a side effect, the dreaming runtime that lives inside memory-core is also disabled, even though dreaming operates on the workspace .md files (MEMORY.md, daily notes, dreams.md) that are the shared substrate every memory plugin reads at bootstrap.

The result: every user who adopts a third-party memory plugin loses workspace file lifecycle management automatically — including the light/deep/REM phases, replay-safe deep promotion, recovery, and the Dream Diary surface introduced in v2026.4.5+.

Reproduction

  1. Add memory-core to plugins.allow in openclaw.json
  2. Set plugins.slots.memory to any third-party plugin (e.g. hindsight-openclaw)
  3. Add a dreaming config block under plugins.entries.memory-core.config.dreaming
  4. Restart the gateway

Observed (verified on v2026.4.8):

Config warnings:
- plugins.entries.memory-core: plugin disabled (memory slot set to "hindsight-openclaw") but config is present

memory-core is gated off at the plugin loader level, before its gateway:startup hook (registerShortTermPromotionDreaming) ever runs. The hardcoded local resolver resolveMemoryCorePluginConfig (in extensions/memory-core/index.js) which would otherwise read plugins.entries[\"memory-core\"].config independently of slot resolution is never reached. Dreaming silently does not run.

Why this matters

Dreaming is one of the most valuable community-developed features in OpenClaw — three cooperative phases, replay-safe promotion, REM pattern detection, recovery on health degradation, multilingual conceptual tagging, the Dream Diary UI. The 4.5–4.7 release notes show heavy investment from @vignesh07 and others.

But because dreaming lives inside memory-core and memory-core is mutually exclusive with any other memory slot plugin, the value of dreaming is reserved exclusively for users who run memory-core as their primary memory backend. Every user who adopts a richer third-party memory layer (semantic recall via Hindsight, graph memory via Mem0/Cognee/Graphiti, etc.) is forced to give up dreaming entirely, even though their workspace .md files still need maintenance.

This pushes plugin authors toward two bad options:

  1. Reimplement dreaming inside their own plugin — duplicating code, fragmenting effort, diverging from the canonical implementation, losing every future improvement made upstream
  2. Leave their users without workspace file lifecycle management — accumulating drift, staleness, and silent truncation in bootstrap context (TOOLS.md/MEMORY.md exceeding bootstrapMaxChars)

Neither is healthy for the ecosystem.

Proposal

Decouple the dreaming runtime from the memory slot ownership. Two possible shapes, in order of architectural cleanliness:

Option A — Dreaming as a system-level service

Promote the dreaming runtime to a top-level OpenClaw service that loads from memory-core's host SDK regardless of which plugin owns the memory slot. Gate it with a top-level config flag:

{
  \"memory\": {
    \"dreaming\": {
      \"enabled\": true,
      \"frequency\": \"0 13 * * *\",
      \"timezone\": \"Europe/Rome\"
    }
  }
}

Dreaming reads workspace .md files via the existing memory-core-host-runtime-files-* modules, which are already file-based and slot-agnostic. The slot plugin (Hindsight, Mem0, …) continues to handle recall/retain semantically without conflict.

Option B — memory-core loadable as a non-slot secondary plugin

Allow memory-core to be loaded as a secondary plugin when added to plugins.allow, even when the memory slot is occupied by another plugin. In this mode:

  • memory-core does not claim the slot (no slot conflict)
  • memory-core registers only its non-slot hooks: dreaming cron, daily notes lifecycle, dreams.md writer
  • The memory slot plugin retains exclusive ownership of recall/retain runtime semantics
  • Config under plugins.entries.memory-core.config.dreaming is honored

The current diagnostic ("plugin disabled but config is present") would be removed when this coexistence pattern is explicitly supported.

Option A is more elegant (single source of truth, no plugin gymnastics). Option B is closer to the current code shape and might be a smaller diff.

Impact

  • Affected users: Estimated majority of advanced OpenClaw users — anyone running a third-party memory plugin (Hindsight, Mem0, Cognee, Graphiti, QMD, NEXO Brain, …)
  • Breaking changes: None. Existing setups (memory-core as slot, no third-party plugin) keep working identically
  • Plugin authors: Reduces pressure to reimplement dreaming-equivalent logic inside every memory plugin
  • Community investment: Makes the existing investment in dreaming (3 phases, recovery, replay-safety, Dream Diary) universally available

Related

  • #52532 — NEXO Brain proposal: same architectural concern, different framing (proposes adding a different memory layer; the underlying gap is identical)
  • v2026.4.7 release note: "Memory/dreaming: make Dreams config reads and writes respect the selected memory slot plugin instead of always targeting memory-core" (#62275) — addresses config respect but not the loader-level gating that prevents memory-core from running at all when another plugin is in the slot

Workaround currently used

None viable. Workspace .md files must be maintained manually (or via the agent itself on-demand), without the benefit of the dreaming runtime, until this is resolved upstream.


Happy to contribute a PR for either Option A or Option B if there is interest and a preferred direction from maintainers.

extent analysis

TL;DR

Decoupling the dreaming runtime from memory slot ownership is necessary to enable workspace file lifecycle management for users with third-party memory plugins.

Guidance

  • Evaluate the two proposed options: promoting dreaming to a system-level service (Option A) or allowing memory-core to load as a non-slot secondary plugin (Option B).
  • Consider the trade-offs between the two options, including architectural cleanliness and potential conflicts with existing plugins.
  • Assess the impact on affected users, plugin authors, and community investment in dreaming features.
  • Determine the best approach for implementing the chosen option, including potential config changes and plugin updates.

Example

For Option A, the openclaw.json config might include a top-level memory section with a dreaming subsection:

{
  "memory": {
    "dreaming": {
      "enabled": true,
      "frequency": "0 13 * * *",
      "timezone": "Europe/Rome"
    }
  }
}

Notes

The chosen solution should ensure that the dreaming runtime can coexist with third-party memory plugins without conflicts or duplicated effort.

Recommendation

Apply Option A, promoting the dreaming runtime to a system-level service, as it provides a cleaner architecture and a single source of truth for dreaming configuration. This approach allows for easier maintenance and updates to the dreaming feature without affecting individual plugins.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING