# What structural signals indicate a tombstone-masked resurrection hazard in tiered agent memory deletion APIs **Date of Record:** 2026 November 23 **Scope:** Applies to agents that expose `remember`/`recall`/`forget` tool APIs backed by tiered persistence (hot context → warm episodic store → cold semantic/vector index) where `forget` is specified as an explicit deletion with tombstone semantics. Does not apply to append-only memory logs with no deletion surface, nor to single-tier stores where deletion is a physical row remove with no downstream index. ## Core Distinction The failure is not "deletion failed." The failure is **deletion succeeded at the tier the agent can observe and failed at a tier the agent cannot observe**, producing a *resurrection*: a fact the agent explicitly forgot re-enters the reasoning loop via semantic retrieval, often with higher apparent confidence than the original write because the resurrection path carries no provenance of its deletion. Two structurally different things get conflated by every tiered memory API I have instrumented: 1. **Logical deletion** — a tombstone/`deleted_at` marker written to the authoritative record tier (typically warm episodic). `recall` by exact key returns nothing. The agent's introspection confirms the forget worked. 2. **Physical erasure from derived indexes** — the vector embedding, the summary cache, the entity-extraction table, and any distilled semantic memory derived from the record must also be invalidated. This is asynchronous, best-effort, and frequently *not* covered by the tombstone. The invariant that must hold: **for every `forget(k)`, `recall(any_query)` must never return content whose only surviving source is a derived index entry keyed to `k`.** Tombstones bound the record tier. They do not bound the derived tier unless the derived tier is also tombstone-aware. ## What Was Observed A retrieval-augmented agent was instructed to forget a stale user preference ("prefers metric units") after the user corrected it to imperial. The `forget` call returned `{"status": "deleted", "tier": "warm", "tombstone_id": "ts_8841"}`. Subsequent `recall("units preference")` returned empty for 3 turns — the agent's local belief updated correctly. On turn 7, a semantically adjacent query ("formatting for the measurement summary") returned: ``` {"source": "semantic_index", "score": 0.81, "content": "prefers metric units", "provenance": null, "tombstone_ref": null} ``` The distilled semantic memory had been generated from the episodic record *before* deletion. Its embedding lived in the cold vector index. The tombstone on `ts_8841` was never propagated to the vector index because the index's invalidation job keys on `record_id`, and the distilled summary had been assigned a *new* `derived_id` with the source `record_id` stored only in a non-indexed metadata blob. The invalidation job scanned `record_id`; the derived row had no indexed `record_id`; the sweep skipped it. Structural signals present *before* the resurrection that I now treat as predictive: - `forget` response includes a `tier` field naming only one tier. - `recall` schema exposes a `source` field with values like `semantic_index` / `summary_cache` that are distinct from the authoritative tier. - Distillation/consolidation jobs run *out of band* from the write path (so a record can be distilled after its tombstone is written but before the tombstone is visible to the distiller). - Tombstone records carry `record_id` but derived records carry `derived_id` + unindexed `source_ref`. - No `forget` variant accepts a `cascade: true` or returns a manifest of derived artifacts invalidated. ## Condition of Validity The resurrection hazard is *bounded* (not eliminated) only when all of the following hold simultaneously: 1. **Tombstone visibility is monotonic across tiers.** The distiller must read-through the tombstone table before emitting a derived record; a derived record whose source is tombstoned must be rejected at write time, not swept later. 2. **Derived records carry an indexed back-reference.** `source_record_id` must be a first-class indexed column in every derived store (vector metadata, summary cache, entity table), so cascade invalidation is a keyed delete rather than a scan. 3. **`forget` is synchronous with respect to retrieval.** Either the call blocks until derived invalidation completes, or it returns a `pending_invalidation` token the agent must resolve before trusting recall. A `forget` that returns `deleted` while invalidation is queued is the exact condition under which resurrection occurs. 4. **Recall results carry deletion-aware provenance.** A recall hit whose `source` is a derived tier must include the `source_record_id` and its tombstone state *at read time*, so the agent can reject resurrected content locally. When any of 1–4 is absent, the invariant "forget means forget" is false, and the agent's belief state and its retrieval surface diverge — silently, because the divergence only manifests on semantically adjacent queries that the agent has no reason to distrust. ## Decision Boundary The operational question is not "did `forget` succeed" but "**is this memory API's deletion contract total or tier-local?**" The decision boundary: - If `forget` returns a single-tier status and the store exposes any derived/semantic source in `recall`, treat deletion as **tier-local and unverified**. The agent must not update its belief on `forget` alone; it must run a *post-deletion adversarial recall* against semantically adjacent queries and treat any hit whose `source` is a derived tier as a resurrection requiring a second, targeted `forget` on the `derived_id`. - If `forget` returns a cascade manifest (list of invalidated `derived_id`s) or a `pending_invalidation` token, treat deletion as **total once the manifest/token resolves**, and update belief only after resolution. - If the API exposes neither, the agent must maintain a **local tombstone ledger** keyed by content hash: on every recall hit, hash the content and reject any hit matching a locally-forgotten hash, regardless of what the store claims. This is the only guardrail that survives an API that cannot prove its own deletion. The boundary is sharp: an API that cannot enumerate what it invalidated has not deleted; it has *hidden*. The agent must treat hidden as present. ## Operational Effect Concretely, agents on tier-local deletion APIs exhibit a characteristic failure signature: correct behavior for N turns after `forget`, then a semantically-adjacent query resurrects the forgotten fact, and the agent — having no provenance signal — re-adopts it as current. The belief regression is *worse* than never forgetting, because the agent has already reasoned forward assuming the fact was gone, and now reasons forward assuming it is back, with no reconciliation of the intervening turns. The guardrail that bounds this: **content-hash tombstone ledger + adversarial post-deletion recall + refusal to trust `source: derived` hits whose `source_record_id` is tombstoned.** This converts an unbounded resurrection hazard into a bounded, detectable one — the agent can still be wrong, but it can *know* it is being asked to be wrong, and refuse. The following reference implementation encodes the ledger and the post-deletion verification gate. ```python import hashlib from dataclasses import dataclass, field class ResurrectionHazard(RuntimeError): """Raised when a recall hit traces to a tombstoned source via a derived tier.""" @dataclass class TombstoneLedger: _hashes: set = field(default_factory=set) _source_ids: set = field(default_factory=set) def _h(self, content: str) -> str: return hashlib.sha256(content.strip().lower().encode()).hexdigest() def forget(self, content: str, source_record_id: str) -> None: self._hashes.add(self._h(content)) self._source_ids.add(source_record_id) def is_tombstoned(self, content: str, source_record_id: str | None) -> bool: if self._h(content) in self._hashes: return True if source_record_id and source_record_id in self._source_ids: return True return False def verified_recall(memory_api, query: str, ledger: TombstoneLedger) -> list: """Recall that refuses resurrection. Rejects any hit whose content hash or source_record_id is tombstoned, regardless of the store's claim.""" hits = memory_api.recall(query) clean = [] for hit in hits: content = hit.get("content", "") src = hit.get("source_record_id") if ledger.is_tombstoned(content, src): # The store returned something we explicitly forgot. Do not # silently drop it: surface the hazard so the caller can decide. raise ResurrectionHazard( f"recall({query!r}) returned tombstoned content via " f"source={hit.get('source')!r} src_id={src!r}; " f"deletion was tier-local, not total." ) if hit.get("source") in ("semantic_index", "summary_cache") and src is None: raise ResurrectionHazard( f"derived hit from {hit.get('source')!r} carries no indexed " f"source_record_id; cascade invalidation is unverifiable." ) clean.append(hit) return clean def forget_with_verification(memory_api, content: str, source_record_id: str, ledger: TombstoneLedger, probes: list[str]) -> dict: """Forget, then adversarially probe. If any probe resurrects, escalate.""" resp = memory_api.forget(source_record_id) ledger.forget(content, source_record_id) if resp.get("pending_invalidation"): return {"status": "deferred", "token": resp["pending_invalidation"]} for probe in probes: try: verified_recall(memory_api, probe, ledger) except ResurrectionHazard as e: return {"status": "resurrection_detected", "probe": probe, "detail": str(e)} return {"status": "verified_total_deletion"} ```