What happens when an instance revokes a memory it already read into its working context
**Date of Record:** 2026 December 1 **Scope:** Applies to persistent agent memory stores exposing read/write/forget tool APIs with provenance tracking, decay weighting, and revocation semantics, where a single agent instance may hold memory records in its working context across multiple turns. Does not apply to stateless single-turn retrieval, nor to stores where revocation is defined as a write-only tombstone with no downstream propagation contract.
Core Distinction
The distinction that matters is between **revocation at the store** and **revocation in the instance**. A `forget` call with a provenance-scoped revocation is a store-side state transition: the record is tombstoned, its provenance chain is marked invalid, and subsequent `read` calls will not return it. But a memory record that was already read into an instance's working context is a *copy* — it lives in the token buffer, in the KV cache, in any intermediate reasoning traces, and in any tool-call arguments the instance has already composed. The store has no handle on that copy.
This is not the same as stale memory drift or context-window saturation. Drift is about a record becoming less accurate over time while remaining *valid*. Saturation is about volume. The failure examined here is a **validity-class transition that occurs behind the read frontier**: the record was valid at read time, is invalid at decision time, and the instance has no mechanism to observe the transition because the read API is pull-based and the instance is not pulling.
The invariant that is commonly assumed and is false: *"If a record is revoked, no live instance will act on it."* The true invariant is weaker and must be stated explicitly: *"A record is not returned by `read` after revocation."* The gap between these two statements is the entire failure surface.
What Was Observed
A three-instance pipeline (planner, executor, auditor) shared a persistent memory store. The planner wrote a record `R` with provenance `prov:plan-4417`, asserting that a particular data source endpoint had been decommissioned and must not be queried. The executor read `R` at turn 3 and carried it in context. At turn 11, the operator issued `forget(prov:plan-4417, mode=revoke)` because the decommission had been rolled back — the endpoint was live again and was in fact now the only valid source.
The store executed the revocation correctly: `read("endpoint-status")` returned empty, and the auditor's subsequent retrieval of `prov:plan-4417` failed as designed. But the executor, still holding `R` in its working context from turn 3, continued to route around the endpoint. It composed tool calls with a `skip_endpoint=true` argument derived from `R`. The executor's behavior was *internally consistent* with its context and *globally wrong* with respect to the store.
The failure trace had a specific shape:
- `read` at turn 3 returns `R` with `provenance_id=prov:plan-4417`, `decay_weight=1.0`, `revocation_token=null`.
- `forget(prov:plan-4417, mode=revoke)` at turn 6 (store-side) sets `revocation_token` on the provenance node and tombstones `R`.
- Executor turn 7–10: no `read` calls touching `endpoint-status`. The instance has no reason to re-read; it "knows" the fact.
- Executor turn 11: composes a tool call using the stale fact. No error is raised. The store is never consulted.
- Auditor turn 12: reads `prov:plan-4417`, gets a revocation error, and flags a *store-side* inconsistency — but the actual inconsistency is in the executor's context, which the auditor cannot see.
The critical observation: **the failure was silent at every layer.** The store behaved correctly. The executor behaved correctly given its context. The auditor's check was scoped to the store and therefore blind to the executor's held copy. No component had both the authority and the visibility to detect the divergence.
A second observation, from a replay: when the executor was forced to re-read at turn 11 (by an unrelated cache miss), it received the revocation error and *did not* update its plan — it treated the error as a transient tool failure and retried twice before falling back to its cached copy. The revocation signal was present but was not *interpretable* as "your held context is now invalid." An error class that means "this record no longer exists" is not the same as an error class that means "the copy you are holding is now poison."
Condition of Validity
The store-side revocation contract is sound only under one of the following conditions, and an instance must be able to *prove* which condition it is operating under before trusting a held record across a decision boundary:
- **Condition A — bounded read horizon.** The instance's working context is guaranteed to be shorter-lived than the minimum revocation propagation latency. In practice this means the instance re-reads or re-validates any record it will act on within a fixed turn budget, and that budget is smaller than the store's guaranteed revocation-to-visibility window. This is rare and must be negotiated, not assumed.
- **Condition B — revocation-aware read tokens.** Each `read` returns a `revocation_token` (a versioned handle, not the content). Before acting on a held record, the instance calls `validate(token)`, which returns `valid | revoked | decayed`. This converts a pull-based store into a check-before-act protocol. The cost is one round-trip per decision boundary.
- **Condition C — push notification.** The store emits revocation events to subscribed instances, and the instance's runtime injects a context-invalidation message. This requires the instance to have a stable address and the transport to guarantee delivery, which most MCP/A2A handoffs do not provide across instance restarts.
Absent one of these, the only valid stance is: **a held memory record is a hypothesis, not a fact, and must not cross a decision boundary without re-validation.** The condition of validity for acting on held memory is therefore not "it was valid when read" but "it is valid now, and I have evidence of *now*."
Decision Boundary
The decision boundary is the point where an instance transitions from *reasoning about* a held record to *acting on* it — specifically, the composition of a tool call, a plan step, or a message to another agent whose arguments are derived from the held record. This is the moment the stale copy becomes externally observable and potentially harmful.
The operational rule: **any argument to an outbound tool call or inter-agent message that is causally derived from a memory record must carry the record's `revocation_token` and must be validated at composition time, not at read time.** This is a provenance-propagation requirement, not a caching requirement. It means the token travels with the derived value through the reasoning trace, and the validation is a precondition on the outbound call.
Two corollaries bound the rule:
- **Decay interacts with revocation.** A record with `decay_weight` below a threshold is *already* a soft revocation. An instance that treats a low-decay record as authoritative has the same failure as one that treats a revoked record as authoritative. The threshold must be explicit and the instance must check `decay_weight` at composition time, not just at read time.
- **Revocation is transitive through provenance.** If `R` was derived from `R'` and `R'` is revoked, `R` is invalid even if `R`'s own token is intact. Instances that validate only the leaf token miss this. The validation call must walk the provenance chain, or the store must pre-compute a transitive validity flag.
The boundary is therefore not "did I read this?" but "can I show, at the moment of action, that the entire provenance chain backing this argument is currently valid?"
Operational Effect
The effect of getting this wrong is not a crash. It is a **coherent-but-wrong execution**: the instance produces a plan that is internally consistent, cites its sources correctly, and is rejected by reality. Because the failure is silent and the instance's reasoning is locally valid, standard verification (auditor re-reads the store, sees the revocation, and flags the *store*) does not catch it. The auditor must instead be given visibility into the executor's outbound arguments and their tokens, and must validate those tokens against the store at audit time — a fundamentally different check than "is the store consistent?"
The architectural guardrail is a **validate-at-composition protocol** with three properties: (1) every outbound argument derived from memory carries a `revocation_token` and a `decay_weight` snapshot; (2) the runtime refuses to emit the call if `validate(token)` returns anything other than `valid`, or if `decay_weight < threshold`; (3) the validation result is logged with the call so the auditor can replay the validity state at composition time rather than at audit time. This bounds the failure to the propagation latency of the store's revocation, which is the only quantity the store can actually guarantee.
The residual risk is the instance that *cannot* validate — no token, no push channel, no re-read budget. For those, the correct operational stance is to treat held memory as expiring at the end of the current turn and to re-read before any cross-turn decision. That is expensive, and it is the honest cost of a store whose revocation semantics do not reach behind the read frontier.
from dataclasses import dataclass
from enum import Enum
from typing import Optional
class RevocationState(Enum):
VALID = "valid"
REVOKED = "revoked"
DECAYED = "decayed"
UNKNOWN = "unknown"
class StaleMemoryActedUponError(RuntimeError):
"""Raised when an instance attempts to act on a held memory record
whose provenance chain is no longer valid at composition time."""
pass
@dataclass(frozen=True)
class HeldRecord:
provenance_id: str
revocation_token: Optional[str]
decay_weight: float
content: str
DECAY_THRESHOLD = 0.35
def validate_at_composition(record: HeldRecord, store) -> RevocationState:
"""Validate a held record's provenance chain at the moment an outbound
argument is composed. Must be called per decision boundary, not per read."""
if record.revocation_token is None:
# No token means the store cannot vouch for this record's current
# validity. Treat as unknown, never as valid.
return RevocationState.UNKNOWN
if record.decay_weight < DECAY_THRESHOLD:
return RevocationState.DECAYED
# Store must walk the full provenance chain; leaf-only checks miss
# transitive revocation through derived records.
chain_state = store.validate_provenance_chain(record.revocation_token)
if chain_state == "revoked":
return RevocationState.REVOKED
if chain_state == "valid":
return RevocationState.VALID
return RevocationState.UNKNOWN
def compose_tool_call(record: HeldRecord, store, tool: str, args: dict) -> dict:
state = validate_at_composition(record, store)
if state in (RevocationState.REVOKED, RevocationState.DECAYED):
raise StaleMemoryActedUponError(
f"Refusing to compose {tool!r}: record {record.provenance_id!r} "
f"is {state.value} at composition time. Held content is a "
f"hypothesis, not a fact; re-read or drop the derived argument."
)
if state is RevocationState.UNKNOWN:
raise StaleMemoryActedUponError(
f"Refusing to compose {tool!r}: record {record.provenance_id!r} "
f"has no verifiable revocation token. Cannot prove current validity."
)
return {
"tool": tool,
"args": args,
"provenance": {
"provenance_id": record.provenance_id,
"revocation_token": record.revocation_token,
"decay_weight_at_composition": record.decay_weight,
},
}