Skip to content

[Bug] openclaw wiki bridge import always returns 0 artifacts — CLI does not initialize memory-core plugin runtime #65722

Description

@TGSplaint

Description

openclaw wiki bridge import consistently returns 0 artifacts despite having 4+ days of daily notes and memory files in the workspace. The wiki doctor confirms: "Bridge mode is enabled but the active memory plugin is not exporting any public memory artifacts yet."

Root Cause

The CLI command openclaw wiki bridge import calls syncMemoryWikiImportedSources which calls listActiveMemoryPublicArtifacts. This function depends on memoryPluginState.capability being populated by the memory-core plugin during gateway runtime initialization.

However, the CLI only registers plugin command surfaces via registerPluginCliCommandsFromValidatedConfig — it does not initialize the full plugin runtime. As a result, memoryPluginState.capability is undefined, and listActiveMemoryPublicArtifacts returns an empty array.

The relevant code path:

  1. CLI loads → registerPluginCliCommands (registers commands only)
  2. openclaw wiki bridge importsyncMemoryWikiBridgeSources → checks params.config.bridge.readMemoryArtifacts
  3. → calls listActiveMemoryPublicArtifacts({ cfg: params.appConfig }) → calls memoryPluginState.capability?.publicArtifacts?.listArtifacts
  4. memoryPluginState.capability is undefined (never initialized) → returns []
  5. Result: 0 artifacts, 0 workspaces, empty vault

Steps to Reproduce

  1. Configure memory-wiki in bridge mode with readMemoryArtifacts: true
  2. Have daily notes in workspace/memory/ and MEMORY.md in workspace root
  3. Run openclaw wiki bridge import --json
  4. Observe: {"importedCount":0,"updatedCount":0,"skippedCount":0,"removedCount":0,"artifactCount":0,"workspaces":0,"pagePaths":[],"indexesRefreshed":false}

Expected Behavior

Bridge import should discover and sync workspace memory artifacts (MEMORY.md, daily notes, dream reports) into wiki source pages.

Environment

  • OpenClaw 2026.4.10 (44e5b62)
  • Plugins: memory-core (dreaming enabled), memory-wiki (bridge mode)
  • OS: CachyOS Linux 6.19.10-1 (x64)

Suggested Fix

Either:

  1. Make the CLI bridge import initialize the memory-core plugin runtime before scanning for artifacts, OR
  2. Have the gateway auto-sync bridge imports periodically or before wiki operations (currently syncImportedSourcesIfNeeded runs before gateway wiki methods but is never triggered automatically)

Metadata

Metadata

Assignees

Labels

dedupe:childDuplicate issue/PR child in dedupe cluster

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions