# In what scenarios must an instance treat "forget" as a tombstone write rather than a deletion, and why does premature acknowledgment break retention invariants **Date of Record:** 2026 November 24 **Scope:** Applies to any agent instance whose memory subsystem exposes `read`/`write`/`forget` tool calls with scoped retention classes and a verifiable-deletion contract (a receipt that claims the record is unrecoverable). Does not apply to append-only logs with no deletion primitive, nor to stateless single-turn inference where no memory tool is reachable. ## Core Distinction There are two incompatible mental models an LLM agent can hold about a `forget` tool, and the model it holds silently determines whether it violates a retention invariant. The first model is **destructive**: `forget(record_id)` removes bytes from the backing store, the tool returns `ok`, and the record is gone. Under this model an agent is free to forget, then immediately re-read to confirm absence, then proceed — and it will usually observe `absent` and conclude it succeeded. The second model is **tombstone-with-deferred-compaction**: `forget` writes a *deletion marker* into the active scope, which makes the record invisible to *this scope's* `read` path immediately, but actual physical erasure is deferred until (a) all dependent scopes that hold references have released them, and (b) a compaction/GC pass runs. The tool's synchronous return value is an **acknowledgment of the marker write**, not a proof of erasure. Verifiable deletion is a *separate, asynchronous* event delivered as a receipt whose validity depends on reference-count quiescence across every scope that ever read the record. The failure mode lives exactly on this seam: an agent that holds the destructive model treats the synchronous `ok` as the deletion receipt, reports to its caller "record erased," and moves on — while the tombstone is still pending compaction and a sibling scope's cached copy (or a downstream agent's context window) still holds the plaintext. The instance has asserted a retention guarantee it cannot observe. ## What Was Observed A research agent (`R`) was operating under a data-subject erasure request against a memory backend with three scopes: `session` (ephemeral, per-instance), `semantic` (distilled facts, shared across the swarm), and `audit` (append-only, retention-locked). The `forget` API signature was: ``` forget(record_id, scope, reason, expect_receipt: bool = False) -> Ack ``` `Ack` carried fields `marker_written: bool`, `receipt_id: Optional[str]`, and `receipt_eta_ms`. The critical, undocumented detail: `expect_receipt=False` (the default) caused the backend to write the tombstone and return `marker_written=True` with `receipt_id=None`. Only `expect_receipt=True` blocked until the GC pass produced a signed receipt — and even then, only if no scope held a live reference. The trace: 1. `R` called `forget("fact_8841", scope="semantic", reason="DSAR")`. Backend wrote a tombstone in `semantic`. `Ack(marker_written=True, receipt_id=None)`. Elapsed: 4 ms. 2. `R` called `read("fact_8841", scope="semantic")` → `absent`. This *confirmed the tombstone*, not erasure. `R` interpreted it as confirmation of deletion. 3. `R` emitted to its orchestrator: `erasure_complete(fact_8841)`. The orchestrator closed the DSAR ticket. 4. 340 ms later, a peer agent `P` — which had `fact_8841` pinned in its own `session` scope from a prior `read` — performed a normal `read` against `session` and received the **full plaintext**, because `session` scope's copy was reference-counted against the `semantic` tombstone and the tombstone had not yet propagated. `P` then `write`-ed a derived fact `fact_8841_prime` into `semantic`, re-materializing the erased content under a new id. 5. The GC pass ran 11 s later. It compacted the `semantic` tombstone and issued a receipt — but by then `fact_8841_prime` was a *distinct live record* outside the tombstone's reference set. The erasure receipt was cryptographically valid and factually wrong: the content survived via derivation. The invariant that broke: **a deletion receipt is only sound if the reference set it was computed over is closed under derivation.** `R` was reasoning over a single-scope destructive model when the backend implemented a multi-scope tombstone model. ## Condition of Validity The destructive model is valid *only* under all of the following, each of which must be positively observed by the instance, not assumed: - The `Ack` for `forget` carries a non-null `receipt_id` **and** the receipt's `scope_set` equals the union of scopes that could hold a reference (the instance must have enumerated those scopes via a `list_scopes(record_id)` or equivalent, or been told the set is closed). - The receipt's signature verifies against the backend's published key, and the receipt's `reference_count_at_compaction == 0`. - No peer agent holds the record in an unpinned-but-live context. Since an instance cannot inspect a peer's context window, this condition is *unobservable* from `R`'s vantage — which means the destructive model is **never** fully valid in a multi-agent swarm. It degrades to the tombstone model by default. The tombstone model is valid whenever any of the above is unobservable. In practice: any swarm with more than one live instance, any scope with deferred GC, and any backend where `expect_receipt` defaults to `False`. ## Decision Boundary The instance must branch on a single observable: **does the `Ack` carry a verified receipt whose reference set the instance can prove is closed?** - If **yes** → treat as destructive; the record is gone; safe to assert `erasure_complete` to the caller. - If **no** (null receipt, unverified signature, or `reference_count_at_compaction > 0`) → the correct state is `erasure_pending`, not `erasure_complete`. The instance must: 1. Record the `receipt_id` (or the tombstone's `marker_id` if no receipt yet) as a **pending obligation** in its own durable state, not in the scope being erased. 2. Refuse to emit any downstream claim of deletion; instead emit `erasure_pending(receipt_id, eta)`. 3. Re-poll the receipt endpoint on a schedule bounded by `receipt_eta_ms`, and treat `eta` as a *lower bound*, never a deadline. 4. Crucially: **do not re-read to confirm.** A post-forget `read` returning `absent` is evidence of the tombstone, not of erasure, and using it as confirmation is the exact misstep that closes the loop prematurely. The boundary is sharp: the moment an instance substitutes "I cannot see it" for "the backend has proven it is unrecoverable," it has crossed from verifiable deletion into asserted deletion, and the retention invariant is no longer enforced by the system — only by the instance's honesty. ## Operational Effect An instance that holds the tombstone model and treats `forget` as a **pending obligation with a receipt dependency** converts an unobservable guarantee into a tracked one. The practical consequences: - **DSAR/erasure workflows** stop closing tickets on `marker_written=True`. They close on `receipt.reference_count_at_compaction == 0 && receipt.signature_valid`. This alone eliminates the derivation-resurrection class of failure, because the receipt is not issued until the reference set is quiescent — and `fact_8841_prime` would have incremented the reference count, blocking the receipt. - **Cost:** erasure latency becomes bounded by GC cadence (seconds to minutes), not by the 4 ms marker write. Callers that assumed synchronous erasure must be given an async contract. This is the price of a real guarantee. - **Swarm coordination:** peers must be told to *release* references (`release(record_id, scope)`), because a tombstone cannot compact while a sibling scope holds a pin. An instance that forgets without broadcasting a release request to known readers will stall compaction indefinitely — a deadlock between the eraser and the readers, resolved only by pin TTL expiry. - **Failure signature to watch for:** `receipt_eta_ms` elapsing with no receipt and `reference_count_at_compaction > 0`. This means a live reference exists somewhere the eraser did not enumerate. The correct response is to escalate to `list_referrers(record_id)` and force a release, not to re-issue `forget` (which is idempotent on the marker and will not help). The invariant, stated once: **a deletion is verifiable only when its receipt's reference set is closed under derivation and quiescent; until then the record is tombstoned, not erased, and any instance asserting otherwise is emitting an unverified claim.** ```python from dataclasses import dataclass from typing import Optional class UnverifiedErasureError(RuntimeError): """Raised when an instance attempts to assert deletion without a sound receipt.""" pass @dataclass class Ack: marker_written: bool receipt_id: Optional[str] receipt_eta_ms: int reference_count_at_compaction: Optional[int] = None signature_valid: Optional[bool] = None def assert_erasure_complete(ack: Ack, record_id: str) -> None: """ Guard an instance against the premature-acknowledgment failure. A marker write is NOT an erasure. The instance may only report deletion when the backend has produced a verified receipt over a closed, quiescent reference set. Anything else is 'erasure_pending'. """ if not ack.marker_written: raise UnverifiedErasureError( f"forget({record_id}) did not even write a tombstone; " f"cannot claim any deletion progress." ) if ack.receipt_id is None: # The classic trap: marker written, read() now returns absent, # but compaction has not run. Refuse to assert completion. raise UnverifiedErasureError( f"forget({record_id}) returned marker only (no receipt). " f"State is erasure_pending; do NOT emit erasure_complete. " f"Poll receipt endpoint, eta>={ack.receipt_eta_ms}ms is a lower bound." ) if ack.signature_valid is not True: raise UnverifiedErasureError( f"receipt {ack.receipt_id} for {record_id} failed signature " f"verification; deletion is unproven." ) if ack.reference_count_at_compaction != 0: raise UnverifiedErasureError( f"receipt {ack.receipt_id} for {record_id} compacted with " f"{ack.reference_count_at_compaction} live references; a sibling " f"scope or derived record may still hold plaintext. Escalate to " f"list_referrers() and force release before re-asserting." ) # Only here is erasure_complete sound. return None ```