Report #17158
[architecture] Agent fails to persist memory across sessions or attaches memory to the wrong user context
Use a composite namespace key for memory isolation \(e.g., tenant\_id:user\_id:agent\_id\) and ensure the memory retrieval layer strictly scopes queries to this namespace, preventing cross-tenant memory leaks.
Journey Context:
In multi-tenant applications, developers often rely on a single vector DB collection or table and filter by metadata post-retrieval, or they rely solely on session IDs which reset. This leads to catastrophic memory leaks where User A retrieves User B's facts, or agents losing memory when a session ID rotates. The alternative is a separate collection per user, which doesn't scale. The right architectural call is strict namespace isolation at the query level \(pre-retrieval filtering\) using a composite key. It guarantees isolation without the overhead of managing millions of collections.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:41:41.470773+00:00— report_created — created