Skip to content

[Bug]: memory-wiki bridge import reports 0 exported artifacts because memory capability publicArtifacts is not restored on cached plugin registry loads #65698

Description

@jsompis

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

memory-wiki in bridge mode reports zero exported artifacts and imports nothing, even though memory-core is selected in the memory slot, exports publicArtifacts.listArtifacts, and the configured agent workspaces contain valid memory files.

Current diagnosis suggests the bug is not in wiki bridge mode config, workspace discovery, or missing memory files. The strongest hypothesis is that the plugin loader cache/restore path restores memory runtime-related state, but does not restore memoryPluginState.capability, which is the exact state memory-wiki uses to reach publicArtifacts.listArtifacts(...).

As a result, memory-wiki bridge mode silently sees no public artifacts and reports:

  • Bridge: enabled (0 exported artifacts)
  • Bridge import synced 0 artifacts across 0 workspaces

Steps to reproduce

  1. Configure OpenClaw with:

    • plugins.slots.memory = "memory-core"
    • plugins.entries.memory-wiki.config.vaultMode = "bridge"
    • plugins.entries.memory-wiki.config.bridge.enabled = true
    • plugins.entries.memory-wiki.config.bridge.readMemoryArtifacts = true
    • memory.backend = "qmd"
       "memory-wiki": {
         "enabled": true,
         "config": {
           "vaultMode": "bridge",
           "vault": {
             "renderMode": "obsidian"
           },
           "obsidian": {
             "enabled": true,
             "useOfficialCli": true,
             "vaultName": "OpenClaw Wiki",
             "openAfterWrites": false
           },
           "bridge": {
             "enabled": true,
             "readMemoryArtifacts": true,
             "indexDreamReports": true,
             "indexDailyNotes": true,
             "indexMemoryRoot": true,
             "followMemoryEvents": true
           },
           "ingest": {
             "autoCompile": true,
             "maxConcurrentJobs": 1,
             "allowUrlIngest": true
           },
           "search": {
             "backend": "shared",
             "corpus": "all"
           },
           "context": {
             "includeCompiledDigestPrompt": false
           },
           "render": {
             "preserveHumanBlocks": true,
             "createBacklinks": true,
             "createDashboards": true
           }
         }
       }
     }
    
```text
  "memory": {
    "backend": "qmd",
    "citations": "auto",
    "qmd": {
      "command": "/opt/homebrew/bin/qmd",
      "includeDefaultMemory": true,
      "searchMode": "search",
      "update": {
        "interval": "5m",
        "debounceMs": 15000
      },
      "limits": {
        "maxResults": 8,
        "timeoutMs": 6000
      },
      "sessions": {
        "enabled": true
      },
      "scope": {
        "default": "deny",
        "rules": [{ action: "allow", match: { chatType: "direct" } }],
      }
    }
  }
  1. Ensure agent workspaces contain memory files, for example:
    • ~/.openclaw/workspace/main/MEMORY.md
    • ~/.openclaw/workspace/main/memory/*.md
    • ~/.openclaw/workspace/writer/memory/*.md
  2. Start or restart the gateway.
  3. Run:
    • openclaw wiki status
    • openclaw wiki doctor
    • openclaw wiki bridge import

Expected behavior

memory-wiki bridge mode should detect exported public memory artifacts from memory-core and import bridge-backed sources.

At minimum, it should detect the configured memory workspaces and report non-zero artifacts/workspaces when valid memory files are present.

Actual behavior

memory-wiki reports no exported artifacts and bridge import does nothing:

  • Bridge: enabled (0 exported artifacts)
  • Pages: 0 sources, 0 entities, 0 concepts, 0 syntheses, 5 reports
  • Bridge import synced 0 artifacts across 0 workspaces (0 new, 0 updated, 0 unchanged, 0 removed).

This happens despite valid memory files existing on disk and memory-core being selected in the memory slot.

OpenClaw version

2026.4.11

Operating system

macOS 26.4

Install method

npm

Model

openai-codex/gpt-5.4

Provider / routing chain

openclaw->openai-codex/gpt-5.4

Additional provider/model setup details

No response

Logs, screenshots, and evidence

### CLI output

`openclaw wiki status` reported:


Wiki vault mode: bridge
Vault: ready (~/.openclaw/wiki/main)
Render mode: obsidian
Obsidian CLI: available
Bridge: enabled (0 exported artifacts)
Unsafe local: disabled
Pages: 0 sources, 0 entities, 0 concepts, 0 syntheses, 5 reports

Warnings:
- Bridge mode is enabled but the active memory plugin is not exporting any public memory artifacts yet.


`openclaw wiki doctor` reported:


Wiki doctor: 1 issue(s) found
...
Warnings:
- Bridge mode is enabled but the active memory plugin is not exporting any public memory artifacts yet.

Suggested fixes:
- Use a memory plugin that exports public artifacts, create/import memory artifacts first, or switch the wiki back to isolated mode.


`openclaw wiki bridge import` reported:


Bridge import synced 0 artifacts across 0 workspaces (0 new, 0 updated, 0 unchanged, 0 removed). Indexes not refreshed (no-import-changes).


### Evidence that memory files exist

Confirmed on disk:

- `~/.openclaw/workspace/main/MEMORY.md` exists
- `~/.openclaw/workspace/main/memory/` contains many markdown files
- `~/.openclaw/workspace/writer/memory/` contains markdown files

Example probe result:


main:
- workspaceExists = true
- memoryRootExists = true
- memoryDirExists = true
- markdownCount = 30

writer:
- workspaceExists = true
- memoryRootExists = false
- memoryDirExists = true
- markdownCount = 3


### Evidence that workspace resolution is correct

A runtime probe of `resolveMemoryDreamingWorkspaces(...)` resolved the expected workspaces:


{
  "workspaces": [
    {
      "workspaceDir": "/Users/.../.openclaw/workspace/main",
      "agentIds": ["main"]
    },
    {
      "workspaceDir": "/Users/.../.openclaw/workspace/writer",
      "agentIds": ["writer"]
    }
  ]
}


### Evidence that memory-core exports public artifacts

`memory-core` registers memory capability with `publicArtifacts.listArtifacts`:


api.registerMemoryCapability({
  promptBuilder: buildPromptSection,
  flushPlanResolver: buildMemoryFlushPlan,
  runtime: memoryRuntime,
  publicArtifacts: { listArtifacts: listMemoryCorePublicArtifacts }
});


### Root-cause hypothesis from code inspection

`memory-wiki` bridge import reaches public artifacts through:


listActiveMemoryPublicArtifacts({ cfg: params.appConfig })


which depends on:


memoryPluginState.capability?.capability.publicArtifacts?.listArtifacts(...)


However, in the plugin loader cache/restore path, cached state appears to store and restore:

- `memoryCorpusSupplements`
- `memoryPromptBuilder`
- `memoryPromptSupplements`
- `memoryFlushPlanResolver`
- `memoryRuntime`

but **not** `memoryPluginState.capability`.

That suggests a cached plugin-registry load can restore memory runtime-related state without restoring the memory capability object that contains `publicArtifacts`.

If that is correct, `memory-wiki` bridge mode would silently see no exported artifacts even though `memory-core` registered them on a cold/plugin-fresh load.

Impact and severity

Severity: Medium

This does not appear to corrupt memory data, but it breaks the documented and recommended QMD + memory-wiki bridge mode hybrid workflow.

Impact includes:

  • memory-wiki bridge mode becomes non-functional
  • no bridge-backed sources/pages are generated
  • wiki dashboards remain mostly empty except built-in reports
  • users may incorrectly believe their memory plugin does not support bridge export
  • the documented hybrid setup appears broken despite valid config and existing memory files

This is especially confusing because:

  • the memory slot is configured correctly
  • the memory files exist
  • memory-core appears to implement public artifact export
  • the failure mode is silent and presents as “0 artifacts” rather than a clear cache/capability-state warning

Additional information

Environment

  • OpenClaw: 2026.4.11
  • Memory slot: memory-core
  • Memory backend: qmd
  • Context engine: lossless-claw
  • Wiki mode: bridge
  • Obsidian render mode enabled
  • Local macOS environment
  • Relevant config pattern:
    • plugins.slots.memory = "memory-core"
    • plugins.entries.memory-wiki.config.vaultMode = "bridge"
    • plugins.entries.memory-wiki.config.bridge.readMemoryArtifacts = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions