diff --git a/apps/memos-local-openclaw/src/capture/index.ts b/apps/memos-local-openclaw/src/capture/index.ts index 10d5282c6..57083b58f 100644 --- a/apps/memos-local-openclaw/src/capture/index.ts +++ b/apps/memos-local-openclaw/src/capture/index.ts @@ -7,6 +7,9 @@ const SYSTEM_BOILERPLATE_RE = /^A new session was started via \/new or \/reset\b // Boot-check / memory-system injection patterns that should never be stored. const BOOT_CHECK_RE = /^(?:You are running a boot check|Read HEARTBEAT\.md if it exists|## Memory system — ACTION REQUIRED)/; +// Agent-internal review prompts — Hermes → Agent instructions, not user content. +const REVIEW_CONVERSATION_RE = /^Review the conversation above/i; + /** * Returns true for sentinel reply values that carry no user-facing content. */ @@ -81,6 +84,10 @@ export function captureMessages( log.debug(`Skipping boot-check injection: ${msg.content.slice(0, 60)}...`); continue; } + if (role === "user" && REVIEW_CONVERSATION_RE.test(msg.content.trim())) { + log.debug(`Skipping agent-internal review prompt: ${msg.content.slice(0, 60)}...`); + continue; + } if (role === "tool" && msg.toolName && SELF_TOOLS.has(msg.toolName)) { log.debug(`Skipping self-tool result: ${msg.toolName}`);