Skip to content

fix(capture): filter system-injected boot/heartbeat/sentinel replies from memory (#1298)#1302

Merged
syzsunshine219 merged 1 commit intoMemTensor:mainfrom
hijzy:fix/issue-1298-filter-system-prompts
Mar 23, 2026
Merged

fix(capture): filter system-injected boot/heartbeat/sentinel replies from memory (#1298)#1302
syzsunshine219 merged 1 commit intoMemTensor:mainfrom
hijzy:fix/issue-1298-filter-system-prompts

Conversation

@hijzy
Copy link
Copy Markdown
Collaborator

@hijzy hijzy commented Mar 19, 2026

Summary

Filter out system-injected prompts and sentinel replies that were leaking into long-term memory:

  • Sentinel replies (NO_REPLY, HEARTBEAT_OK, HEARTBEAT_CHECK) are now skipped in captureMessages() for all roles
  • Boot-check prompts (e.g. "You are running a boot check", "## Memory system — ACTION REQUIRED") are filtered before storage
  • stripMemoryInjection() expanded with additional patterns for boot-check text and standalone sentinel values in user messages

修复说明

过滤掉泄露到长期记忆中的系统注入提示和哨兵回复:

  • 哨兵回复(NO_REPLYHEARTBEAT_OKHEARTBEAT_CHECK)在 captureMessages() 中对所有角色跳过
  • 启动检查提示(如"You are running a boot check"、"## Memory system — ACTION REQUIRED")在存储前被过滤
  • stripMemoryInjection() 增加了启动检查文本和用户消息中独立哨兵值的额外匹配模式

Closes #1298

@hijzy hijzy changed the base branch from openclaw-local-plugin-20260317 to openclaw-local-plugin-20260319 March 19, 2026 12:01
@syzsunshine219 syzsunshine219 changed the base branch from openclaw-local-plugin-20260319 to main March 23, 2026 12:28
@syzsunshine219 syzsunshine219 merged commit fd7c058 into MemTensor:main Mar 23, 2026
@hijzy hijzy deleted the fix/issue-1298-filter-system-prompts branch March 24, 2026 02:21
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.

fix: 系统注入的 boot / auto-recall prompt 和 NO_REPLY 会被写进记忆库

2 participants