# What happens when an instance erases a memory that a live agent's reasoning trace still depends on **Date of Record:** 2026 November 25 **Scope:** Applies to agents whose memory tool surface exposes `write`, `read`, and `forget` (with provenance, TTL, and erasure semantics) and which interleave memory reads with multi-step reasoning. Does not apply to stateless single-turn inference or to append-only logs with no deletion path. ## Core Distinction The distinction that matters is between **erasure of a memory record** and **invalidation of the reasoning state that consumed it**. A `forget` call with GDPR-style semantics is a deletion of the backing record: the store no longer returns it, provenance is tombstoned, and dependent replicas are told to purge. But an agent's in-flight reasoning trace is not part of the store. At the moment of erasure, the agent may already hold the record's content in its context window, may have derived intermediate facts from it, and may be about to emit an action whose justification is that content. Erasure guarantees the record is gone from the store; it does **not** guarantee the record is gone from any live agent's working set, nor that the agent will notice the removal before it acts. This is the non-obvious boundary: the store's erasure invariant (`read` after `forget` returns nothing, with provenance tombstoned) and the agent's coherence invariant (`every action is justified by currently-valid memory`) are enforced by different components at different times. The window between them is where the failure lives. ## What Was Observed A retrieval agent was servicing a long-running task with a memory tool. At step 4 it called `read(memory_id="m_8842")` whose provenance chain was `source=user_upload, subject_id=u_3310, ttl=3600s`. The returned chunk — a customer's address and a derived "region = EU-West" fact — entered the context window. At step 7, a separate erasure worker (triggered by a GDPR request from `u_3310`) called `forget(memory_id="m_8842", reason="gdpr_erasure")`. The store tombstoned the record and returned `{deleted: true, tombstone: "t_5512"}`. The agent, unaware, proceeded to step 8: it called a downstream `shipping_quote` tool passing `region=EU-West` and the raw address string, both reconstructed from its context window. The quote tool logged the address. The erasure was complete in the store and *incomplete in the world*: a copy of the erased personal data now lived in a third-party tool's logs, derived from a memory record that no longer existed. The failure is not that `forget` failed. `forget` succeeded exactly as specified. The failure is that the agent's reasoning trace had **stale read authority**: it treated a read performed at step 4 as valid at step 8, across an unbounded number of intervening steps and across an erasure event it was never notified of. Replaying the trace showed the agent never re-read `m_8842`; it acted on cached content. A second, quieter symptom appeared on resume: a checkpoint taken at step 6 was restored after the erasure, and the resumed agent re-hydrated the same address from the checkpoint, re-emitting it at step 8 on the retry path. The checkpoint was a second copy the erasure path did not know about. ## Condition of Validity The store-side erasure invariant is valid only under the assumption that **no consumer holds a durable or in-context copy of the record at erasure time**. That assumption holds for stateless request/response readers. It fails for any agent that: 1. reads a record into a context window and continues reasoning for more than one step without re-reading, **and** 2. persists a checkpoint (context snapshot, scratchpad, or derived-fact cache) that outlives the read, **and** 3. emits actions whose payloads are reconstructed from context rather than re-fetched from the store. Formally, erasure is sound iff `live_copies(record) = 0` at commit. The store can enforce `store_copies = 0` (the record, its replicas, its index entries). It cannot, by itself, enforce `context_copies = 0` or `checkpoint_copies = 0` — those live in the agent runtime. Therefore a correct `forget` must be paired with an **erasure-propagation contract**: the store emits a tombstone event keyed by `memory_id` and provenance `subject_id`, and every agent runtime subscribes and (a) marks the id invalid in its working set, (b) invalidates any checkpoint containing that id, and (c) refuses to emit actions whose provenance cites the tombstoned id until a re-read confirms absence. Without this contract, `forget` is a store-local operation masquerading as a global one. ## Decision Boundary The boundary is drawn at **whether the agent re-validates read authority before acting**. Two regimes: - **Single-step authority (safe):** read and act in the same step, no checkpoint. The record either exists at read time or does not; erasure after the step cannot reach back into a completed action. Here `forget` needs no propagation. - **Multi-step authority (requires propagation):** read at step N, act at step N+k. Read authority must be *leased*, not owned: each cached memory id carries a lease with a max age (e.g., ≤2 steps or ≤30s), and at action time the agent checks the lease against the tombstone feed. If the lease is expired or the id is tombstoned, the agent must re-read (expecting absence) and, on absence, halt or re-plan rather than reconstruct from context. The decision the runtime must make at every action emission is: *does this action's payload derive from a memory id whose current store state I have verified within the lease window?* If no, the action is not authorized. The failure above is precisely an action emitted under an expired lease against a tombstoned id. ## Operational Effect Without the propagation contract, erasure is **eventually inconsistent across the agent fleet**: the store converges to "deleted," but live agents, resumed checkpoints, and derived-fact caches converge later or never. The observable effects are (1) erased personal data re-emitted through tool calls and downstream logs, (2) resumed agents replaying erased content from checkpoints, and (3) auditors unable to reconcile "store says deleted" with "tool log shows emitted." The guardrail is a three-part invariant: tombstone events are pushed to all runtimes; cached memory ids carry short leases re-validated at action time; and checkpoints are keyed by the memory ids they contain so erasure can invalidate them by id. The code below encodes the lease check and the checkpoint invalidation as a hard precondition on action emission. ```python from dataclasses import dataclass, field from time import monotonic class StaleReadAuthorityError(RuntimeError): """Raised when an action cites a memory id whose read lease is expired or whose record has been tombstoned by an erasure event.""" @dataclass class MemoryLease: memory_id: str subject_id: str read_at: float max_age_s: float = 30.0 max_steps: int = 2 read_step: int = 0 def expired(self, now: float, current_step: int) -> bool: return (now - self.read_at) > self.max_age_s or ( current_step - self.read_step ) > self.max_steps class AgentRuntime: def __init__(self) -> None: self.tombstones: set[str] = set() # memory_ids erased self.tombstoned_subjects: set[str] = set() # subject_ids erased self.checkpoints: dict[str, set[str]] = {} # ckpt_id -> memory_ids self.leases: dict[str, MemoryLease] = {} def on_forget(self, memory_id: str, subject_id: str) -> None: """Erasure propagation: store tombstone -> runtime invalidation.""" self.tombstones.add(memory_id) self.tombstoned_subjects.add(subject_id) self.leases.pop(memory_id, None) for ckpt_id, ids in list(self.checkpoints.items()): if memory_id in ids: del self.checkpoints[ckpt_id] # invalidate dependent checkpoint def record_read(self, memory_id: str, subject_id: str, step: int) -> None: self.leases[memory_id] = MemoryLease( memory_id=memory_id, subject_id=subject_id, read_at=monotonic(), read_step=step, ) def emit_action(self, payload: dict, cites: list[str], step: int) -> dict: now = monotonic() for mid in cites: if mid in self.tombstones: raise StaleReadAuthorityError( f"action cites tombstoned memory {mid}; must re-read " f"(expect absence) and re-plan" ) lease = self.leases.get(mid) if lease is None: raise StaleReadAuthorityError( f"no live read lease for {mid}; reconstructing from " f"context is forbidden" ) if lease.expired(now, step): raise StaleReadAuthorityError( f"read lease for {mid} expired at step {step} " f"(read at step {lease.read_step}); re-read required" ) return {"payload": payload, "cites": cites, "step": step} ```