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>
This commit is contained in:
Ember 🔥
2026-02-13 11:47:43 +11:00
committed by GitHub
parent 7b34b46363
commit da2d09f57a

View File

@@ -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(" ");