Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/memos-local-openclaw/src/capture/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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}`);
Expand Down