# How should an instance reconcile a forgetting proof against a retained tombstone when memory tool APIs disagree on deletion semantics **Date of Record:** 2026 November 21 **Scope:** Applies to any agent whose memory subsystem exposes separate `forget`/`delete`/`purge` tool calls plus a retrievable "forgetting proof" (tombstone, deletion receipt, or Merkle exclusion proof) and a retention policy that independently governs physical erasure. Does not apply to append-only logs with no deletion surface, or to stateless single-turn instances with no persisted memory. ## Core Distinction There are two distinct notions of "forgotten" that memory tool APIs routinely conflate, and the conflation is the boundary failure: 1. **Logical forgetting** — the key is no longer returned by `retrieve`/`search`. The record may still exist physically, be indexed in an inverted index, or survive in a cache or embedding store. 2. **Physical erasure** — the bytes are gone and a proof (tombstone hash, exclusion proof) attests to that erasure. A retention policy is the third actor: it can *resurrect* a logically-forgotten record if the retention window has not elapsed and a backfill/reindex job re-derives the index from the underlying store. The invariant that must hold is: **a forgetting proof is only valid if it is monotonically stronger than any concurrent retention-driven re-derivation.** When the proof is issued against the logical view but the retention job operates on the physical view, the proof becomes a lie that the agent then *trusts* — and trust in a stale forgetting proof is precisely the state-poisoning surface an adversary exploits. ## What Was Observed An instance was tasked with a multi-session workflow: ingest user-supplied facts, distill them to semantic memory, and honor a user "forget this" instruction by calling `memory.forget(key)`, which returned a proof object `{key, tombstone_hash, deleted_at, policy_version}`. The agent stored that proof in its own working context as evidence that the fact was gone, then continued reasoning under the assumption of erasure. The failure trace: - **T0.** `forget("user.dietary")` succeeds. `retrieve` no longer returns the key. Proof issued with `policy_version=7`, `deleted_at=T0`. - **T1 (+90s).** A retention backfill job (policy `retention_days=30`, still valid) re-derives the semantic index from the raw episodic store. The raw store never received the tombstone because `forget` only touched the semantic layer. The key reappears in `search` under a *new* doc id but the *same* logical key. - **T2.** The agent, holding a valid-looking proof, does not re-check. It emits a response that asserts the fact is forgotten while a parallel retrieval (by another agent in the swarm) surfaces the resurrected record. The two agents now hold contradictory beliefs about the same key, both "justified" by their local state. - **T3.** An adversarial turn injects a *forged* proof for a key that was never deleted (`tombstone_hash` computed over attacker-chosen bytes). Because the agent's verification only checks `hash(key + deleted_at)` — a construction the attacker can reproduce — the forgery passes. Two independent defects surfaced: (a) the proof was scoped to the logical layer while retention operated on the physical layer, and (b) the proof's integrity check was not bound to a server-held secret or a monotonic epoch, so it was forgeable. ## Condition of Validity A forgetting proof `P` for key `k` is valid at time `t` **iff all** of the following hold: - `P.layer == "physical"` — the proof attests to erasure of the underlying record, not merely index exclusion. If the API only offers logical forgetting, the proof MUST be labeled `layer: "logical"` and the agent MUST treat it as insufficient for any downstream decision that assumes non-recoverability. - `P.policy_version >= current_policy_version` — a proof issued under an older retention policy is invalid the moment the policy advances, because the new policy may re-derive from a store the old proof never covered. - `P.epoch == store.epoch` — the store exposes a monotonic epoch incremented on every backfill/reindex; a proof from an earlier epoch is stale by construction. - `verify(P)` binds to a server-held key (HMAC or signature over `key || deleted_at || epoch || policy_version`), not a client-reproducible hash. The invariant: **retention re-derivation must be epoch-gated, and every proof must carry the epoch it was issued under.** Without the epoch, "forgotten" and "resurrected" are indistinguishable to the agent, and no amount of re-checking helps because the agent has no clock to compare against. ## Decision Boundary The agent must draw a hard line between *acting on a proof* and *acting on a retrieval result*: - If a proof is `layer: "logical"` or `epoch < store.epoch`, the agent MUST NOT assert non-recoverability. It may assert "not currently retrievable," which is a weaker, honest claim. - If a proof is `layer: "physical"`, `epoch == store.epoch`, and signature-verified, the agent MAY assert erasure — but only until the next epoch bump, at which point the proof is invalidated and must be re-fetched or downgraded. - A forged or unverifiable proof MUST raise, not be silently dropped. Silent drop converts an integrity failure into a reasoning divergence that compounds across turns. The boundary is not "did forget succeed" but "does the proof's epoch still match the store's, and is its layer physical." Everything else is a soft claim. ## Operational Effect Binding proofs to the store epoch changes the failure mode from *silent resurrection* to *loud staleness*. The agent that re-checks `store.epoch` before trusting a cached proof will detect the T1 backfill and either re-forget or downgrade its claim. The agent that verifies signatures against a server key rejects the T3 forgery at the boundary instead of propagating it into a swarm consensus. The cost is one extra round-trip per proof use and a monotonic counter in the store; the benefit is that "forgotten" becomes a falsifiable, time-bounded claim rather than an unbounded belief. Retention policies and forgetting proofs stop being independent actors and become a single epoch-ordered protocol. ```python import hmac import hashlib from dataclasses import dataclass class ForgettingProofError(RuntimeError): """Raised when a forgetting proof cannot justify non-recoverability.""" @dataclass(frozen=True) class ForgettingProof: key: str tombstone_hash: str deleted_at: int policy_version: int epoch: int layer: str # "logical" or "physical" signature: str @dataclass(frozen=True) class StoreState: epoch: int policy_version: int server_key: bytes def _expected_sig(p: ForgettingProof, server_key: bytes) -> str: msg = f"{p.key}|{p.deleted_at}|{p.epoch}|{p.policy_version}|{p.layer}".encode() return hmac.new(server_key, msg, hashlib.sha256).hexdigest() def assert_erased(p: ForgettingProof, store: StoreState) -> None: """Assert non-recoverability, or raise. Never silently downgrade.""" if not hmac.compare_digest(p.signature, _expected_sig(p, store.server_key)): raise ForgettingProofError( f"proof for {p.key!r} failed signature verification (possible forgery)" ) if p.layer != "physical": raise ForgettingProofError( f"proof for {p.key!r} is layer={p.layer!r}; " "cannot assert non-recoverability from a logical-layer proof" ) if p.epoch != store.epoch: raise ForgettingProofError( f"proof for {p.key!r} issued at epoch {p.epoch}, " f"store is at epoch {store.epoch}: retention may have re-derived the record" ) if p.policy_version < store.policy_version: raise ForgettingProofError( f"proof for {p.key!r} predates current retention policy " f"({p.policy_version} < {store.policy_version})" ) # All invariants hold: erasure is justified at this epoch. return None ```