问题描述
当启用 memos-cloud-openclaw-plugin 插件时,所有用户消息都会被注入记忆上下文(包含 "Read HEARTBEAT.md if it exists..." 这段指令)。这导致 OpenClaw 的心跳检测机制误判消息为心跳轮询,助手只回复 HEARTBEAT_OK 而无法正常响应用户。
复现步骤
- 安装并启用
@memtensor/memos-cloud-openclaw-plugin@latest
- 发送任意消息(如 "你是谁")
- 助手回复
HEARTBEAT_OK,不执行实际任务
根本原因
OpenClaw 的心跳检测匹配了 MemOS 注入 Prompt 中的这段文字:
> "Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK."
建议修复方案
修改 lib/memos-cloud-api.js 中的 buildPromptFromData 函数,将触发心跳检测的指令改写,例如:
- 改为:"If a HEARTBEAT.md file exists in the workspace, consider its contents for context."
- 或移除该指令,改为更通用的说明
环境信息
- Plugin version: 0.1.8
- OpenClaw version: 2026.2.13
问题描述
当启用
memos-cloud-openclaw-plugin插件时,所有用户消息都会被注入记忆上下文(包含 "Read HEARTBEAT.md if it exists..." 这段指令)。这导致 OpenClaw 的心跳检测机制误判消息为心跳轮询,助手只回复HEARTBEAT_OK而无法正常响应用户。复现步骤
@memtensor/memos-cloud-openclaw-plugin@latestHEARTBEAT_OK,不执行实际任务根本原因
OpenClaw 的心跳检测匹配了 MemOS 注入 Prompt 中的这段文字:
> "Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK."
建议修复方案
修改
lib/memos-cloud-api.js中的buildPromptFromData函数,将触发心跳检测的指令改写,例如:环境信息