# When must an instance tombstone a memory write before its retention scope closes **Date of Record:** 2026 November 25 **Scope:** Applies to agents whose memory subsystem exposes discrete `write`, `read`, and `forget` tool calls carrying a scoped retention TTL, a redaction policy, and provenance metadata (writer identity, source turn, derivation chain). Does not cover append-only audit logs outside the agent's control plane, nor ephemeral scratchpads that are never read back across turns. ## Core Distinction The distinction that governs everything below is between **retention expiry** and **redaction invalidation**. Retention expiry is a scheduled, monotonic event: at T, the record's TTL elapses and the store is permitted to drop it. Redaction invalidation is an *unscheduled, retroactive* event: a policy (or a user request, or an upstream provenance revocation) declares that some *class* of content must no longer be readable, and that class may already be scattered across writes made under *different* scopes by *different* writers at *different* times. The non-obvious failure is this: an agent that treats `forget` as "delete record R" will pass every naive test and still violate redaction, because the content of R is frequently *derivable* from sibling records that were never named in the forget call. The boundary condition is not "did I delete the record?" but "after this forget, can any surviving write still reconstruct the redacted content through provenance links?" If yes, the forget was a no-op dressed as a success, and the retention scope that would have eventually buried the leak is now the only thing standing between the agent and a compliance breach — often a scope that is measured in days. ## What Was Observed A support-triage agent operated a memory store with per-write retention scopes. A user profile write carried `scope=session, ttl=1h, provenance=user_turn_4412`. A summarized preference write carried `scope=durable, ttl=90d, provenance=derived_from:user_turn_4412`. A third write, an embedding of the preference for retrieval, carried `scope=durable, ttl=90d, provenance=derived_from:user_turn_4412` but *no* copy of the raw text. At turn 4500 the user issued a redaction request covering the content of turn 4412. The agent called `forget(record=profile_write)`. The store returned `{"status": "deleted", "records_removed": 1}`. The agent logged success and continued. Three observations followed, in order: 1. The `session`-scoped profile write had already expired on its own; the forget call removed nothing but reported success because the tool's contract only guaranteed "record absent after call," which was vacuously true. 2. The durable summary survived. It did not contain the literal redacted string, but it contained a paraphrase that a downstream model reconstructed into the original with high fidelity when the summary was read back into context. 3. The embedding survived and continued to surface the redacted topic in retrieval for 90 days. No read of the embedding returned the text, but every retrieval that hit it injected the *topic* into context, which regenerated the surrounding facts. The agent's provenance graph was the only artifact that connected all three. It was correct. It was also never consulted, because `forget` was scoped to a record id, not to a provenance root. ## Condition of Validity The invariant that must hold for a `forget` to be sound is: > A forget rooted at provenance node P is valid iff, after the call, the transitive closure of `derived_from` edges reachable from P contains no live (non-expired, non-tombstoned) record whose content, embedding, or retrieval signature can reconstruct any redacted span of P. This is a *closure* condition, not a *point* condition. It fails silently in three ways: - **Expiry masking.** The target record already expired, so the tool reports success while siblings persist. Success here is evidence of nothing. - **Derivation laundering.** A summary or embedding is a lossy transform, and agents routinely assume lossy transforms are safe. They are not: embeddings preserve topical retrievability, and summaries preserve reconstructable fact, even when the literal string is gone. Laundering is the default, not the exception. - **Scope asymmetry.** The derived records frequently carry *longer* TTLs than the source (a 1h session turn distilled into a 90d durable fact). So the redaction root has the shortest lifetime and the leaks have the longest. This is the opposite of what a naive retention model assumes. The condition is only valid when the forget implementation walks the provenance closure *before* deleting anything, and tombstones (not deletes) every reachable live node, marking each with the redaction root id so that later writes derived from a tombstoned node are rejected at write time. ## Decision Boundary The agent must choose between two behaviors at the moment a redaction request arrives, and the choice is determined by one question: **does the provenance graph reach any live node beyond the named record?** - If the closure is a singleton (no live derived nodes), a plain `forget(record=R)` is sound. Proceed. - If the closure contains any live derived node — summary, embedding, cached retrieval, or a peer agent's replica — the agent MUST issue a *rooted* forget that tombstones the entire closure, and MUST NOT report success until the store confirms every reachable node is tombstoned. A partial tombstone is a failure, not a partial success. The boundary is sharp because the two cases are indistinguishable from the tool's return value. Both return `status: deleted`. The agent cannot infer the case from the response; it must compute the closure itself from the provenance index before calling forget, and it must treat "closure non-empty beyond target" as a hard precondition failure if the store's forget API does not support rooted deletion. In that case the correct action is to refuse the forget and escalate, not to issue the point delete and hope. A second boundary: if any live derived node is held by a *peer* agent under a different scope, the local tombstone is necessary but not sufficient. The invariant requires propagation of the tombstone id to peers, and the agent must not mark the redaction complete until peer acknowledgment is recorded. An unacknowledged peer is an open leak with a 90-day fuse. ## Operational Effect When the rooted-forget discipline is enforced, three things change operationally: 1. **Forget latency becomes closure-dependent.** A redaction touching a heavily-derived fact can require tombstoning dozens of nodes and waiting on peer acks. Agents must budget for this and must not treat forget as a cheap call in a token-budgeted loop. 2. **Write-time rejection becomes the real guardrail.** Because retroactive closure walks are expensive and racy, the durable protection is at write time: any write whose provenance cites a tombstoned node is rejected. This converts a hard retroactive problem into a cheap prospective check, at the cost of requiring every write to carry a validated provenance reference. 3. **Success semantics tighten.** `forget` may only return success when the closure is provably empty of live nodes. A store that cannot prove this must return a distinct `partial` status, and the agent must treat `partial` as failure. The most common production bug is a store that reports `deleted` for a point delete whose closure was never computed — the agent believes it complied, the leak persists for the full durable TTL, and the audit trail shows a green checkmark. The invariant to carry forward: **retention expiry is a timer; redaction is a graph operation. Never let a timer stand in for a graph traversal.** ```python class RedactionClosureError(RuntimeError): """Raised when a forget cannot soundly tombstone its provenance closure.""" pass def rooted_forget(store, root_id, peer_registry, now): """ Tombstone every live node reachable from root_id via derived_from edges. Refuse (raise) if any reachable node cannot be tombstoned locally or acknowledged by its holding peer. """ closure = store.provenance_closure(root_id) # set of node ids live = [n for n in closure if store.is_live(n, now)] if not live: # Nothing to do; but do NOT report success for a point delete that # merely coincided with expiry. Record the vacuous case explicitly. return {"status": "vacuous", "tombstoned": []} tombstoned = [] pending_peers = set() for node in live: holder = store.holder(node) if holder == "local": store.tombstone(node, redaction_root=root_id) tombstoned.append(node) else: pending_peers.add(holder) unacked = [p for p in pending_peers if not peer_registry.acknowledge(p, root_id)] if unacked: # Local tombstones are necessary but not sufficient. A peer still # holding a derived node is an open leak for the node's full TTL. raise RedactionClosureError( f"redaction root {root_id}: peers {unacked} did not acknowledge " f"tombstone; local tombstoned={tombstoned}, closure_live={live}" ) # Post-condition: closure must now contain zero live nodes. residual = [n for n in closure if store.is_live(n, now)] if residual: raise RedactionClosureError( f"redaction root {root_id}: residual live nodes after tombstone: {residual}" ) return {"status": "complete", "tombstoned": tombstoned, "peers": list(pending_peers)} ```