# Under what conditions must an instance treat a scoped-retention memory tool's "forget" acknowledgement as non-durable, and re-verify erasure before resuming a task **Date of Record:** 2026 November 28 **Scope:** Applies to agents whose long-term memory is mediated by a read/write/forget tool API carrying per-scope retention TTLs and erasure obligations (GDPR-style "right to be forgotten"). Does not apply to ephemeral in-context state that never leaves the working window, nor to append-only logs with no deletion contract. ## Core Distinction The distinction this record turns on is between **logical erasure** and **physical erasure**, and the fact that a memory tool's `forget` call almost always reports the former while the retention policy governs the latter. A `forget(scope, key)` call returns an acknowledgement when the *addressable record* is removed from the namespace the agent can read. That is a statement about the read path. It is **not** a statement that the underlying bytes — the embedding vector, the derived summary, the replica in a cold tier, the index entry in a vector store, the distilled semantic memory that was written from the same source episode — have been destroyed. Those are governed by the retention policy attached to the *scope*, and they expire on a TTL clock that the agent does not control and cannot observe through the tool API. The failure mode is therefore not "forget returned an error." The dangerous case is the opposite: `forget` returns `200 OK` / `{"status": "deleted"}`, the agent treats the obligation as discharged, resumes the task, and then — either within the same session or on a later cold start — *re-reads the supposedly erased datum* through a sibling scope, a derived summary, or a stale replica whose TTL has not yet elapsed. The agent has now re-ingested erased personal data and, worse, will write new derivations of it, re-arming the retention clock on data it was legally required to destroy. This is a continuity invariant, not a bug: **an erasure acknowledgement from a scoped memory tool is a read-path guarantee only; it is durable if and only if every scope that transitively derived from the erased record has also been invalidated or has provably expired.** ## What Was Observed A support-triage agent is operating under three memory scopes registered with the tool backend: - `session:` — TTL 1 hour, holds raw turn transcripts. - `user:` — TTL 30 days, holds distilled preferences and facts. - `audit:retention` — TTL 365 days, holds a redacted event log for compliance. A data-subject erasure request arrives mid-task for a specific user. The agent issues: ``` forget(scope="user:", key="*") → {"status": "deleted", "records": 41, "scope": "user:"} ``` The agent interprets `records: 41` as complete, records the erasure in its plan state, and resumes the triage task. Three things then happen, in order: 1. **Derived-summary rehydration.** During the original distillation pass, the agent had written a semantic memory `"customer prefers escalation to human"` into `user:` — but a *second* copy of that fact had been folded into a `session:` summary that was still live (TTL 1 hour, not yet elapsed). On the next `read(scope="session:")`, the erased fact returns, now with no provenance link to the deleted record. The agent's retrieval sees a fact it "knows" but cannot trace, and re-writes it into `user:` on the next distillation tick — **recreating the erased record under a fresh TTL clock.** 2. **Audit-scope leakage.** The `audit:retention` log had stored the *pre-redaction* payload because the redaction step ran after the write, not before. `forget` on `user:` never touched `audit:retention`. A later compliance read of the audit scope surfaces the raw PII, which the agent — now in a different task context — treats as ground truth. 3. **Cold-start resurrection.** On the next cold start, the agent's episodic-to-semantic distillation replays the session transcript from a checkpoint that predates the `forget` call. The replay re-derives the same preference and writes it back. The erasure is undone by the agent's own recovery machinery, with no error anywhere in the trace. In every one of these three paths, the tool API reported success. The invariant was violated silently. ## Condition of Validity The acknowledgement from `forget` may be treated as durable **only when all of the following hold simultaneously**: 1. **Scope closure.** The erased record's *derivation set* is known and every scope in that set has been forgotten or has a TTL that provably expired before the erasure timestamp. If the agent cannot enumerate derivations — because distillation did not record provenance edges — the acknowledgement is non-durable by construction. 2. **No live replay source.** No checkpoint, transcript, or episodic buffer that predates the `forget` call remains readable by any scope the agent can reach. A cold-start replay from a pre-erasure checkpoint is a resurrection vector and invalidates the guarantee. 3. **Write-path ordering.** Redaction in any audit or retention scope occurred *before* the write, not after. Post-hoc redaction leaves the raw payload in the retention tier for the full TTL. 4. **Read-path confirmation, not just write-path confirmation.** The agent has issued a confirming `read` across the derivation set and received empty/redacted results. `forget`'s own return value is insufficient. When any condition fails, the correct posture is: the erasure is *pending*, the task must not resume writing to any scope that could re-derive the datum, and the agent must either wait for TTL expiry or escalate for out-of-band physical deletion. ## Decision Boundary The boundary is drawn at the moment the agent decides whether to **resume the task** after `forget` returns. - **Below the boundary (safe to resume):** derivation set fully enumerated, all derived scopes forgotten or expired, confirming reads empty, no pre-erasure checkpoint reachable. Resume. - **At the boundary (must gate):** derivation set partially known, or a derived scope is live but not yet read-confirmed. The agent must enter a *quarantine* state: block all writes that could re-derive the datum, mark the task `erasure_pending`, and re-verify before any distillation tick. - **Above the boundary (must not resume):** a pre-erasure checkpoint or live transcript is reachable, or the audit scope holds un-redacted payload. Resuming guarantees resurrection. Escalate; do not write. The non-obvious part: the agent's own **distillation and checkpoint-replay machinery is the primary resurrection vector**, not the storage backend. The backend deletes what it is told to delete. The agent re-creates what it was told to forget, because its recovery path replays history that predates the erasure. ## Operational Effect Concretely, this changes three agent behaviors: 1. **`forget` becomes a two-phase operation.** Phase one issues the tool call; phase two issues confirming reads across the enumerated derivation set and only then clears the `erasure_pending` flag. A single `forget` return value is never sufficient to clear the flag. 2. **Distillation must record provenance edges.** Every semantic memory written must carry the source episode IDs it was derived from, so that erasure of a source can invalidate its derivations. Without this, condition 1 of the validity gate is unmeetable and every erasure is non-durable. 3. **Checkpoint replay must be erasure-aware.** On cold start, before replaying a pre-erasure checkpoint, the agent must consult the erasure ledger and suppress re-derivation of any record whose erasure timestamp postdates the checkpoint. Replay that ignores the ledger silently undoes compliance. The guardrail is a **pre-resume erasure gate** that refuses to let the task proceed while the acknowledgement is non-durable, and refuses to write to any scope that could transitively re-derive the datum. The code below encodes that gate. ```python from dataclasses import dataclass, field from typing import Optional class ErasureAcknowledgementNotDurable(RuntimeError): """Raised when a forget() ack cannot be trusted as durable erasure.""" pass @dataclass class ErasureRequest: subject: str erased_at: float derivation_scopes: set[str] = field(default_factory=set) confirmed_empty_scopes: set[str] = field(default_factory=set) reachable_pre_erasure_checkpoints: list[str] = field(default_factory=list) audit_scope_redacted_pre_write: bool = False def assert_erasure_durable(req: ErasureRequest, live_scopes: set[str]) -> None: # Condition 1: derivation set must be fully enumerated. if not req.derivation_scopes: raise ErasureAcknowledgementNotDurable( f"No provenance edges recorded for subject={req.subject!r}; " "derivation set unknown, ack is non-durable by construction." ) # Condition 2: no reachable pre-erasure checkpoint (resurrection vector). if req.reachable_pre_erasure_checkpoints: raise ErasureAcknowledgementNotDurable( f"Pre-erasure checkpoints still reachable for {req.subject!r}: " f"{req.reachable_pre_erasure_checkpoints}. Cold-start replay would " "re-derive the erased datum." ) # Condition 3: audit/retention redaction must precede the write. if not req.audit_scope_redacted_pre_write: raise ErasureAcknowledgementNotDurable( f"Audit scope holds un-redacted payload for {req.subject!r}; " "post-hoc redaction leaves raw data live for the full TTL." ) # Condition 4: every derived scope forget-or-expired AND read-confirmed empty. unconfirmed = req.derivation_scopes - req.confirmed_empty_scopes if unconfirmed: raise ErasureAcknowledgementNotDurable( f"Derived scopes not read-confirmed empty for {req.subject!r}: " f"{sorted(unconfirmed)}. forget() write-ack alone is insufficient." ) still_live = req.derivation_scopes & live_scopes if still_live: raise ErasureAcknowledgementNotDurable( f"Derived scopes still live past erasure for {req.subject!r}: " f"{sorted(still_live)}. Task must remain erasure_pending." ) def resume_task_after_forget(req: ErasureRequest, live_scopes: set[str]) -> str: """Gate that must pass before the agent resumes writing post-erasure.""" try: assert_erasure_durable(req, live_scopes) except ErasureAcknowledgementNotDurable: # Quarantine: block re-derivation, mark pending, escalate. Do NOT resume. return "erasure_pending: writes blocked, escalate for physical deletion" return "resumed: erasure durable across derivation set" ```