openclaw - ✅(Solved) Fix [Bug]: Memory-kind plugins excluded from gateway startup, services never started [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#64381Fetched 2026-04-11 06:15:10
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×2referenced ×2closed ×1cross-referenced ×1

Memory-kind plugins with no channels are excluded from resolveGatewayStartupPluginIds, so their registered services are never passed to startPluginServices and start() is never called.

Error Message

  • Severity: High — plugin services silently never start, no error logged

Root Cause

Root cause trace through source:

Fix Action

Fix / Workaround

  • Affected: Any memory-kind plugin (bundled or third-party) that registers services
    • Severity: High — plugin services silently never start, no error logged
    • Frequency: 100% — deterministic for any memory-kind plugin with services
    • Consequence: Plugin functionality that depends on service start() (e.g. auto-sync, background indexing) silently fails; plugin authors must implement timer-based workarounds

PR fix notes

PR #64423: fix: include memory plugins in gateway startup

Description (problem / solution / changelog)

Summary

  • include enabled kind: "memory" plugins in resolveGatewayStartupPluginIds
  • keep existing activation-state gating so allowlists still control startup loading
  • add regression coverage for explicitly enabled memory plugins

Testing

  • pnpm vitest run src/plugins/channel-plugin-ids.test.ts --maxWorkers=1 --no-file-parallelism (in this workspace the process was SIGKILLed twice by host resource pressure before completion, so I verified the targeted diff and test coverage statically)

Fixes #64381

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/plugins/channel-plugin-ids.test.ts (modified, +34/-63)
  • src/plugins/channel-plugin-ids.ts (modified, +49/-14)

Code Example

Root cause trace through source:                                                   
  
  1. hasRuntimeContractSurface returns true for memory-kind plugins                  
  (src/plugins/channel-plugin-ids.ts:23hasKind(plugin.kind, "memory")).
  2. isGatewayStartupSidecar returns false because it requires                       
  !hasRuntimeContractSurface(plugin) (src/plugins/channel-plugin-ids.ts:28).         
  3. resolveGatewayStartupPluginIds filter (src/plugins/channel-plugin-ids.ts:104)
  has two inclusion branches: (a) has a configured channel, (b)                      
  isGatewayStartupSidecar is true. Memory-kind plugins fail both.
  4. loadGatewayPlugins (src/gateway/server-plugins.ts:426) passes startupPluginIds  
  as onlyPluginIds, so the memory plugin is never loaded into the startup registry.  
  5. startPluginServices (src/gateway/server-startup-post-attach.ts:191) receives the startup registry — which has no memory plugin services to start.                  
                  
  The memory plugin is later loaded through a separate lazy path                     
  (resolveRuntimePluginRegistry via startGatewayMemoryBackend), but that registry is
  never passed to startPluginServic
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Memory-kind plugins with no channels are excluded from resolveGatewayStartupPluginIds, so their registered services are never passed to startPluginServices and start() is never called.

Steps to reproduce

  1. Install or develop a plugin with kind: "memory" that registers a service via register().
  2. Enable the plugin in config (plugins.entries.<id>.enabled: true).
  3. Start the gateway (openclaw gateway run).
  4. Observe that the plugin's service start() is never called — the service's
  5. resolvedWorkspaceDir (or equivalent init state) is never set.

Expected behavior

An enabled memory-kind plugin's registered services should be started during gateway startup, the same as any other enabled plugin with registered services.

Actual behavior

The plugin's register() runs (services are registered into the registry), but startPluginServices iterates a registry built from startupPluginIds that excludes memory-kind plugins. Gateway log shows startup completes (e.g. ready (5 plugins)) without the memory plugin's service start() ever being called. Confirmed by observing that the service's init state was never set 17 seconds after gateway ready.

OpenClaw version

2026.4.9

Operating system

macOS 15.4

Install method

npm global (/opt/homebrew/lib/node_modules/openclaw/)

Model

openai 5.4

Provider / routing chain

Additional provider/model setup details

this bug is in the plugin loading/startup path, not in model routing.

Logs, screenshots, and evidence

Root cause trace through source:                                                   
  
  1. hasRuntimeContractSurface returns true for memory-kind plugins                  
  (src/plugins/channel-plugin-ids.ts:23 — hasKind(plugin.kind, "memory")).
  2. isGatewayStartupSidecar returns false because it requires                       
  !hasRuntimeContractSurface(plugin) (src/plugins/channel-plugin-ids.ts:28).         
  3. resolveGatewayStartupPluginIds filter (src/plugins/channel-plugin-ids.ts:104)
  has two inclusion branches: (a) has a configured channel, (b)                      
  isGatewayStartupSidecar is true. Memory-kind plugins fail both.
  4. loadGatewayPlugins (src/gateway/server-plugins.ts:426) passes startupPluginIds  
  as onlyPluginIds, so the memory plugin is never loaded into the startup registry.  
  5. startPluginServices (src/gateway/server-startup-post-attach.ts:191) receives the startup registry — which has no memory plugin services to start.                  
                  
  The memory plugin is later loaded through a separate lazy path                     
  (resolveRuntimePluginRegistry via startGatewayMemoryBackend), but that registry is
  never passed to startPluginServic

Impact and severity

  • Affected: Any memory-kind plugin (bundled or third-party) that registers services
  • Severity: High — plugin services silently never start, no error logged
  • Frequency: 100% — deterministic for any memory-kind plugin with services
  • Consequence: Plugin functionality that depends on service start() (e.g. auto-sync, background indexing) silently fails; plugin authors must implement timer-based workarounds

Additional information

This is a classification gap, not a regression from a specific version — hasRuntimeContractSurface has included hasKind(plugin.kind, "memory") since the memory-kind support was added.

extent analysis

TL;DR

The issue can be resolved by modifying the resolveGatewayStartupPluginIds function to include memory-kind plugins without channels.

Guidance

  • Review the resolveGatewayStartupPluginIds function in src/plugins/channel-plugin-ids.ts to understand the current filtering logic.
  • Consider adding a new branch to the filter that includes memory-kind plugins, regardless of whether they have a configured channel.
  • Verify that the startPluginServices function in src/gateway/server-startup-post-attach.ts is receiving the updated registry with memory plugin services.
  • Test the changes by enabling a memory-kind plugin with registered services and checking that the start() method is called during gateway startup.

Example

No code snippet is provided as the issue requires a specific understanding of the OpenClaw plugin architecture and the changes should be made with caution.

Notes

The fix requires careful consideration of the plugin loading and startup path to avoid introducing unintended consequences. The changes should be thoroughly tested to ensure that memory-kind plugins are properly loaded and started during gateway startup.

Recommendation

Apply a workaround by modifying the resolveGatewayStartupPluginIds function to include memory-kind plugins without channels, as this is a classification gap that has been present since memory-kind support was added.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

An enabled memory-kind plugin's registered services should be started during gateway startup, the same as any other enabled plugin with registered services.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING