openclaw - 💡(How to fix) Fix memory-wiki bridge import returns 0 artifacts — publicArtifacts capability not accessible to wiki plugin [2 comments, 2 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#68828Fetched 2026-04-19 15:06:55
View on GitHub
Comments
2
Participants
2
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
commented ×2

wiki.bridge.import always returns 0 artifacts even though memory-core registers publicArtifacts.listArtifacts via api.registerMemoryCapability(). The wiki plugin's listActiveMemoryPublicArtifacts() silently returns an empty array because memoryPluginState.capability is undefined/null at call time.

Root Cause

The call chain:

  1. memory-core registers capability: api.registerMemoryCapability({ publicArtifacts: { listArtifacts: listMemoryCorePublicArtifacts } }) — this calls registerMemoryCapability(pluginId, capability) which sets memoryPluginState.capability
  2. wiki plugin calls listActiveMemoryPublicArtifacts({ cfg: appConfig }) which reads memoryPluginState.capability?.capability.publicArtifacts?.listArtifacts(params)
  3. The result is always [] (the ?? [] fallback)

memoryPluginState is a module-level singleton in memory-state-CKpinHhR.js. Both plugins run in the gateway process, but memoryPluginState.capability appears to be null when wiki accesses it.

Possible causes:

  • ESM/CJS module instance split: memory-core imports memory-state-CKpinHhR.js via one path, wiki imports it via another, resulting in two separate singleton instances
  • Plugin loading order: wiki loads and caches the reference before memory-core registers
  • Module resolution path mismatch: the bundled dist filename includes a content hash (CKpinHhR), and if plugins resolve it differently the singleton diverges

Fix Action

Workaround

Switch to vaultMode: "isolated" and use wiki_apply tool for manual knowledge entry. Bridge mode is non-functional until this is fixed.

RAW_BUFFERClick to expand / collapse

Summary

wiki.bridge.import always returns 0 artifacts even though memory-core registers publicArtifacts.listArtifacts via api.registerMemoryCapability(). The wiki plugin's listActiveMemoryPublicArtifacts() silently returns an empty array because memoryPluginState.capability is undefined/null at call time.

Steps to Reproduce

  1. Configure memory-core as plugins.slots.memory with a workspace containing MEMORY.md and memory/*.md files
  2. Configure memory-wiki with vaultMode: "bridge" and all bridge options enabled
  3. Run openclaw gateway call wiki.bridge.import --json
  4. Observe: artifactCount: 0, workspaces: 0

Expected Behavior

listArtifacts() in memory-core should find MEMORY.md, daily notes, dream reports, and event logs from the configured workspace(s), and bridge import should create wiki source pages from them.

Actual Behavior

artifactCount: 0 consistently, even after gateway restart.

Root Cause Analysis

The call chain:

  1. memory-core registers capability: api.registerMemoryCapability({ publicArtifacts: { listArtifacts: listMemoryCorePublicArtifacts } }) — this calls registerMemoryCapability(pluginId, capability) which sets memoryPluginState.capability
  2. wiki plugin calls listActiveMemoryPublicArtifacts({ cfg: appConfig }) which reads memoryPluginState.capability?.capability.publicArtifacts?.listArtifacts(params)
  3. The result is always [] (the ?? [] fallback)

memoryPluginState is a module-level singleton in memory-state-CKpinHhR.js. Both plugins run in the gateway process, but memoryPluginState.capability appears to be null when wiki accesses it.

Possible causes:

  • ESM/CJS module instance split: memory-core imports memory-state-CKpinHhR.js via one path, wiki imports it via another, resulting in two separate singleton instances
  • Plugin loading order: wiki loads and caches the reference before memory-core registers
  • Module resolution path mismatch: the bundled dist filename includes a content hash (CKpinHhR), and if plugins resolve it differently the singleton diverges

Environment

  • OpenClaw 2026.4.14 (323493f)
  • memory-core: plugins.slots.memory: "memory-core"
  • memory-wiki: plugins.entries.memory-wiki.enabled: true, vaultMode: "bridge"
  • active-memory: plugins.entries.active-memory.enabled: true
  • memory backend: qmd
  • OS: Linux (Kali), systemd service
  • Gateway: running, pid confirmed active, RPC probe ok

Workaround

Switch to vaultMode: "isolated" and use wiki_apply tool for manual knowledge entry. Bridge mode is non-functional until this is fixed.

extent analysis

TL;DR

The most likely fix is to ensure that memoryPluginState.capability is properly set before the wiki plugin accesses it, potentially by resolving the ESM/CJS module instance split or plugin loading order issue.

Guidance

  • Verify that memory-core and wiki plugins are importing memory-state-CKpinHhR.js from the same path to avoid separate singleton instances.
  • Check the plugin loading order to ensure that memory-core registers its capability before the wiki plugin tries to access it.
  • Consider using a consistent module resolution path to avoid divergence of the singleton instance.
  • Test the workaround by switching to vaultMode: "isolated" and using the wiki_apply tool for manual knowledge entry.

Example

No code snippet is provided as the issue is related to module imports and plugin loading order, which requires a more nuanced solution.

Notes

The root cause of the issue is uncertain, and further investigation is needed to determine the exact cause. The provided workaround may not be a permanent solution, and a more thorough fix may be required.

Recommendation

Apply the workaround by switching to vaultMode: "isolated" and using the wiki_apply tool for manual knowledge entry, as this provides a temporary solution until the underlying issue is resolved.

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

openclaw - 💡(How to fix) Fix memory-wiki bridge import returns 0 artifacts — publicArtifacts capability not accessible to wiki plugin [2 comments, 2 participants]