Skip to content

fix(memos-local-openclaw-plugin): integrate stfix(memos-local): report memory status correctly and avoid CLI-spawned viewersatus runtime and gate viewer self-start#1466

Closed
LEVO-Hephaestus wants to merge 1 commit intoMemTensor:openclaw-local-plugin-integrationfrom
LEVO-Hephaestus:fix/memos-local-status-runtime-viewer
Closed

Conversation

@LEVO-Hephaestus
Copy link
Copy Markdown

Summary

This PR fixes two integration issues in the MemOS local OpenClaw plugin:

  1. Register an OpenClaw memory runtime adapter so host status probes can read plugin health correctly
  2. Gate viewer service registration and self-start logic to real gateway processes only

Problem

The plugin could still read and write memory correctly, but openclaw status reported memory as unavailable.

At the same time, CLI processes such as openclaw status could accidentally trigger the plugin's viewer self-start fallback, which caused extra viewer instances to be spawned and fallback ports to be consumed.

Changes

  • add registerMemoryRuntime(...) so OpenClaw can query memory status through the standard runtime interface
  • expose plugin-backed memory status details such as files, chunks, sources, and vector readiness
  • restrict viewer service registration to actual gateway processes
  • prevent non-gateway CLI runs from triggering viewer self-start
  • keep the fix limited to plugin code only

Result

After this change:

  • openclaw status reports normal memory status instead of unavailable
  • memory status can show values such as files, chunks, sources sessions, and vector ready
  • CLI commands no longer spawn extra viewer instances
  • the memory viewer lifecycle stays bound to the gateway process as expected

Notes

This PR does not include any local machine config workarounds or user-specific environment changes.
It only addresses the plugin-side integration and lifecycle issues.

Validation

Validated locally by confirming that:

  • memory read/write was still working before and after the fix
  • openclaw status no longer reported unavailable
  • status output showed plugin-backed memory health information
  • non-gateway CLI commands no longer created additional viewer listeners

@Hun-ger Hun-ger changed the base branch from main to openclaw-local-plugin-integration April 16, 2026 11:51
@Hun-ger
Copy link
Copy Markdown
Collaborator

Hun-ger commented Apr 17, 2026

Thanks for the PR! 🙏

A couple of things to flag:

Multiple window instances — already fixed in our latest release, so this part isn't needed anymore.
openclaw status still shows unavailable — tested on the latest OpenClaw and this PR doesn't resolve it. The issue is actually upstream: the status scan gates on either /.openclaw/memory/main.sqlite existing or an explicit agents.defaults.memorySearch key being present in config — before it ever reaches the plugin runtime. Since MemOS Local uses its own DB path (/.openclaw/memos-local/memos.db), both checks fail and the scan exits early. The registerMemoryRuntime call added here never gets invoked. We'll handle the fix on the plugin side.

Really appreciate you digging into this! 🙌 Love seeing the initiative and the ideas you're bringing—please keep them coming and feel free to continue contributing!

@Hun-ger Hun-ger closed this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants