Skip to content

fix: Plugin tools (memos_search etc.) not delivered to OpenClaw sessions despite successful registration #150

Description

@Richard-YAN

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 memos-local-plugin v2.0.10 is loaded in OpenClaw gateway (v2026.7.1-2), the plugin initializes successfully (memos-local: plugin ready in logs) and registers tools via api.registerTool(), but the tools (memos_search, memos_get, memos_timeline, memos_environment, memos_skill_list, memos_skill_get) are not delivered to any session — neither main nor subagent sessions receive them in their tool set.

Environment

  • Plugin: @memtensor/memos-local-plugin@2.0.10
  • OpenClaw: 2026.7.1-2 (0790d9f)
  • Node.js: v24.18.0
  • OS: Ubuntu Linux 6.8.0-90-generic (x64)
  • Config: tools.profile = "coding", tools.alsoAllow = ["memos_search", "memos_get", "memos_timeline", "memos_environment", "memos_skill_list", "memos_skill_get", "group:plugins"]

Symptoms

  1. Gateway log shows memos-local: plugin ready
  2. openclaw plugins inspect shows status: "error", toolNames: []
  3. The DuplicateOpenClawRuntimeError comes from the inspect command's separate process (different PID), not the gateway
  4. Subagent sessions do NOT receive memos_search or any plugin tools

Root Cause Analysis

Issue 1: Double register() call

OpenClaw calls register() twice for the plugin within the same process. Second call fails because first call holds the lock and viewer port.

Issue 2: Lock check doesn't exclude same-PID

acquireOpenClawRuntimeLock throws when it finds an existing lock with a live PID, even for the same process (same PID, different token).

Issue 3 (UNRESOLVED): Tools not delivered to sessions

Even with both issues patched and plugin ready logging successfully, plugin tools are not delivered to sessions. The tool resolution pipeline's hasManifestToolAvailability check appears to fail — the plugin's runtime error status from diagnostic processes may be poisoning tool availability for gateway sessions.

Related Issues

How to Reproduce | 如何重现

Every time when restarting the OpenClaw, can see that MemOS local plugin initialized twice.

Environment | 环境信息

MemOS version : 2.0.10 Local Plugin

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

    area:pluginOpenClaw & Hermesstatus:needs-designNeeds design discussion before implementation | 开发前需要方案设计types:bugSomething isn't working | 功能异常

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions