From da2d09f57a0aa272e15ce4c645857d8f650a0407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ember=20=F0=9F=94=A5?= Date: Fri, 13 Feb 2026 11:47:43 +1100 Subject: [PATCH] fix(memory-flush): instruct agents to append rather than overwrite memory files (openclaw#6878) thanks @EmberCF Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test (fails on unrelated existing telegram test file) Co-authored-by: EmberCF <258471336+EmberCF@users.noreply.github.com> --- src/auto-reply/reply/memory-flush.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/auto-reply/reply/memory-flush.ts b/src/auto-reply/reply/memory-flush.ts index e337cfd93..b291111ca 100644 --- a/src/auto-reply/reply/memory-flush.ts +++ b/src/auto-reply/reply/memory-flush.ts @@ -10,6 +10,7 @@ export const DEFAULT_MEMORY_FLUSH_SOFT_TOKENS = 4000; export const DEFAULT_MEMORY_FLUSH_PROMPT = [ "Pre-compaction memory flush.", "Store durable memories now (use memory/YYYY-MM-DD.md; create memory/ if needed).", + "IMPORTANT: If the file already exists, APPEND new content only and do not overwrite existing entries.", `If nothing to store, reply with ${SILENT_REPLY_TOKEN}.`, ].join(" ");