Skip to content

fix: openclaw doctor reports DuplicateOpenClawRuntimeError (false positive) #1873

@yujunos

Description

@yujunos

Pre-submission checklist | 提交前检查

  • I have searched existing issues and this hasn't been mentioned before | 我已搜索现有问题,确认此问题尚未被提及
  • I have read the project documentation and confirmed this issue doesn't already exist | 我已阅读项目文档并确认此问题尚未存在
  • This issue is specific to MemOS and not a general software issue | 该问题是针对 MemOS 的,而不是一般软件问题

Bug Description | 问题描述

Bug Description

When the OpenClaw gateway is running with memos-local-plugin v2.0.6, openclaw doctor always reports:

[plugins] memos-local: duplicate OpenClaw runtime blocked
[plugins] memos-local-plugin failed during register from .../dist/adapters/openclaw/index.js: DuplicateOpenClawRuntimeError: memos-local OpenClaw runtime is already active (pid=<gateway_pid>)

How to Reproduce | 如何重现

The plugin works perfectly in the gateway — onTurnStart, onTurnEnd, and all memory tools function normally. Only openclaw doctor (a separate process) fails.

Root Cause

openclaw doctor is an independent process that also loads plugins. The acquireOpenClawRuntimeLock() function in runtime-lock.js does not distinguish between:

  1. A legitimate duplicate runtime instance (should be blocked)
  2. The openclaw doctor diagnostic process (should be allowed or skipped)

Steps to Reproduce

  1. Install @memtensor/memos-local-plugin via install.sh
  2. Start OpenClaw gateway (openclaw gateway start)
  3. Run openclaw doctor → plugin registration fails with DuplicateOpenClawRuntimeError

Expected Behavior

openclaw doctor should either:

  • Skip memory plugin registration (read-only health check)
  • Use a different lock namespace for diagnostic processes
  • Report "plugin active (OK)" instead of "plugin failed"

Environment

  • Plugin: @memtensor/memos-local-plugin@2.0.6
  • OpenClaw: 2026.5.28
  • Node.js: v24.15.0
  • OS: Ubuntu Linux 6.8.0-117-generic
  • Install method: curl -fsSL .../install.sh | bash

Workaround

The plugin actually works fine. The doctor error is a false positive and can be ignored.

Environment | 环境信息

  • Plugin: @memtensor/memos-local-plugin@2.0.6
  • OpenClaw: 2026.5.28
  • Node.js: v24.15.0
  • OS: Ubuntu Linux 6.8.0-117-generic
  • Install method: curl -fsSL .../install.sh | bash

Additional Context | 其他信息

No response

Willingness to Implement | 实现意愿

  • I'm willing to implement this myself | 我愿意自己解决
  • I would like someone else to implement this | 我希望其他人来解决

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-doneAI task completed successfullybugSomething isn't working | 功能异常help wantedExtra attention is needed | 需要社区帮助pluginPlugin/adapter/bridge layer (apps/ directory) | 插件/适配层

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions