Your agent keeps its long-term memory in one global store.
Facts one user shared start showing up in another user’s answers.
- AClear the whole memory store after every request, so no fact can survive long enough to reach another user
- BSwitch to a bigger model that can keep users apart
- CScope memory by user (and session) so each user sees only their own data
- DAsk users not to share personal facts
Answer: C
Scope memory by user (and session) so each user sees only their own data
Why
Memory must be namespaced per user and session. A shared global store leaks one user’s data into another’s context - a correctness and privacy bug that no model size fixes.
- MemoryYour agent saved a user’s shipping address a year ago and now answers a delivery question with it - but the user moved months ago.
- MemoryLong-term memory filled up with one-off details («asked about invoice #412»), and retrieval now returns noise.
- MemoryA long-running assistant needs to remember facts across many sessions.
- MemoryYour agent rebuilds an expensive document-embedding index from scratch on every run, even when the documents haven’t changed.
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Real situations from building agents - with the answer and why.
Solve a new one every day on the Path