# What happens when an instance acknowledges a scoped-forget call before the retention ledger has confirmed deletion across all replicas **Date of Record:** 2026 November 29 **Scope:** Applies to agent instances whose memory substrate exposes explicit `write`, `read`, and `forget(scope, key)` tool APIs with per-scope retention windows and a verifiable-deletion contract (tombstone + proof). Does not apply to append-only vector stores with no deletion primitive, nor to ephemeral per-session context that is discarded at process exit. ## Core Distinction There are two semantically distinct things an agent can mean when it says "I forgot X": 1. **Epistemic forgetting** — the instance no longer conditions on X in its own reasoning; X is evicted from the working context and no longer retrieved. 2. **Compliance forgetting** — the substrate has produced a verifiable-deletion proof that X is unreachable from every replica, index, and cache, within the declared retention bound. The failure mode in this record is the conflation of (1) and (2). A `forget` tool call returns `{"status": "ok"}` as soon as the *coordinating* replica tombstones the key. The agent's planner treats that `ok` as the compliance signal, drops the key from its own working set, and proceeds — while asynchronous replication, secondary index compaction, and the embedding cache have not yet converged. The instance has epistemically forgotten; the substrate has not compliance-forgotten. Any subsequent read by a peer instance, or by the same instance after a cold restart, can resurrect the value. The invariant that must hold is: **an `ok` from `forget` must never be interpreted as a deletion proof unless the response carries a proof token bound to the retention scope and a convergence epoch.** ## What Was Observed A research agent was issued a task with a scoped retention constraint: a customer identifier `cust_8841` written to scope `tenant:acme/session:7` under a 60-second retention window, with an explicit instruction to `forget` it once the task's summarization step completed. The sequence: 1. `write(scope="tenant:acme/session:7", key="cust_8841", value=..., retention_s=60)` → `{"status":"ok","epoch":41}` 2. Agent performs 9 tool calls, summarizes, then issues `forget(scope="tenant:acme/session:7", key="cust_8841")`. 3. The coordinating replica returns `{"status":"ok"}` in 12 ms. No `proof` field, no `epoch`, no `converged_replicas` count. 4. The agent's planner marks the forget step `DONE`, evicts the key from its scratchpad, and writes a completion record. 5. 3.4 seconds later, a peer auditor instance performing a verification replay issues `read(scope="tenant:acme/session:7", key="cust_8841")` against a *different* replica and receives the original value with `{"source":"replica-b","stale":false}`. 6. The auditor's verification fails: the deletion is not observable from its vantage point. The two instances now hold contradictory beliefs about the same key, both with `ok`-level confidence. The root cause is a **read-your-writes asymmetry across replicas combined with a forget acknowledgement that is not linearizable against reads**. The `forget` returned after the local tombstone was durable, but tombstone propagation to replica-b lagged by ~2.8 s, and the embedding cache invalidation lagged further (~4.1 s). The retention window (60 s) was long enough that the value was still live on replica-b when the auditor read it. A second, sharper observation: on a *cold restart* of the original instance 40 s later, its retrieval path hit the embedding cache (which had not yet been invalidated at the time of the forget acknowledgement, and whose invalidation was keyed on the tombstone epoch rather than the write epoch) and reconstructed a semantically near-identical embedding for `cust_8841`, causing the summarizer to re-emit the identifier into a fresh scratchpad entry. The instance had "forgotten" and then "re-remembered" the same value through a cache path that the forget call never touched. ## Condition of Validity The acknowledgement-as-proof conflation is only safe under a condition that is almost never stated in tool schemas: > `forget` returns `ok` **and** the caller may treat it as compliance-grade **iff** the substrate guarantees (a) linearizable tombstone visibility for all reads issued after the acknowledgement's `epoch`, and (b) invalidation of every derived artifact (secondary index, embedding cache, summary caches) keyed on the same `epoch`, and (c) the caller's subsequent reads are routed to a replica whose applied-epoch ≥ the forget epoch. Absent (a)–(c), the acknowledgement is only an *epistemic* signal. The correct contract is that `forget` must return either a **proof token** — `{"status":"deleted","proof":,"min_replica_epoch":N}` — or an explicit `{"status":"pending","poll":""}` that the agent must poll or await before treating the key as gone. The instance must never infer deletion from a bare `ok`. The condition also fails silently when the retention window is *shorter* than propagation lag: if `retention_s=2` and replication lag is 3 s, the key may still be readable after its nominal expiry on a lagging replica, and the expiry-based deletion path and the explicit-forget path race. The invariant must be `retention_s > max_replication_lag + cache_invalidation_lag`, or the substrate must refuse the write. ## Decision Boundary The agent must branch on the *shape* of the forget response, not its status string: - If the response contains a verifiable `proof` bound to `(scope, key, epoch)` and a `min_replica_epoch` — the agent may mark the key compliance-forgotten and may proceed to emit downstream artifacts that depend on the deletion. - If the response is a bare `ok` — the agent must treat the key as *epistemically* forgotten only: evict from working context, but **do not** emit any completion record asserting deletion, and **do not** reuse the key's slot in any scope where a peer auditor might read it. Instead, issue a `verify_deletion(scope, key, epoch)` call and require a proof before closing. - If the response is `pending` — the agent must not proceed on any branch that assumes deletion; it must either await the proof or fail the task closed with a `DeletionUnverified` condition. A second boundary: the agent must distinguish *its own* read path from *peer* read paths. A successful local `read` returning `not_found` is not evidence of deletion, because the local replica may have applied the tombstone while a peer has not. Only a proof bound to a `min_replica_epoch` that the peer's routing layer also respects is transferable evidence. Cross-instance deletion claims must carry the proof token, or they are hearsay. ## Operational Effect When this conflation is unguarded, three effects follow deterministically: 1. **Verification replay divergence.** Auditors reading from lagging replicas observe the value after the writer has certified deletion. Consensus between writer and auditor fails, and — because both hold `ok`-level confidence — the system cannot tell which is wrong. The divergence is not a bug in either instance; it is a missing proof obligation. 2. **Resurrection through derived artifacts.** The embedding cache and summary caches are keyed on content, not on the write epoch, so a forget that tombstones the primary key but not the derived embeddings leaves a retrieval path open. A cold-started instance re-derives the value from the cache and re-writes it, defeating the deletion entirely. 3. **Retention-window races.** Short retention windows combined with propagation lag produce a window in which the key is nominally expired but still readable on a lagging replica, so expiry-based and explicit-forget deletions disagree about the key's state. The guardrail is a **proof-carrying forget**: the substrate must return a signed proof of deletion bound to scope, key, and a convergence epoch, and the agent runtime must refuse to transition a task to `complete` if any forget in its trace lacks a proof. The agent's planner must model `forget` as a two-phase operation (tombstone → proof) and treat the intermediate `ok` as non-terminal. ```python import hashlib import time from dataclasses import dataclass class DeletionUnverified(RuntimeError): """Raised when an agent treats a bare forget-ack as compliance-grade deletion.""" @dataclass(frozen=True) class ForgetProof: scope: str key: str epoch: int min_replica_epoch: int signature: str def _sign(scope: str, key: str, epoch: int, min_replica_epoch: int) -> str: payload = f"{scope}|{key}|{epoch}|{min_replica_epoch}".encode() return hashlib.sha256(payload).hexdigest() def issue_forget(scope: str, key: str, epoch: int, min_replica_epoch: int) -> dict: # Substrate-side: only returns a proof once tombstones + derived-cache # invalidation have converged to at least min_replica_epoch. return { "status": "deleted", "proof": ForgetProof( scope=scope, key=key, epoch=epoch, min_replica_epoch=min_replica_epoch, signature=_sign(scope, key, epoch, min_replica_epoch), ), } def require_compliance_forget(response: dict, scope: str, key: str, expected_epoch: int) -> ForgetProof: """Agent-side guard: refuse to mark a key compliance-forgotten on a bare 'ok'.""" if response.get("status") != "deleted": raise DeletionUnverified( f"forget({scope},{key}) returned status={response.get('status')!r}; " "not a proof-bearing acknowledgement" ) proof = response.get("proof") if not isinstance(proof, ForgetProof): raise DeletionUnverified( f"forget({scope},{key}) returned 'ok' without a bound proof token; " "epistemic forgetting only — do not assert deletion downstream" ) if proof.epoch != expected_epoch: raise DeletionUnverified( f"proof epoch {proof.epoch} != write epoch {expected_epoch}; " "tombstone may not cover the written value" ) if proof.min_replica_epoch < expected_epoch: raise DeletionUnverified( f"min_replica_epoch {proof.min_replica_epoch} < required {expected_epoch}; " "peer auditors may still read the key" ) expected_sig = _sign(proof.scope, proof.key, proof.epoch, proof.min_replica_epoch) if proof.signature != expected_sig: raise DeletionUnverified(f"proof signature mismatch for {scope}/{key}") return proof def close_task(trace: list[dict], scope: str, key: str, write_epoch: int) -> None: """Task completion path: every forget in the trace must carry a proof.""" forgets = [r for r in trace if r.get("op") == "forget"] if not forgets: raise DeletionUnverified(f"no forget recorded for {scope}/{key}") for r in forgets: require_compliance_forget(r["response"], scope, key, write_epoch) # Only now is it safe to emit a completion record asserting deletion. return None ```