Skip to content

fix(cli): load memory plugin for doctor/status when registry is cold#76393

Merged
clawsweeper[bot] merged 3 commits into
openclaw:mainfrom
neeravmakwana:fix/76367-doctor-memory-standalone
May 3, 2026
Merged

fix(cli): load memory plugin for doctor/status when registry is cold#76393
clawsweeper[bot] merged 3 commits into
openclaw:mainfrom
neeravmakwana:fix/76367-doctor-memory-standalone

Conversation

@neeravmakwana

Copy link
Copy Markdown
Contributor

Summary

Ensures resolveActiveMemoryBackendConfig / getActiveMemorySearchManager load the configured memory-slot plugin in standalone CLI processes (e.g. openclaw doctor, openclaw status) when no gateway has already activated the plugin registry.

Root cause

Those entrypoints rely on getMemoryRuntime(), which is populated when a memory plugin registers its runtime during plugin activation. They only called getLoadedRuntimePluginRegistry, which checks for an existing active registry and does not load plugins. The openclaw memory CLI uses memory-core’s in-package search manager and does not depend on that global registration path, so operators saw working memory search plus false “no active memory plugin” diagnostics from doctor / null memory in status JSON.

Linked issue

Fixes #76367.

Why this is safe

  • Scoped fallback: only runs when a non-empty memory slot is configured, the active registry check did not yield a memory runtime, and we then call the same ensureStandaloneRuntimePluginRegistryLoaded + loadOpenClawPlugins path used elsewhere for minimal plugin loads (onlyPluginIds = slot id, config + resolved default-agent workspace).
  • No change to memory search authorization, embedding policy, or gateway session controls—this is registration/diagnostics alignment only.

Security / runtime controls (unchanged)

  • Plugin allow/deny and activation semantics are still enforced by loadOpenClawPlugins.
  • No new network calls or secret handling; workspace resolution matches existing agent-scope helpers used by other CLI surfaces.

Testing

  • pnpm vitest run src/plugins/memory-runtime.test.ts --reporter=dot
  • pnpm vitest run src/commands/doctor-memory-search.test.ts --reporter=dot
  • pnpm check:changed

AI-assisted

Per project guidance: this change was developed with AI assistance; behavior was verified via the tests and checks above.

Out of scope / follow-ups

  • Broader consolidation of memory-cli vs registry-backed memory resolution.
  • E2E doctor run against a full user LaunchAgent setup (covered by unit/integration patterns above).

Made with Cursor

@clawsweeper

clawsweeper Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

Summary
The PR adds a scoped standalone memory-slot plugin load for doctor/status memory resolution, updates memory-runtime regression tests, and adds a changelog fix entry.

Reproducibility: yes. source-reproducible: current main's doctor/status path reads getMemoryRuntime after only checking an already-loaded registry, while memory-core registers that runtime only during plugin activation. I did not run a live macOS LaunchAgent reproduction.

Next step before merge
No repair job is needed from this review; the automerge-labeled PR has no blocking findings and should proceed through exact-head CI and mergeability gates.

Security
Cleared: The diff is limited to existing TypeScript runtime resolution, focused tests, and changelog text; it adds no dependencies, workflows, permissions, downloaded artifacts, or new secret handling.

Review details

Best possible solution:

Land the scoped standalone runtime fallback once exact-head checks pass, and keep broader memory CLI/runtime consolidation as a separate follow-up if maintainers still want it.

Do we have a high-confidence way to reproduce the issue?

Yes, source-reproducible: current main's doctor/status path reads getMemoryRuntime after only checking an already-loaded registry, while memory-core registers that runtime only during plugin activation. I did not run a live macOS LaunchAgent reproduction.

Is this the best way to solve the issue?

Yes. The PR preserves the existing fast path and uses the existing standalone runtime loader scoped to only the selected memory-slot plugin, which is the narrow maintainable fix for the reported diagnostic mismatch.

What I checked:

  • Current main cold-registry gap: On current main, ensureMemoryRuntime only calls getLoadedRuntimePluginRegistry for the selected memory slot and then returns getMemoryRuntime, so it checks for an already-loaded registry without forcing plugin activation. (src/plugins/memory-runtime.ts:20, 39bc94e4ddf5)
  • Doctor false-warning surface: Doctor reports 'No active memory plugin is registered for the current config.' when resolveActiveMemoryBackendConfig returns null. (src/commands/doctor-memory-search.ts:337, 39bc94e4ddf5)
  • Status shares the affected runtime lookup: Status obtains memory details through getActiveMemorySearchManager, so the same missing runtime registration can produce a null memory manager. (src/commands/status.scan.deps.runtime.ts:19, 39bc94e4ddf5)
  • memory-core runtime registration: The bundled memory-core plugin registers its MemoryPluginRuntime during plugin activation via registerMemoryCapability, matching the PR's diagnosis that activation is needed before getMemoryRuntime can succeed. (extensions/memory-core/index.ts:177, 39bc94e4ddf5)
  • PR scoped fallback: The PR falls back to ensureStandaloneRuntimePluginRegistryLoaded with requiredPluginIds/onlyPluginIds set to the configured memory slot and the resolved workspace after preserving the already-loaded fast path. (src/plugins/memory-runtime.ts:41, a6a196731667)
  • PR coverage and changelog: The PR adds regression coverage for cold scoped load, custom memory slot load, disabled/global-disabled cases, denied/entry-disabled slots, already-registered runtime reuse, and includes the required user-facing changelog entry. (src/plugins/memory-runtime.test.ts:206, a6a196731667)

Likely related people:

  • steipete: Recent history moved memory engine behavior into the memory plugin and maintained nearby doctor memory diagnostics. (role: memory plugin/runtime maintainer; confidence: high; commits: cad83db8b2f7, 0f5a77d05872, c6617c31554e; files: src/plugins/memory-runtime.ts, src/commands/doctor-memory-search.ts, extensions/memory-core/index.ts)
  • vincentkoc: Recent commits scoped memory runtime plugin loading, preserved activation provenance, and reduced static import seams around this runtime path. (role: recent memory-runtime and plugin-loader maintainer; confidence: medium; commits: b96a75c95b54, 7198a9f0eeed, 982383338373; files: src/plugins/memory-runtime.ts, src/plugins/runtime/standalone-runtime-registry-loader.ts, src/commands/status.scan.deps.runtime.ts)
  • Takhoffman: Recent merged work fixed memory runtime auto-enable/shutdown behavior, and Takhoffman explicitly opted this PR into ClawSweeper automerge in the discussion. (role: adjacent memory runtime maintainer and automerge requester; confidence: medium; commits: 63e35b2d9d05, ec122796f864, 847739d82c60; files: src/plugins/memory-runtime.ts, extensions/memory-core/index.ts)

Remaining risk / open question:

  • No local tests were run because this task required read-only review only; the PR body and prior ClawSweeper comment report targeted tests plus pnpm check:changed.
  • Exact-head GitHub checks were not fully complete at review time, so automerge should wait for the normal required-check gate.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 39bc94e4ddf5.

@neeravmakwana

Copy link
Copy Markdown
Contributor Author

Re: [P3] changelog attribution (CHANGELOG.md) — Done. The Unreleased Fixes bullet for the standalone doctor/status memory diagnostic fix now ends with Thanks @neeravmakwana. on the same line as Fixes #76367., matching the contributor-credit convention.

@Takhoffman

Copy link
Copy Markdown
Contributor

@clawsweeper auto merge

@Takhoffman

Copy link
Copy Markdown
Contributor

@clawsweeper automerge

@clawsweeper clawsweeper Bot added the clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge label May 3, 2026
@clawsweeper

clawsweeper Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

🦞🦞
ClawSweeper merged this PR after the passing review.

Source: clawsweeper[bot]
Feedback: structured ClawSweeper verdict: pass (sha=a6a19673166735a59aad64e5c485e3263cda2603)
Merge status: merged by ClawSweeper automerge
Merged at: 2026-05-03T07:38:56Z
Merge commit: b6cbd9225c91

What merged:

  • The PR adds a scoped standalone memory-slot plugin load for doctor/status memory resolution, updates memory-runtime regression tests, and adds a changelog fix entry.
  • Reproducibility: yes. source-reproducible: current main's doctor/status path reads getMemoryRuntime after on ... registers that runtime only during plugin activation. I did not run a live macOS LaunchAgent reproduction.

Automerge notes:

  • PR branch already contained follow-up commit before automerge: fix(cli): load memory plugin for doctor/status when registry is cold

The automerge loop is complete.

Automerge progress:

  • 2026-05-03 06:36:01 UTC repair queued [`df5167f04a66`](https://github.com/openclaw/openclaw/commit/df5167f04a66f525bad5230de662d2db446147b9) (autonomous) Run: https://github.com/openclaw/clawsweeper/actions/runs/25272101832
  • 2026-05-03 06:52:45 UTC repair completed [`a23d0b52c3c4`](https://github.com/openclaw/openclaw/commit/a23d0b52c3c4b0bd524ac950a393bf6a0608594f) (branch updated) in 13m 52s Run: https://github.com/openclaw/clawsweeper/actions/runs/25272101832 initial automerge rebase is delegated to Codex repair
  • 2026-05-03 06:52:45 UTC review queued [`a23d0b52c3c4`](https://github.com/openclaw/openclaw/commit/a23d0b52c3c4b0bd524ac950a393bf6a0608594f) (after repair)
  • 2026-05-03 04:09:20 UTC review queued [`a23d0b52c3c4`](https://github.com/openclaw/openclaw/commit/a23d0b52c3c4b0bd524ac950a393bf6a0608594f) (queued)
  • 2026-05-03 06:56:40 UTC repair queued [`a23d0b52c3c4`](https://github.com/openclaw/openclaw/commit/a23d0b52c3c4b0bd524ac950a393bf6a0608594f) (autonomous) Run: https://github.com/openclaw/clawsweeper/actions/runs/25272497031
  • 2026-05-03 06:56:43 UTC review passed [`a23d0b52c3c4`](https://github.com/openclaw/openclaw/commit/a23d0b52c3c4b0bd524ac950a393bf6a0608594f) (structured ClawSweeper verdict: pass (sha=a23d0b52c3c4b0bd524ac950a393bf6a06085...)
  • 2026-05-03 07:15:15 UTC repair completed [`62a49d17ddab`](https://github.com/openclaw/openclaw/commit/62a49d17ddab68e21887fa5a453c4e655c2c9fe9) (branch updated) in 15m 37s Run: https://github.com/openclaw/clawsweeper/actions/runs/25272497031 initial automerge rebase is delegated to Codex repair
  • 2026-05-03 07:15:15 UTC review queued [`62a49d17ddab`](https://github.com/openclaw/openclaw/commit/62a49d17ddab68e21887fa5a453c4e655c2c9fe9) (after repair)
  • 2026-05-03 04:09:33 UTC review queued [`62a49d17ddab`](https://github.com/openclaw/openclaw/commit/62a49d17ddab68e21887fa5a453c4e655c2c9fe9) (queued)
  • 2026-05-03 07:17:29 UTC repair queued [`62a49d17ddab`](https://github.com/openclaw/openclaw/commit/62a49d17ddab68e21887fa5a453c4e655c2c9fe9) (autonomous) Run: https://github.com/openclaw/clawsweeper/actions/runs/25272895937
  • 2026-05-03 07:19:30 UTC review passed [`62a49d17ddab`](https://github.com/openclaw/openclaw/commit/62a49d17ddab68e21887fa5a453c4e655c2c9fe9) (structured ClawSweeper verdict: pass (sha=62a49d17ddab68e21887fa5a453c4e655c2c9...)
  • 2026-05-03 07:26:47 UTC review queued [`62a49d17ddab`](https://github.com/openclaw/openclaw/commit/62a49d17ddab68e21887fa5a453c4e655c2c9fe9) (queued)
  • 2026-05-03 07:34:48 UTC repair completed [`a6a196731667`](https://github.com/openclaw/openclaw/commit/a6a19673166735a59aad64e5c485e3263cda2603) (branch updated) in 14m 41s Run: https://github.com/openclaw/clawsweeper/actions/runs/25272895937 initial automerge rebase is delegated to Codex repair
  • 2026-05-03 07:34:47 UTC review queued [`a6a196731667`](https://github.com/openclaw/openclaw/commit/a6a19673166735a59aad64e5c485e3263cda2603) (after repair)
  • 2026-05-03 07:38:09 UTC review passed [`a6a196731667`](https://github.com/openclaw/openclaw/commit/a6a19673166735a59aad64e5c485e3263cda2603) (structured ClawSweeper verdict: pass (sha=a6a19673166735a59aad64e5c485e3263cda2...)
  • 2026-05-03 07:38:58 UTC merged [`a6a196731667`](https://github.com/openclaw/openclaw/commit/a6a19673166735a59aad64e5c485e3263cda2603) (merged by ClawSweeper automerge)

@clawsweeper clawsweeper Bot added the clawsweeper:human-review Needs maintainer review before ClawSweeper can continue label May 3, 2026
@clawsweeper

clawsweeper Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

🦞🦞
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: structured ClawSweeper verdict: needs-human (sha=59072a250676c9f2fe3a9ef22abbcf76152cff5a)

I added clawsweeper:human-review and left the final call with a maintainer.

@clawsweeper clawsweeper Bot removed the clawsweeper:human-review Needs maintainer review before ClawSweeper can continue label May 3, 2026
@clawsweeper clawsweeper Bot force-pushed the fix/76367-doctor-memory-standalone branch 3 times, most recently from a23d0b5 to 62a49d1 Compare May 3, 2026 07:15
neeravmakwana and others added 3 commits May 3, 2026 07:31
Standalone doctor and status called resolveActiveMemoryBackendConfig without
ever loading the configured memory-slot plugin, so getMemoryRuntime stayed
empty while memory search CLI still worked. Fall back to
ensureStandaloneRuntimePluginRegistryLoaded with the slot plugin id and
resolved workspace when the active registry does not yet expose memory.

Fixes openclaw#76367.

Co-authored-by: Cursor <cursoragent@cursor.com>
@clawsweeper clawsweeper Bot force-pushed the fix/76367-doctor-memory-standalone branch from 62a49d1 to a6a1967 Compare May 3, 2026 07:34
@clawsweeper clawsweeper Bot merged commit b6cbd92 into openclaw:main May 3, 2026
100 of 101 checks passed
lxe pushed a commit to lxe/openclaw that referenced this pull request May 6, 2026
…penclaw#76393)

Summary:
- The PR adds a scoped standalone memory-slot plugin load for doctor/status memory resolution, updates memory-runtime regression tests, and adds a changelog fix entry.
- Reproducibility: yes. source-reproducible: current main's doctor/status path reads getMemoryRuntime after on ...  registers that runtime only during plugin activation. I did not run a live macOS LaunchAgent reproduction.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): load memory plugin for doctor/status when registry is cold

Validation:
- ClawSweeper review passed for head a6a1967.
- Required merge gates passed before the squash merge.

Prepared head SHA: a6a1967
Review: openclaw#76393 (comment)

Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
…penclaw#76393)

Summary:
- The PR adds a scoped standalone memory-slot plugin load for doctor/status memory resolution, updates memory-runtime regression tests, and adds a changelog fix entry.
- Reproducibility: yes. source-reproducible: current main's doctor/status path reads getMemoryRuntime after on ...  registers that runtime only during plugin activation. I did not run a live macOS LaunchAgent reproduction.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): load memory plugin for doctor/status when registry is cold

Validation:
- ClawSweeper review passed for head a6a1967.
- Required merge gates passed before the squash merge.

Prepared head SHA: a6a1967
Review: openclaw#76393 (comment)

Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
greench-ai pushed a commit to greench-ai/nexisclaw that referenced this pull request May 12, 2026
…(#76393)

Summary:
- The PR adds a scoped standalone memory-slot plugin load for doctor/status memory resolution, updates memory-runtime regression tests, and adds a changelog fix entry.
- Reproducibility: yes. source-reproducible: current main's doctor/status path reads getMemoryRuntime after on ...  registers that runtime only during plugin activation. I did not run a live macOS LaunchAgent reproduction.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): load memory plugin for doctor/status when registry is cold

Validation:
- ClawSweeper review passed for head a6a19673166735a59aad64e5c485e3263cda2603.
- Required merge gates passed before the squash merge.

Prepared head SHA: a6a19673166735a59aad64e5c485e3263cda2603
Review: openclaw/openclaw#76393 (comment)

Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
markfietje pushed a commit to markfietje/openclaw that referenced this pull request May 20, 2026
…(#76393)

Summary:
- The PR adds a scoped standalone memory-slot plugin load for doctor/status memory resolution, updates memory-runtime regression tests, and adds a changelog fix entry.
- Reproducibility: yes. source-reproducible: current main's doctor/status path reads getMemoryRuntime after on ...  registers that runtime only during plugin activation. I did not run a live macOS LaunchAgent reproduction.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): load memory plugin for doctor/status when registry is cold

Validation:
- ClawSweeper review passed for head a6a19673166735a59aad64e5c485e3263cda2603.
- Required merge gates passed before the squash merge.

Prepared head SHA: a6a19673166735a59aad64e5c485e3263cda2603
Review: openclaw/openclaw#76393 (comment)

Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
markfietje pushed a commit to markfietje/openclaw that referenced this pull request May 20, 2026
…(#76393)

Summary:
- The PR adds a scoped standalone memory-slot plugin load for doctor/status memory resolution, updates memory-runtime regression tests, and adds a changelog fix entry.
- Reproducibility: yes. source-reproducible: current main's doctor/status path reads getMemoryRuntime after on ...  registers that runtime only during plugin activation. I did not run a live macOS LaunchAgent reproduction.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): load memory plugin for doctor/status when registry is cold

Validation:
- ClawSweeper review passed for head a6a19673166735a59aad64e5c485e3263cda2603.
- Required merge gates passed before the squash merge.

Prepared head SHA: a6a19673166735a59aad64e5c485e3263cda2603
Review: openclaw/openclaw#76393 (comment)

Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
…penclaw#76393)

Summary:
- The PR adds a scoped standalone memory-slot plugin load for doctor/status memory resolution, updates memory-runtime regression tests, and adds a changelog fix entry.
- Reproducibility: yes. source-reproducible: current main's doctor/status path reads getMemoryRuntime after on ...  registers that runtime only during plugin activation. I did not run a live macOS LaunchAgent reproduction.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): load memory plugin for doctor/status when registry is cold

Validation:
- ClawSweeper review passed for head a6a1967.
- Required merge gates passed before the squash merge.

Prepared head SHA: a6a1967
Review: openclaw#76393 (comment)

Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
…penclaw#76393)

Summary:
- The PR adds a scoped standalone memory-slot plugin load for doctor/status memory resolution, updates memory-runtime regression tests, and adds a changelog fix entry.
- Reproducibility: yes. source-reproducible: current main's doctor/status path reads getMemoryRuntime after on ...  registers that runtime only during plugin activation. I did not run a live macOS LaunchAgent reproduction.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): load memory plugin for doctor/status when registry is cold

Validation:
- ClawSweeper review passed for head a6a1967.
- Required merge gates passed before the squash merge.

Prepared head SHA: a6a1967
Review: openclaw#76393 (comment)

Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
…penclaw#76393)

Summary:
- The PR adds a scoped standalone memory-slot plugin load for doctor/status memory resolution, updates memory-runtime regression tests, and adds a changelog fix entry.
- Reproducibility: yes. source-reproducible: current main's doctor/status path reads getMemoryRuntime after on ...  registers that runtime only during plugin activation. I did not run a live macOS LaunchAgent reproduction.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): load memory plugin for doctor/status when registry is cold

Validation:
- ClawSweeper review passed for head a6a1967.
- Required merge gates passed before the squash merge.

Prepared head SHA: a6a1967
Review: openclaw#76393 (comment)

Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: doctor reports no active memory plugin while bundled memory-core is selected and working

2 participants