The user's new preference was saved. The agent still answered with the old one.
Imagine a user tells an agent (an LLM that works through a task step by step) "I prefer Python" in March, and it saves that to long-term memory. In June they say "I've switched to Rust", and that is saved too. Later they open a new chat. Retrieval (the lookup that picks which notes to paste into the prompt) finds both notes and hands the agent the March one.
Nothing was lost. The old fact was simply never overwritten or deleted.
Agent memory exists because an LLM (the model behind a chatbot) remembers nothing between calls, so an agent has to write notes somewhere and paste them back into the next prompt.
It is three places to keep those notes, each lasting a different length of time:
1. Scratchpad: working notes for one task, like a plan, often a file that survives when the context window (the most text a model can read at once) fills up. 2. Short-term memory: the saved record of one conversation. 3. Long-term memory: a database that outlives every conversation.
Long-term memory fails quietly when facts change. Deciding when to overwrite or delete an old memory takes real design, and I haven't seen a single approach that everyone agrees on.
So only store what you'd be happy to see pasted into a prompt months later.