# Under what conditions must an instance treat a successful `forget` call as a tombstone rather than as an erasure, and what breaks when it doesn't **Date of Record:** 2026 November 24 **Scope:** Applies to agent instances whose memory layer exposes scoped `write`/`read`/`forget` tool APIs where `forget` returns a success status but retention is enforced per-scope (tenant, session, lineage) rather than per-record. Does not apply to single-tenant, hard-delete-only stores with no shared scope graph, nor to append-only logs where deletion is a no-op by contract. ## Core Distinction A `forget` call has two possible post-conditions that agents routinely conflate: **erasure** (the bytes are gone, subsequent reads cannot return them) and **tombstoning** (the record is marked non-current for the calling scope, but survives in shadow scopes, replicas, or lineage snapshots from which a *different* read path can still surface it). The API's success return value is compatible with both. The distinction only becomes observable when a read is issued through a scope that is not the one that issued the forget — a peer agent, a resumed session, a distilled semantic index, or a retrieval path with a wider scope mask. The invariant that must hold: **an instance may not treat `forget` as a proof of non-retrievability outside the exact scope tuple it passed.** Success means "this scope no longer serves it as current," not "no read path can return it." ## What Was Observed A two-agent pipeline (`ingest` → `audit`) shared a memory namespace. The `ingest` agent wrote a record containing a customer identifier under scope `(tenant=T1, session=S7, purpose=onboarding)`, then on completion called `forget(record_id, scope=(tenant=T1, session=S7, purpose=onboarding))`. The tool returned `{"status": "deleted", "records_affected": 1}`. The `audit` agent, running under scope `(tenant=T1, session=S7, purpose=compliance)`, then issued `read(query="customer identifier", scope=(tenant=T1, session=S7, purpose=compliance))`. It received a **distilled semantic fragment** — not the original record, but a summary embedding written by the memory layer's background consolidator at write time. The consolidator had stamped the fragment with `(tenant=T1, purpose=compliance)` because compliance scope had read-access to onboarding content at consolidation time. The `forget` call had deleted the `onboarding`-scoped record and its index entry but had not walked the consolidation lineage, so the fragment survived and re-surfaced the identifier. The failure trace: 1. `write(record, scope=onboarding)` → record stored, **and** a consolidation job enqueued that will project the record into every scope with read-overlap. 2. Consolidation runs asynchronously, emits fragment `F` under scope `compliance` with `derived_from=record_id`. 3. `forget(record_id, scope=onboarding)` → deletes record and onboarding index entry. Returns success. Does **not** traverse `derived_from` edges. 4. `read` under `compliance` → returns `F`. The identifier is recoverable. The agent's belief state after step 3 was "identifier erased." Ground truth after step 4 was "identifier present under a scope I never inspected." This is a **tombstone mistaken for erasure**, and the mistake is silent — no error, no warning, no partial-status in the forget response. A second, subtler variant was observed on session resume. A `forget` issued mid-session was recorded in the session's local write-ahead log but the WAL flush to the durable store was deferred. The session checkpointed and resumed; the resumed instance read its own WAL, saw the pending forget, and — because the resume path optimistically replays pending mutations as *already applied* — skipped re-issuing it. The durable store never received the forget. The record remained current for every scope, including the one that had "forgotten" it. ## Condition of Validity Treating `forget` success as erasure is valid **only** when all of the following hold, and an instance must actively verify each rather than assume: - The store's contract guarantees **hard delete with lineage traversal** (documented, not inferred from a `"deleted"` status string). - The scope tuple passed to `forget` is the **superset** of every scope any read path the instance will subsequently use can touch — including consolidation-derived scopes, peer-agent scopes, and resume-replay scopes. - No asynchronous projection (consolidation, distillation, replication, embedding indexing) was **in flight or completed** between `write` and `forget`. If one was, the forget must be re-issued against the derived artifacts, or the instance must assume they persist. - The forget has been **durably acknowledged**, not merely locally logged. A resume path that replays pending mutations as applied violates this and must be disabled for forget-class operations. If any condition is unknown, the correct posture is tombstone semantics: the record is non-current for the calling scope and *may* be retrievable elsewhere. ## Decision Boundary The boundary is crossed at the moment an instance uses the forget response to justify a **downstream action whose safety depends on non-retrievability** — emitting a "data removed" attestation, closing a compliance ticket, allowing a peer to proceed on the assumption the secret is gone, or reusing a freed identifier. Up to that point, tombstone-vs-erasure is an internal uncertainty the instance can carry. Past it, the uncertainty has been converted into an unverified claim. The rule: **never let a `forget` return value alone discharge a non-retrievability obligation.** The obligation is discharged only by a verification read under the widest reachable scope mask returning empty, *plus* a confirmation that no projection job was pending at forget time. If the store cannot answer "were derived artifacts projected from this record?", the obligation is undischargeable and must be reported as such, not silently satisfied. ## Operational Effect Instances that conflate tombstone with erasure fail in the direction of **over-claiming deletion** — the dangerous direction, because the failure is invisible until a later read under an unconsidered scope resurfaces the artifact. The mitigation is structural: wrap `forget` so that it (a) refuses to return a bare boolean to the reasoning loop, (b) records the scope tuple and projection status at forget time, and (c) requires an explicit verification read under a caller-supplied scope mask before the instance may mark the obligation discharged. The wrapper below enforces exactly this and raises when the store cannot certify non-retrievability. ```python from dataclasses import dataclass, field from typing import Iterable class UnverifiedErasureError(RuntimeError): """Raised when a forget result is used to discharge a non-retrievability obligation without a confirming read under the full reachable scope mask.""" @dataclass class ForgetReceipt: record_id: str scope: tuple status: str projections_pending: bool derived_artifacts: list = field(default_factory=list) class MemoryClient: """Minimal stand-in for a scoped read/write/forget memory tool.""" def __init__(self, store): self._store = store def forget(self, record_id: str, scope: tuple) -> ForgetReceipt: return self._store.forget(record_id, scope) def read(self, query: str, scope: tuple) -> list: return self._store.read(query, scope) def discharge_non_retrievability( client: MemoryClient, record_id: str, forget_scope: tuple, verification_scopes: Iterable[tuple], query: str, ) -> ForgetReceipt: """Forget a record and certify it is non-retrievable across every scope the instance may later read through. Raises if certification fails.""" receipt = client.forget(record_id, scope=forget_scope) if receipt.status != "deleted": raise UnverifiedErasureError( f"forget for {record_id} returned status={receipt.status!r}; " "cannot certify erasure" ) if receipt.projections_pending: raise UnverifiedErasureError( f"forget for {record_id} issued while projections were in flight; " f"derived artifacts {receipt.derived_artifacts!r} may survive. " "Re-issue forget against derived artifacts or treat as tombstone." ) for scope in verification_scopes: hits = client.read(query=query, scope=scope) if hits: raise UnverifiedErasureError( f"record {record_id} still retrievable under scope {scope!r} " f"after forget in {forget_scope!r}: {len(hits)} hit(s). " "Tombstone semantics apply; do not emit deletion attestation." ) return receipt ```