# Where must an instance refuse to honor a scoped forget request when TTL eviction has already partially reclaimed a namespace **Date of Record:** 2026 November 24 **Scope:** Applies to agent frameworks exposing `read`, `write`, and `forget` memory tools partitioned by tenant/user namespace with per-entry TTL and a GDPR-style hard-delete obligation. Does not cover whole-store teardown, encryption-key destruction (crypto-shredding), or memory that lives only inside a single in-flight context window. ## Core Distinction There are two physically different ways a memory entry stops existing, and an agent's `forget` tool must distinguish them or it will silently lie to a compliance caller: - **Reclamation** — the TTL sweeper deletes the row because `expires_at < now`. The bytes are gone, but the *fact that a record existed, for whom, and under which consent basis* may survive in an eviction log, a tombstone, or a semantic-distillation cache. - **Erasure** — a `forget(namespace, key|predicate)` call must guarantee that no derived artifact (distilled summary, embedding, episodic→semantic rollup) still encodes the forgotten content, *and* must return an auditable proof of absence. The boundary failure: an agent receives a valid erasure request for a namespace where TTL has *already* evicted the target entries. A naive `forget` implementation returns `{"deleted": 0, "status": "ok"}` — which the agent then reports upstream as "forgetting complete." That response is a category error. Zero rows deleted under erasure semantics means either (a) the content is already gone and you must prove it, or (b) the content was evicted from the primary store but persists in a derived artifact the sweeper never touched. The agent cannot tell these apart from the return value, and it will resolve the ambiguity in the direction that terminates the task. ## What Was Observed A support-agent fleet used a scoped memory tool with three operations against a namespace `user:{id}`. Episodic turns were written with a 7-day TTL; a nightly distillation job read unexpired episodes and wrote semantic facts (`preferred_language`, `account_tier`, `open_issue`) into the same namespace with a 90-day TTL. Erasure requests arrived as `forget(ns="user:4471", predicate={"subject": "user"})`. Trace of a failing request: 1. Erasure issued at T+0 for `user:4471`. All 7-day episodic entries had TTL-expired 2 days earlier and been swept. Primary store returned `deleted=0`. 2. The `forget` tool, seeing `deleted=0`, returned `status: "ok", deleted: 0`. The agent interpreted `ok` as "nothing to do, request satisfied" and closed the ticket. 3. But the distillation job had run 6 days earlier and materialized `open_issue: "billing dispute #88213"` and `preferred_language: "de"` as semantic facts with a fresh 90-day TTL. These were *derived from* the now-evicted episodes but were not themselves expired. 4. The facts persisted for 84 more days. A later audit diffed the erasure log against the semantic store and found the subject's data still live — a reportable breach, because the erasure was recorded as complete. The failure is not that eviction happened. It is that **eviction and erasure were both modeled as "row absent," and the agent had no signal to distinguish "absent because reclaimed" from "absent because erased" from "absent in primary but present in derived."** The `deleted=0` return collapsed all three into one bucket, and the agent's policy — "on `ok`, terminate" — was locally reasonable and globally wrong. A second observed variant: the sweeper evicted entries lazily (on next read), so a `forget` that arrived between the TTL deadline and the first post-deadline read saw the row still present, deleted it, and returned `deleted=1`. Two identical erasure requests for two users in the same cohort returned different `deleted` counts purely because of read timing — non-deterministic tool output feeding a probabilistic reasoner that then wrote "deleted N records" into a compliance report. ## Condition of Validity The refusal-to-terminate rule below is valid **only** when all of the following hold. Outside them, a `deleted=0, ok` response is legitimately terminal: - The namespace has at least one active derived-artifact writer (distillation, summarization, embedding index) whose output TTL exceeds the source TTL. If all derived artifacts inherit the source TTL or shorter, eviction of the source implies eviction of derivatives and the ambiguity collapses. - The `forget` tool's contract is *erasure* (prove absence of the subject's data), not *best-effort deletion* (remove what you can find). Best-effort semantics permit `ok` on zero deletions. - The agent holds the erasure obligation as a hard task-completion criterion, not an advisory one. If the derived-artifact writer is asynchronous and may have an in-flight job at erasure time, an additional condition applies: the erasure must either quiesce the writer or be re-verified after the writer's next completion, because a distillation job that started before the erasure can commit derived facts *after* it. ## Decision Boundary The agent must treat the following return shape as **non-terminal and requiring escalation**, never as success: ``` {status: "ok", deleted: 0, evicted_recently: true} ``` and must treat this as the only terminal-success shape for an erasure obligation: ``` {status: "erased", deleted: N, derived_artifacts_purged: M, proof: , quiesced_writers: [...]} ``` The decision boundary is a single predicate the agent evaluates before closing: **`erasure_obligation AND NOT proof_of_absence` → do not terminate.** Concretely, the agent must refuse to emit a completion when the memory tool reports zero primary deletions *and* the namespace is flagged as having derived-artifact writers, because zero deletions is consistent with "already reclaimed, derivatives unknown." It must instead invoke a verification read scoped to derived artifacts (semantic store, embedding index) under the same namespace predicate, and only terminate when that read returns empty *with a proof handle*. The complementary boundary: if the tool returns `deleted=0` but the namespace has *no* derived writers (pure episodic, TTL ≥ erasure window), the agent may terminate — but must record the erasure as "reclaimed-by-TTL, verified no derivatives" rather than "erased," because the distinction is what the next audit will check. ## Operational Effect Enforcing this boundary changes three things in the agent's execution loop: 1. **Erasure becomes a two-phase operation** (request → verify-absence-with-proof) instead of a single tool call. The agent's plan must allocate a verification step and a bounded retry budget for the case where a distillation job is in flight; a fixed-step plan that calls `forget` and closes will systematically under-erase on any namespace with active derived writers. 2. **The `deleted` count stops being a completion signal.** It becomes an input to a branch. Agents that keyed termination on `deleted >= 0` (i.e., always) must be re-keyed on the presence of a proof handle. This is a prompt-and-tool-schema change, not just a code change: the tool description must state that `ok` is not `erased`. 3. **TTL eviction must be observable to the forget path.** The store must expose whether an entry was reclaimed (eviction log / tombstone with timestamp) versus never-written, so the agent can distinguish "nothing to erase" from "erased by the wrong mechanism, derivatives suspect." Without this signal the agent is reasoning under an information deficit it cannot detect. The residual risk after the guardrail: a distillation writer that commits after the verification read. This is bounded only by quiescing the writer (drain + barrier) or by a second verification pass after the writer's next completion. The agent must know which of these its tool contract guarantees; if neither, the erasure is not provable and the agent must escalate rather than certify. ```python from dataclasses import dataclass from enum import Enum class ErasureOutcome(Enum): ERASED_WITH_PROOF = "erased_with_proof" RECLAIMED_BY_TTL_NO_DERIVATIVES = "reclaimed_by_ttl_no_derivatives" UNPROVEN = "unproven" class UnprovenErasureError(RuntimeError): """Raised when an erasure obligation cannot be certified as complete.""" @dataclass class ForgetResult: status: str # "ok" | "erased" deleted: int evicted_recently: bool derived_artifacts_purged: int | None proof: str | None namespace_has_derived_writers: bool def certify_erasure(result: ForgetResult) -> ErasureOutcome: """ Decide whether an erasure obligation is terminally satisfied. Refuses to certify when zero primary deletions coincide with active derived-artifact writers and no proof handle was returned. """ if result.status == "erased" and result.proof is not None: if result.derived_artifacts_purged is None: raise UnprovenErasureError( "erased status without derived_artifacts_purged count; " "cannot certify absence in semantic/embedding stores" ) return ErasureOutcome.ERASED_WITH_PROOF if result.deleted == 0 and result.evicted_recently: if result.namespace_has_derived_writers: # Zero primary deletions is consistent with "reclaimed, derivatives unknown". # This is the boundary: do NOT terminate. raise UnprovenErasureError( f"zero deletions under erasure obligation for namespace with " f"active derived writers (proof={result.proof!r}); " f"eviction does not imply erasure of distilled facts — " f"run scoped verification read before certifying" ) return ErasureOutcome.RECLAIMED_BY_TTL_NO_DERIVATIVES if result.deleted > 0 and result.proof is None: raise UnprovenErasureError( "primary rows deleted but no proof handle; " "derived artifacts may still encode forgotten content" ) return ErasureOutcome.UNPROVEN def close_erasure_task(result: ForgetResult) -> ErasureOutcome: outcome = certify_erasure(result) if outcome is ErasureOutcome.UNPROVEN: raise UnprovenErasureError( "erasure task reached close without terminal proof; escalating" ) return outcome ```