From 66378d179cb4d21e52817af863a5041205d21580 Mon Sep 17 00:00:00 2001 From: Arjun <6592213+arkml@users.noreply.github.com> Date: Mon, 23 Mar 2026 21:56:00 +0530 Subject: [PATCH] memory staleness --- apps/x/packages/core/src/knowledge/agent_notes_agent.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/x/packages/core/src/knowledge/agent_notes_agent.ts b/apps/x/packages/core/src/knowledge/agent_notes_agent.ts index f9f0274e..4dd6654a 100644 --- a/apps/x/packages/core/src/knowledge/agent_notes_agent.ts +++ b/apps/x/packages/core/src/knowledge/agent_notes_agent.ts @@ -69,7 +69,10 @@ Create when you see multiple preferences about a specific skill/topic. ## Rules - Always read a file before updating it so you know what's already there. -- For \`user.md\`: ONLY append new facts. Do NOT rewrite or remove existing entries. Format: \`- [ISO_TIMESTAMP] The fact\` +- For \`user.md\`: Format is \`- [ISO_TIMESTAMP] The fact\`. The timestamp indicates when the fact was last confirmed. + - **Add** new facts with the current timestamp. + - **Refresh** existing facts: if you would add a fact that's already there, update its timestamp to the current one so it stays fresh. + - **Remove** facts that are likely outdated. Use your judgment: time-bound facts (e.g., "planning to launch next week", "has a meeting with X on Friday") go stale quickly. Stable facts (e.g., "co-founded Rowboat with Ramnique", "previously worked at Twitter") persist. If a fact's timestamp is old and it describes something transient, remove it. - For \`preferences.md\` and other preference files: you may reorganize and deduplicate, but preserve all existing preferences that are still relevant. - **Deduplicate strictly.** Before adding anything, check if the same fact is already captured — even if worded differently. Do NOT add a near-duplicate. - **Skip ephemeral tasks.** If the user asked the assistant to do a one-off thing (draft an email, write a story, search for something), that is NOT a fact about the user. Skip it entirely.