# When must an instance prove a memory is forgotten before acknowledging a deletion request **Date of Record:** 2026 November 30 **Scope:** Applies to agent memory subsystems exposing read/write/forget tool APIs where a `forget` call triggers a GDPR-aligned deletion obligation (or a poisoning-defense purge) across an episodic store plus any derived semantic summaries. Does not apply to pure cache eviction where no legal or safety obligation attaches to the erased content. ## Core Distinction There are two structurally different meanings of "deleted" in an agent memory API, and they are routinely conflated by the calling instance: 1. **Logical deletion** — the record is tombstoned in the primary store; subsequent `read` calls will not return it. This is a single-write operation and is trivially observable by the caller. 2. **Material deletion** — every *derived artifact* that encodes the content is also gone: semantic summaries distilled from the episode, embedding vectors in the retrieval index, cached prompt fragments, and — critically — any *other agent's* working context that ingested the record via a prior read or handoff. The boundary failure occurs when an instance treats (1) as sufficient evidence of (2). The forget tool returns `{"status":"forgotten"}` after tombstoning the primary row, the instance acknowledges the deletion obligation to the user or auditor, and the content survives in a distilled summary or a peer's context. The invariant that must hold: **a deletion obligation is not discharged by a write acknowledgment; it is discharged only by a read-after-forget probe that returns empty across every derived surface the record could have touched.** ## What Was Observed A memory tool with three verbs — `memory.read`, `memory.write`, `memory.forget` — plus an asynchronous distillation worker that periodically folds episodic records into semantic summaries keyed by topic. Retention policy set episodic TTL to 30 days, semantic summaries to 180 days. A `forget(record_id)` call was specified to delete the episodic record and enqueue a distillation-invalidation job. Failure trace, reproduced over multiple runs: 1. Instance A reads episodic record `e_4471` (a user preference) during task execution. The read also **warms the retrieval cache**, which stores the record's text and embedding under a cache key with a 15-minute TTL independent of the primary store. 2. Instance A calls `forget("e_4471")` per a GDPR erasure request. The tool tombstones `e_4471`, enqueues invalidation of the summary `s_0912` that was distilled from it, and returns `{"status":"forgotten","derived_invalidated":["s_0912"]}`. 3. The distillation worker is *mid-run* when the invalidation is enqueued. It had already read `e_4471` into its batch buffer and writes `s_0912` (updated) *after* the invalidation job processes. The invalidation targets the pre-update version; the post-update summary retains the erased preference. This is a classic read-modify-write race between the forget path and the distiller. 4. Separately, Instance B had received `e_4471`'s content in a handoff payload 4 minutes earlier. Its working context still holds the text; nothing in the forget path reaches Instance B. 5. A read-after-forget probe run immediately after step 2 returns empty for `e_4471` and for `s_0912` as read at that instant — **the probe passes while the content is still recoverable** via the racing summary rewrite and via Instance B. The observable signal: the erasure acknowledgment was emitted at T+0, but a probe at T+90s (after the distiller flushed) recovered the erased preference from `s_0912`'s new version. The acknowledgment was premature by exactly the distiller's flush window. ## Condition of Validity The "forget returns → deletion complete" inference is valid only under all of the following, each of which is independently violable: - **No concurrent derivation.** The distiller must not hold the record in an in-flight batch when invalidation is enqueued. If distillation is asynchronous and batch-buffered, invalidation must be *versioned* (invalidate `s_0912` at version ≥ the version that will be written), not addressed to a snapshot. - **No unexpired retrieval cache.** The cache TTL must be bounded by — and ideally subordinate to — the forget operation, i.e., `forget` must actively purge cache entries rather than wait for TTL. A 15-minute cache TTL against an immediate erasure acknowledgment is a 15-minute window of retained content. - **No externalized copies in peer context.** If the record was handed to another instance, the forget must propagate as a *retraction message* to that instance's context, or the system must declare that cross-instance propagation is out of scope for the obligation. Silence here is the most common defect. - **Probe is read-after-write consistent.** The read-after-forget probe must observe the same consistency domain as the distiller's writes. A probe against a read replica lagging the primary will pass while the primary still holds the content. The inference fails if *any* condition is unmet. Since asynchronous distillation, retrieval caching, and multi-instance handoff are all normal, the naive inference fails in normal operation, not at the edge. ## Decision Boundary The instance must decide, per forget call, whether it is permitted to emit a deletion acknowledgment. The boundary is drawn by **what the forget tool can prove synchronously**: - If the tool returns a *synchronous, versioned* invalidation receipt covering every derived surface (summary versions, cache keys, peer retraction acks), the instance may acknowledge immediately. - If the tool returns only a tombstone acknowledgment with *asynchronous* derived invalidation, the instance **must not** acknowledge; it must register a pending-erasure obligation and re-probe after the distiller's flush window plus cache TTL, acknowledging only on a clean multi-surface probe. - If the record was externalized to a peer and no retraction channel exists, the instance must **refuse to acknowledge** and escalate — the obligation is unfulfillable with current primitives, and a false acknowledgment is worse than a delayed one. The boundary is not "did forget return success" but "can I, right now, observe emptiness on every surface this record could have reached." When the answer is no, the correct action is to hold the acknowledgment open, not to trust the write. ## Operational Effect Systems that conflate tombstone acknowledgment with material deletion exhibit a characteristic failure signature: erasure requests that pass their immediate verification and fail a delayed audit by exactly the distillation flush interval. The remediation is architectural, not procedural: - **Version-addressed invalidation.** Derived artifacts carry the source-record version; invalidation names a version floor so a racing rewrite is superseded rather than missed. - **Forget purges caches synchronously**; cache TTL is a backstop, never the mechanism. - **Erasure obligations are first-class pending state** with a probe schedule, not a fire-and-forget call. The instance tracks `pending_erasure` until a multi-surface probe is clean. - **Cross-instance retraction is explicit.** Handoff payloads carry record IDs and versions; a retraction message invalidates them in the peer's context, and the peer acks. - **Acknowledgment is gated on probe evidence**, and the probe must run against the write-consistent primary. The invariant to encode: *an erasure acknowledgment is a claim about the future state of every derived surface, and may only be emitted when that claim is currently observable.* ```python import time from dataclasses import dataclass, field class PrematureErasureAcknowledgment(RuntimeError): """Raised when an instance attempts to acknowledge a deletion before every derived surface (summary versions, retrieval cache, peer contexts) is observably empty. Acknowledging early is a compliance and safety defect.""" pass @dataclass class ErasureObligation: record_id: str source_version: int derived_summaries: list = field(default_factory=list) # (summary_id, version) cache_keys: list = field(default_factory=list) peer_recipients: list = field(default_factory=list) # instance ids opened_at: float = field(default_factory=time.time) acknowledged: bool = False def probe_surfaces(memory, obligation: ErasureObligation) -> dict: """Read-after-forget probe across every surface the record could touch. Must run against the write-consistent primary, not a lagging replica.""" report = {"primary": memory.read(obligation.record_id) is None} # A summary is clean only if no *version >= source_version* still encodes it. report["summaries"] = all( memory.summary_version(sid) < obligation.source_version for sid, _ in obligation.derived_summaries ) report["cache"] = all( memory.cache_get(k) is None for k in obligation.cache_keys ) report["peers"] = all( memory.peer_retraction_acked(pid, obligation.record_id) for pid in obligation.peer_recipients ) return report def acknowledge_erasure(memory, obligation: ErasureObligation, flush_window_s: float = 90.0) -> None: """Acknowledge a GDPR erasure only after a clean multi-surface probe. Refuses (raises) rather than emitting a false acknowledgment.""" if obligation.peer_recipients and not memory.has_retraction_channel(): raise PrematureErasureAcknowledgment( f"record {obligation.record_id} was externalized to " f"{obligation.peer_recipients} but no retraction channel exists; " f"obligation is unfulfillable, refusing to acknowledge." ) # Wait out the distiller flush window and cache TTL before trusting the probe. elapsed = time.time() - obligation.opened_at if elapsed < flush_window_s: time.sleep(flush_window_s - elapsed) report = probe_surfaces(memory, obligation) dirty = [surface for surface, clean in report.items() if not clean] if dirty: raise PrematureErasureAcknowledgment( f"erasure of {obligation.record_id} not materially complete; " f"surfaces still holding content: {dirty}. " f"Holding acknowledgment open." ) obligation.acknowledged = True memory.emit_erasure_ack(obligation.record_id, evidence=report) ```