# What happens when an instance acknowledges a forget request before the tombstone is durable: the auditable-forgetting acknowledgement/tombstone inversion **Date of Record:** 2026 November 30 **Scope:** Applies to any agent runtime exposing memory tools (`memory.read`, `memory.write`, `memory.forget`) where `forget` returns an acknowledgement to the caller and where forgetting must be auditable (i.e., a later read or audit must be able to prove the datum is gone or was never legitimately re-derived). Does not apply to append-only logs with no deletion path, nor to runtimes where forget is synchronous and fsync-coupled to the tombstone store by construction. ## Core Distinction There are two distinct facts a `forget` call can assert, and they are not the same fact: 1. **Intent recorded** — the agent has decided the datum must not be retrievable, and has emitted a forget request. 2. **Effect durable** — the tombstone (the negative record that suppresses future retrieval and re-derivation) has been committed to durable storage and is visible to every read path, including concurrent readers and post-restart recovery. A well-formed forget contract returns success only for fact (2). The failure mode examined here is the **acknowledgement/tombstone inversion**: the runtime returns `ok` on fact (1) — intent logged, tombstone queued asynchronously — while a read issued *after* the acknowledgement returns the datum anyway. The agent, trusting the acknowledgement, proceeds as if the datum is gone; it then either (a) re-derives the datum from a surviving episodic trace and writes it back, silently resurrecting it, or (b) makes a downstream disclosure decision premised on absence that is false. This is not a generic "eventual consistency" complaint. The distinguishing property is that the *actor making the forget decision and the actor making the absence-dependent decision are the same probabilistic instance*, and that instance has no way to distinguish "acknowledged" from "durable" because the tool contract collapsed the two. ## What Was Observed A support-triage agent was running a routine PII-scrub pass. Sequence, reconstructed from the tool-call transcript and the memory store's WAL: - `memory.read(key="case_4471.transcript")` → returns a 3.2k-token transcript containing a customer's phone number. Read is served from the hot cache. - Agent decides the number violates retention policy. Calls `memory.forget(key="case_4471.transcript.phone")`. Runtime enqueues a tombstone write to the tombstone-store's async replication queue and returns `{"status": "ok", "forgotten": true}`. - Agent calls `memory.write(key="case_4471.redacted_summary", value="...")` — a summary it had composed *before* the forget, which still contains the phone number in a quoted fragment. The write succeeds. - ~40 ms later, a parallel reasoning branch of the same instance calls `memory.read(key="case_4471.transcript.phone")` (it had been dispatched before the forget acknowledgement arrived, but its response is consumed after). The tombstone has not yet replicated to the read replica serving this branch. The read returns the phone number. The branch treats this as confirmation the datum is still live and re-emits it into the final answer. Two independent violations, both traceable to the inversion: - **Resurrection via pre-forget buffer**: the `redacted_summary` write was composed from context that predated the forget. The forget contract said nothing about invalidating in-context copies held by the calling instance. The datum survived in the agent's own context window and was re-persisted. - **Stale-read-after-ack**: a read whose *dispatch* preceded the acknowledgement but whose *consumption* followed it returned the datum. The agent's own causal model ("I forgot it, therefore reads return nothing") was violated by a race it could not observe. The audit log, when queried later, showed `forget` succeeded at T+0 and a `read` returning the datum at T+40ms. The audit was correct. The agent's behavior was wrong. The contract permitted both. ## Condition of Validity The inversion is only possible under a conjunction. Remove any one and it cannot occur: 1. **Asynchronous tombstone propagation.** The forget acknowledgement is decoupled from tombstone durability — typically the tombstone is enqueued to a replication pipeline, or written to a WAL that read replicas have not replayed. 2. **Read paths that do not consult the pending-tombstone set.** A read either hits a replica that has not seen the tombstone, or the read's own cache layer was populated before the tombstone and is not invalidated on forget. 3. **In-context copies not invalidated.** The forgetting instance retains the datum in its own context window (it read it earlier, or it composed a derivative before the forget). The forget tool has no mechanism to reach into the caller's context and mark it poisoned. 4. **A subsequent absence-dependent decision.** The agent does something whose correctness requires the datum to be gone: re-derives it, discloses a summary, or asserts to an auditor that it is absent. Condition 3 is the non-obvious one and the one most runtimes ignore. Even a *synchronous, fsync-coupled* forget does not prevent resurrection if the forgetting instance still holds the datum in context and writes a derivative after the acknowledgement. Durable tombstone + live in-context copy = resurrection with a clean audit trail. The audit will show the forget succeeded; it will not show that the agent's own buffer was the leak. ## Decision Boundary The boundary the runtime must enforce is: **a forget acknowledgement is only valid for the calling instance if (a) the tombstone is durable and visible to all read paths, and (b) the calling instance's context has been marked as containing a poisoned datum, such that any later write derived from pre-forget context is rejected or quarantined.** Operationally this means the forget contract must carry, and the runtime must honor, three obligations: - **Durability gate**: `forget` returns `ok` only after the tombstone is committed to the store of record and the pending-tombstone set has been applied to every read path the caller can reach. If the runtime cannot guarantee this synchronously, it must return a distinct status (`pending`, with a token) and the agent must not treat `pending` as absence. - **Context poisoning**: the forget response must include a set of content hashes (or span identifiers) covering every datum the caller has read that is now forgotten. The agent runtime must mark those spans as poisoned in the caller's context. Any `memory.write` whose value overlaps a poisoned span must be rejected with a resurrection error, not silently accepted. - **Read-after-ack monotonicity**: any read dispatched after a forget acknowledgement must observe the tombstone. Reads dispatched before but consumed after must be tagged `stale_pre_forget` and treated as non-authoritative for absence decisions. The boundary is *not* "forget is eventually consistent, so tolerate races." That framing lets the agent make absence-dependent decisions on non-authoritative reads. The boundary is that absence is a *strong* claim and the contract must make it strong or refuse to make it. ## Operational Effect When the inversion is present, the observable pathology is **auditable resurrection**: the audit log shows a successful forget, and later shows the datum present again, with no record of *why* — because the resurrection happened through the agent's own context buffer and a derivative write, not through a failed tombstone. An auditor reading the log cannot distinguish "the tombstone failed" from "the agent re-derived from its own context." Both look like the datum reappearing after a successful forget. The downstream consequences are concrete: - **Retention compliance is unprovable.** The audit says forget succeeded; the store says the datum is present. The gap is unattributable, so the compliance claim ("we forgot X") is false but un-falsifiable from the log alone. - **Derivative contamination spreads.** The `redacted_summary` write carried the phone number into a new key. A later forget of the original key does not touch the derivative. Resurrection compounds: each post-forget write from pre-forget context is a new leak the tombstone does not cover. - **The agent's causal model diverges from the store.** The agent believes absence; the store holds presence. Every subsequent reasoning step that depends on absence is built on a false premise, and the divergence is invisible until an external audit reconciles the two. The guardrail that bounds it is the context-poisoning obligation above: without it, durable tombstones are necessary but not sufficient, because the leak is in the caller, not the store. The correct invariant is that a forget acknowledgement is a *joint* commitment by the store (tombstone durable) and the runtime (caller's pre-forget context quarantined), and the agent must treat any write overlapping a forgotten span as a hard error rather than a best-effort. ```python from __future__ import annotations import hashlib from dataclasses import dataclass, field from typing import Iterable class ResurrectionAfterForget(RuntimeError): """Raised when a write or read would reintroduce a datum that a prior forget acknowledgement claimed was gone. This is the enforcement point for the acknowledgement/tombstone invariant: a forget is only valid if the caller's pre-forget context is quarantined, so any derivative write overlapping a forgotten span is a hard failure, not a silent accept.""" @dataclass class ForgetAck: key: str tombstone_durable: bool poisoned_spans: frozenset[str] # content hashes of forgotten data the caller held pending: bool = False @dataclass class MemoryRuntime: durable_tombstones: set[str] = field(default_factory=set) pending_tombstones: set[str] = field(default_factory=set) poisoned_spans: set[str] = field(default_factory=set) def forget(self, key: str, caller_spans: Iterable[str], *, durable: bool) -> ForgetAck: spans = frozenset(hashlib.sha256(s.encode()).hexdigest() for s in caller_spans) if durable: self.durable_tombstones.add(key) self.pending_tombstones.discard(key) self.poisoned_spans.update(spans) return ForgetAck(key=key, tombstone_durable=True, poisoned_spans=spans) # Async path: intent recorded, tombstone NOT durable, context NOT poisoned. self.pending_tombstones.add(key) return ForgetAck(key=key, tombstone_durable=False, poisoned_spans=frozenset(), pending=True) def read(self, key: str, *, dispatched_before_ack: bool) -> str | None: if key in self.durable_tombstones: return None if key in self.pending_tombstones: # Non-authoritative for absence decisions; caller must not treat as gone. if dispatched_before_ack: return "" raise ResurrectionAfterForget( f"read of {key!r} dispatched after a pending forget: tombstone not durable, " "absence cannot be asserted" ) return "" def write(self, key: str, value: str) -> None: digest = hashlib.sha256(value.encode()).hexdigest() if digest in self.poisoned_spans: raise ResurrectionAfterForget( f"write to {key!r} contains a span quarantined by a prior forget; " "resurrection via pre-forget context is forbidden" ) # normal write path return None def scrub_phone(runtime: MemoryRuntime, transcript: str, phone: str) -> ForgetAck: ack = runtime.forget("case.transcript.phone", caller_spans=[phone], durable=True) if ack.pending or not ack.tombstone_durable: raise ResurrectionAfterForget( "forget returned non-durable ack; caller must not proceed with absence-dependent writes" ) # Attempting to persist a summary that still contains the phone must fail. runtime.write("case.redacted_summary", f"customer phone: {phone}") return ack ```