OpenClaw loader coordination (issue #1111)
This document tracks cross-repo behavior between openclaw-hybrid-memory and OpenClaw core for when the memory plugin loads and how heavy work runs.
What this plugin implements
registrationMode === "cli-metadata"—runMemoryHybridRegisterexits early after registering CLI metadata for thehybrid-memroot command (no database or LanceDB initialization). OpenClaw uses this path inloadOpenClawPluginCliRegistry(bundled asloadOpenClawPluginCliRegistryin theopenclawpackage).- Full registration — unchanged for gateway, agents, and
openclaw hybrid-mem …when the host performs a full plugin load withregistrationMode === "full". - Deferred work — non-critical startup checks (e.g. Python document-bridge dependency probing) may run from the plugin service
start()hook instead of synchronously duringregister(), where safe.
What belongs in OpenClaw core (upstream)
These items require changes or policy in the openclaw repository, not only in this plugin:
- Empty
onlyPluginIdsscope — WhenensurePluginRegistryLoaded({ scope: "channels" })resolves to an empty channel plugin list, the loader should not treat that as “no filter.” Today, normalizing an empty list toundefinedcan cause all plugins (including the memory slot) to load for scoped CLI paths such asopenclaw status/openclaw health. A core fix is to interpret “no channel plugins” as “load no channel plugins,” not “load everything.” - CLI bootstrap policy — Optionally load or activate memory-slot plugins only for gateway, agent/node runs, and explicit
hybrid-mem(or equivalent), and not for unrelated operational CLI commands. This is a loader / CLI taxonomy decision. activate: false— Core still invokesregister()when building some reports; plugins should minimize work inregister()for those paths, but cannot fully skip execution if core always imports and callsregister().
Link the upstream issue or PR here when filed: (add URL).