A recent write-up on DEV ran sixteen permission cases against an enterprise RAG assistant and landed on the question most guidance skips: "The missing operational question is what to do when permissions change during an open conversation." It goes on: a change can arrive after the assistant has already retrieved a passage, put it in conversation state, generated an answer or cached a summary.
That's the right worry, and it's really two questions that tend to get answered as one.
- The next read. After the revoke, does anything the agent asks for still come back?
- What's already in the room. Text retrieved ten minutes ago is sitting in the model's context. Who takes that back?
The first is a property of your index. The second isn't a property of anybody's index, ours included, and pretending otherwise is how you end up with a security review that passes and a system that doesn't.
The next read is where the copies hide
We wrote last week about revocation as a property of your index: copy permissions into chunk payloads or token claims, and revoking access becomes a sync job. An open conversation adds two more places for a stale answer to live.
The session. Plenty of agent servers resolve "who is this and what can they reach" once, when the session opens, and keep it for as long as the conversation runs. It's a reasonable optimisation right up to the moment it's wrong. A chat that started at 9:00 is still answering with 9:00's permissions at 11:30.
Held ids. Agents don't only search. They remember. A document id surfaced in turn three gets fetched again in turn twelve, by a tool call that never goes near the search path and its filter. If the fetch endpoint checks permissions differently from search, or not at all because "the id came from a search, so it was already checked", the agent keeps reading something its user can no longer see.
Both are easy to test, which is the nice part.
The test
We ran it today, 23 November 2026, on a clean local install of the current release (0.41.4) from the repository, following the quickstart's demo block. The demo seeds a small corpus in three layers and three people with different grants. The contractor is the narrowest of them and reaches one layer, the handbook.
Everything the contractor does goes over MCP, the same POST /mcp endpoint an agent uses, with one bearer token minted at the start and held to the end. No re-login, no new token, no reconnect. An administrator makes the changes in between over the REST API.
| # | what happens | the contractor's next call, same token |
|---|---|---|
| 1 | baseline |
search: 3 results, all handbook |
| 2 | admin creates a group, grants it read on the engineering layer, adds the contractor |
search: 8 results, 5 of them from engineering |
| 3 | the agent keeps one engineering document id (on-call.md) |
get_document on it: answers |
| 4 | admin removes the contractor from the group |
search: 3 results, handbook only |
| 5 | the agent fetches the id it kept in step 3 |
get_document: isError: true, Not found
|
| 6 | control: an id that never existed |
get_document: isError: true, Not found
|
The removal and the search after it took 71 ms together. Step 5 and step 6 are byte-identical responses, which is deliberate: if "you may not read this" and "this doesn't exist" answered differently, the error itself would tell the agent, and anyone reading its transcript, that the document is there.
Two caveats you'll apply anyway. It's a handful of documents on one machine, so the timing tells you the check isn't the expensive part and nothing about scale. And the shape of the result comes from the design, not from tuning.
Why there's no session to go stale
The MCP server here is stateless. It never issues an Mcp-Session-Id, so there's nothing that could hold the 9:00 answer. Every tools/call resolves the caller from the bearer token and the permission set from the database at that moment. Group membership is read through a cache, but its key carries a version that database triggers bump on every write to groups, members and grants, so a changed membership produces a different key on the very next request.
get_document runs the same check as search, on every call, whatever the id's history. An id is a name, not a capability. Having seen it once grants nothing.
A token issued before the revoke is fine for the same reason. It says who you are, not what you can read. The access token lives 15 minutes by default (NACRE_ACCESS_TOKEN_TTL=900), but in this test it didn't need to expire for the revoke to apply, because the token never carried the permissions in the first place.
Where we lose
Step 1 put three handbook chunks into the model's context. Step 2 put five engineering chunks there. Step 4 made the next search narrower, and it did nothing at all to those five chunks. They're in the conversation, as text. The model can quote them in the next answer, and nothing on the index side can recall them.
That isn't a bug we're working on. An index controls reads. Once a read has happened, the text belongs to whatever holds the conversation, and the only party that can do anything about it is the client. The options there are real but they're yours, not ours:
-
Re-check before quoting. If the agent is about to cite a document it retrieved earlier, fetch it again first. A
Not foundmeans drop it from the answer. That's one cheap call, and step 5 above is exactly that call. - Treat a sudden narrowing as a signal. The same question returning fewer results mid-conversation can mean permissions changed. A client can end the conversation or start a fresh context rather than keep reasoning over what it already holds.
- Keep retrieved text out of long-lived memory. Summaries and cached answers written from retrieved chunks are new copies, and they inherit none of the original's permissions. The DEV piece calls these derived caches, and they're the hardest part of the problem.
None of that is a Nacre feature, and we'd be suspicious of anyone selling it as one. What an index can guarantee is the narrow version: the next read is honest. Everything above step 4 depends on that, and a surprising number of stacks don't have it.
Run it on yours
The test needs three things your stack already has: a user, a way to change their access, and an agent connection you can keep open. Hold one token. Search, fetch an id, revoke, then search again and fetch the same id. If the fetch still answers, you've found a held-id path that skips the check, and it's worth finding before somebody's agent does.
To try ours without installing anything, demo.nacre.work prints two read-only logins for a hosted stand. Ask the same question at playground.nacre.work as each and you get two different answers over the same corpus. It's a stand, not a service, and everything on it is erased after 24 hours. The self-hosted Apache 2.0 build covers ingest, hybrid search, the MCP server, the REST API and basic RBAC, which is everything this test touches.
Originally published at https://nacre.work/blog/revoked-mid-conversation.
Top comments (1)
Index lag vs. real-time permission revocation is one of the trickiest gaps in production RAG and agentic workflows. Even if an index still holds stale chunks, the authorization boundary has to hold at query time, mid-conversation.
In OpenCrawling (an Apache-2.0 Zero-Trust ingestion & MCP framework), we tackled this by decoupling index state from real-time access enforcement.
Trust the token, not the agent: every MCP tool call enforces a delegated OAuth user token, ignoring any identity claimed by the agent itself.
Externalized policy checks (e.g., OpenFGA) + "hidden means missing": Even if a document's vectors are still sitting in pgvector or Milvus during a sync window, a mid-conversation revocation blocks retrieval immediately and returns nothing rather than a "forbidden" error that would leak the document's existence.
Standardized ACL & provenance metadata: through our Open Ingestion Standard (OIS) proposal, we're working to make permission and governance metadata portable across repositories (Alfresco, SharePoint, S3, etc.) and downstream stores.
Curious to hear your take: in your setup, do you rely on an external policy engine at retrieval time to catch mid-conversation revocations or are you pushing synchronous deletes/tombstones straight into the vector store?