Memory Needs Tenancy Before It Needs Recall

Key Takeaways
- •Honcho 3.6.0 added tenant-scoped keys and row-level security. Isolation is the first thing a shared memory deployment needs and the last a prototype builds.
- •Examines what multi-tenancy means for memory, analyzing the structural bottlenecks and trade-offs in real-world deployments.
- •Provides engineering benchmarks and verification criteria for how the mechanism works.
Honcho released version 3.6.0 on 10 November 2026, adding optional multi-tenancy with tenant-scoped database keys and PostgreSQL row-level security driven by tenant claims in a caller's JSON web token.
The feature is gated and off by default, and that detail is as informative as the feature. A memory service that stores what one user said about their business, and can later surface it to another user, is a data breach with a conversational interface.
What multi-tenancy means for memory
A single-user deployment has one pool of stored facts. A multi-user deployment has many, and the requirement is that a query on behalf of one user returns only that user's records.
The naive implementation adds a tenant column and a filter. Every query includes a where clause, and correctness depends on every query including it.
The PostgreSQL row security documentation describes the mechanism. That works until someone writes a query without the filter. An admin tool, a migration script, a debugging endpoint, a background job that summarises all records. Each is a path that bypasses the convention, and the breach happens in the one that was forgotten.
Row-level security moves the filter below the application. The database enforces a policy that compares a row's tenant against a session variable, and a query without the filter returns nothing rather than everything.
How the mechanism works
PostgreSQL implements this through policies attached to a table. A policy is an expression evaluated per row, and a session variable carries the identity the policy checks against.
The application sets the variable when it opens a connection, typically from a claim in the token that authenticated the request. The database then restricts every statement on that connection to rows matching the claim.
Three properties follow. A query that omits a filter cannot leak, because the policy applies regardless. A compromised application layer cannot read across tenants through the same connection, because the policy is evaluated by the database. And an audit can check that the policy exists rather than trusting that every code path applies a filter.
Where row-level security stops
Four boundaries, and each is a real leak path.
It covers rows in the tables that have policies. A backup file, an exported dataset, a log entry and a vector index live outside that boundary unless each is controlled separately.
It depends on the session variable being set correctly. If the token is malformed or a background job connects without a claim, the behaviour depends on whether the policy defaults to denying. A policy that fails open is worse than no policy, because it creates false confidence.
It does not cover administrative access. A database administrator can read anything, and so can anyone with the connection string of a superuser role.
And it does not cover application-level authorisation. Whether a user may see a particular record within their own tenant is a separate question that row-level security does not answer.
Vector isolation is a distinct problem
A memory system usually stores embeddings alongside text, and an embedding index is a separate system with its own access model.
Three approaches appear. Separate collections per tenant, which isolates completely and multiplies operational overhead. A tenant field in metadata with a filter at query time, which is the vector equivalent of a where clause and inherits its failure mode. And a namespace mechanism offered by the index itself, which is stricter than a metadata filter and still depends on the application passing the right namespace.
The practical risk is that a similarity search is easy to run without a filter. A developer testing a new feature against the index will get plausible results for the wrong tenant, and if the feature ships, that becomes the behaviour.
Deletion is the harder test
A tenant asks for their data to be removed, and the system has to find every copy.
The current records are the obvious target. Superseded versions, if the system keeps history, are easy to miss. Derived summaries are easy to miss. Embeddings in the index are easy to miss because deleting a row does not delete the vector. Cached prompts and response logs may hold the original text. And if a fact was placed in a prompt that the model provider retains for abuse monitoring, a copy exists outside the operator's control.
A memory system that cannot answer where a tenant's facts live cannot honour a deletion request. That makes data mapping a functional requirement, and it is the argument for keeping memory in one store with derivable artefacts rather than scattering it across services.
What to test before trusting isolation
Five tests, each of which should fail on a system without isolation.
Create two tenants, store a distinctive fact in each, and query as one tenant for the other's fact. The query must return nothing.
Attempt the same query with a malformed token. It must fail rather than defaulting to a permissive scope.
Attempt a direct query without any tenant context. It must return nothing rather than everything.
Request deletion for one tenant and then attempt retrieval by several paths, including similarity search and any summarisation endpoint.
And review the backup and log retention policy, because a deletion that leaves copies in archives is a partial deletion.
A system that passes all five has a defensible isolation story. A system that passes the first two and has not considered the last two has a demonstration.
The architectural point
Memory is the component that accumulates the most sensitive data an agent holds, because it is the thing designed to persist. Isolation therefore belongs in the foundation rather than in a later release.
A prototype without tenancy is a reasonable short-term choice. The cost is a migration that touches every query, every index and every export path, and the migration is done under pressure after a customer asks the question rather than at a convenient moment.



