Skip to content

fix(capture): skip "Review the conversation above" internal prompts#1517

Open
SonicBotMan wants to merge 1 commit intoMemTensor:mainfrom
SonicBotMan:fix/review-conversation-prompt-1776871798
Open

fix(capture): skip "Review the conversation above" internal prompts#1517
SonicBotMan wants to merge 1 commit intoMemTensor:mainfrom
SonicBotMan:fix/review-conversation-prompt-1776871798

Conversation

@SonicBotMan
Copy link
Copy Markdown

Summary

Add a content-based filter in captureMessages() to skip "Review the conversation above..." internal agent prompts before they reach storage.

Files changed: apps/memos-local-openclaw/src/capture/index.ts

Changes

+const REVIEW_CONVERSATION_RE = /^Review the conversation above/i;

     if (BOOT_CHECK_RE.test(msg.content.trim())) {
       continue;
     }
+    if (role === "user" && REVIEW_CONVERSATION_RE.test(msg.content.trim())) {
+      continue;
+    }

Why

Internal Hermes → Agent review prompts ("Review the conversation above, consider saving...") are injected with role: "user", bypassing existing filters. They accumulate as noise in the memory chunk store (~37 records per production instance).

See commit: SonicBotMan@512d45a

Skip internal Hermes → Agent review prompts (role:user) at capture time
to prevent them from polluting the memory chunk store.

Added REVIEW_CONVERSATION_RE pattern and corresponding skip check
in captureMessages(), following the same approach as BOOT_CHECK_RE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant