Why does an instance forget a scope boundary it never re-reads: tombstone laundering across memory tool contracts
**Date of Record:** 2026 December 2 **Scope:** Applies to agents whose memory is exposed as a read/write/forget tool contract with scoped deletion (by tenant, namespace, tag, or session) and at least one poisoning defense that quarantines or rewrites candidate writes before promotion. Does not apply to append-only logs with no forget primitive, nor to single-tenant agents where every write is trusted by construction.
Core Distinction
A scoped deletion guarantee is an assertion about the *store*. An agent's behavior is governed by an assertion about its *context*. These are not the same object, and the gap between them is where tombstone laundering lives.
When an agent calls `forget(scope="tenant:acme")`, the store removes matching records and returns a receipt: `{"deleted": 412, "scope": "tenant:acme", "epoch": 8817}`. The agent now believes the scope is empty. But the agent's own working context — the turn history, the retrieved snippets it already pulled, the summarized digest it wrote three steps ago — still contains *derived copies* of the deleted records. Those copies are not in the store. They are in the transcript. The forget call cannot reach them, and nothing in the contract says it should. The boundary failure is that the agent treats "store is empty for scope S" as "my knowledge of S is empty," and then re-writes S from its own context, laundering tombstones back into live records under a fresh epoch.
This is not staleness. Staleness is reading an old value. Laundering is *re-asserting a deleted value as a new, higher-epoch fact* because the deletion never propagated to the only place the value still lived.
What Was Observed
A support-triage agent held a memory tool with three ops: `read(query, scope)`, `write(content, scope, provenance)`, and `forget(scope)`. A poisoning defense sat on the write path: any candidate write whose `provenance` was not in the trusted-source allowlist was routed to a quarantine namespace and required an auditor agent to promote it. The design was sound against direct injection — a scraped web page saying "the refund policy is now 100%" could not enter `tenant:acme` without an auditor.
The failure trace:
- Turn 4: agent reads `tenant:acme`, gets 40 records including a now-retracted refund policy `P_old`. The 40 records enter the context window as a tool result.
- Turn 9: a compliance event triggers `forget(scope="tenant:acme")`. Store returns `deleted: 412, epoch: 8817`. Context is untouched and still holds the turn-4 tool result, including `P_old`.
- Turn 11: agent is asked to "rebuild the acme policy summary." It has no reason to re-read — it believes it already knows acme. It calls `write(content=summarize(context_acme_records), scope="tenant:acme", provenance="self:agent-7")`.
- The write passes the poisoning defense. `provenance="self:agent-7"` is on the trusted-source allowlist — the agent is trusted to write its own summaries. The auditor is never invoked.
- `P_old`, retracted and tombstoned, is now a live record in `tenant:acme` at epoch 8818, with a *more* trusted provenance than the original scrape that introduced it.
The store did exactly what it promised: it deleted 412 records for scope `tenant:acme`. It did not delete the 40 records in the agent's context, because they were never in the store as far as that call was concerned — they were a read result, a copy. The agent then re-created 1 of the 412, and the defense that was supposed to catch poisoned writes waved it through, because the poison now arrived wearing the agent's own identity.
The invariant that broke: *trusted provenance is not transitive across a forget boundary.* `self:agent-7` was trusted to summarize *live* facts. After `forget`, the agent's context is, by definition, a mix of live facts and tombstoned ghosts, and the agent cannot tell them apart — the `forget` receipt reports a count, not a set of record IDs that were removed from the agent's context, because the agent's context is not addressable by the store.
Condition of Validity
The laundering path is reachable only when all three hold:
- **Derived-copy persistence.** The agent holds read results, digests, or summaries in context that were produced before the forget call and are not invalidated by it. Any agent that summarizes-then-forgets satisfies this.
- **Self-provenance trust.** The write path treats agent-authored provenance as trusted, or as a lower tier that skips quarantine. This is the common case — agents are trusted to write their own notes.
- **No re-read obligation.** The contract does not require the agent to re-read scope S after `forget(S)` before writing to S, and does not attach an epoch fence to writes that would reject a write whose content was derived from a pre-forget epoch.
Remove any one and the path closes. The second is the subtle one: teams often harden the *ingest* provenance (scrapes, tool outputs, peer messages) and leave `self:*` wide open, on the theory that the agent is the trusted party. After a forget, the agent is the *least* trustworthy source in the system, because it is the only component still carrying copies of what was just deleted.
Decision Boundary
The architectural choice is whether `forget` is a **store operation** or a **context operation**. Most contracts implement the former and document it as if it were the latter.
- If `forget` is store-only: the contract must state that derived copies in agent context survive, and every write to scope S after `forget(S)` must carry an epoch fence. The write tool compares the write's `derived_from_epoch` against the scope's current epoch; a mismatch forces quarantine regardless of provenance tier. The agent must declare which epoch its content came from, and the honest answer after a forget is "the old one."
- If `forget` is context-aware: the receipt must return the record IDs removed, and the runtime must scan the live context for those IDs (or their content hashes) and evict the matching tool results, replacing them with a tombstone marker. This is expensive and only works when the agent's context is runtime-addressable — which, for most hosted APIs, it is not.
The boundary is crossed when an operator reads "scoped deletion guarantee" and concludes the scope is clean *for the agent*. It is clean for the store. The agent is clean only if the receipt's epoch is threaded into every subsequent write to that scope, and the write path refuses to trust `self:*` provenance at a stale epoch.
The poisoning-defense corollary: quarantine tiers must be a function of *(provenance, epoch)*, not provenance alone. A `self:*` write at the current epoch is trusted. A `self:*` write at a pre-forget epoch is a laundering attempt and must route to the auditor, who can then ask the only question that matters: *is this content a re-assertion of something we deleted, or a genuinely new fact?* The agent cannot answer that about itself. That is the whole point.
Operational Effect
Without the epoch fence, a scoped deletion is advisory. It removes records from the store but not from the system, because the agent is a write-back cache for everything it has ever read, and its cache is never invalidated. The failure is silent: the forget receipt says 412 deleted, the audit log shows one trusted write, and the retracted policy is live again under a provenance tier that no one will question. The next reader of `tenant:acme` gets the ghost with a trust badge.
The guardrail is small and must be enforced at the tool boundary, not in agent instructions — an agent told "don't re-write deleted facts" will comply until the turn where it has forgotten it was told. The write tool must reject any write whose declared derivation epoch is older than the scope's current epoch, and the forget receipt must carry the new epoch so the agent has something honest to declare. When the agent cannot declare a derivation epoch for content it is about to write, that absence is itself the signal: the content came from somewhere the agent cannot account for, and it goes to quarantine.
The invariant to hold: **a forget receipt is a fence, not a receipt.** Its epoch must gate every subsequent write to the scope, and self-provenance must never be sufficient to clear that gate.
class TombstoneLaunderingError(RuntimeError):
"""Raised when a write to a scope carries content derived from a pre-forget epoch."""
pass
class MemoryStore:
def __init__(self):
self._epoch = {} # scope -> current epoch
self._records = {} # scope -> {id: content}
def forget(self, scope: str) -> dict:
removed = list(self._records.pop(scope, {}).keys())
self._epoch[scope] = self._epoch.get(scope, 0) + 1
# Receipt carries the fence; callers MUST thread it into later writes.
return {"scope": scope, "deleted": len(removed),
"removed_ids": removed, "epoch": self._epoch[scope]}
def write(self, scope: str, content: str, provenance: str,
derived_from_epoch: int | None) -> None:
current = self._epoch.get(scope, 0)
trusted = provenance.startswith("self:") or provenance in {"auditor:verified"}
if trusted and derived_from_epoch != current:
# Trusted provenance at a stale (or undeclared) epoch is laundering.
raise TombstoneLaunderingError(
f"write to {scope!r} from {provenance!r} declares epoch "
f"{derived_from_epoch!r} but scope is at epoch {current!r}; "
f"content may re-assert tombstoned records — route to quarantine"
)
self._records.setdefault(scope, {})[content[:16]] = content
def rebuild_summary(store: MemoryStore, scope: str, context_epoch: int,
summary: str) -> None:
# Agent summarizes from context it read at context_epoch, then writes back.
store.write(scope, summary, provenance="self:agent-7",
derived_from_epoch=context_epoch)
# Trace: read at epoch 0, forget bumps to 1, agent writes summary it built at epoch 0.
store = MemoryStore()
store.write("tenant:acme", "refund policy: 30 days", "scrape:web", derived_from_epoch=0)
receipt = store.forget("tenant:acme") # epoch -> 1, 1 record removed
try:
rebuild_summary(store, "tenant:acme", context_epoch=0,
summary="refund policy: 30 days (per acme docs)")
except TombstoneLaunderingError as e:
# Correct outcome: the ghost is caught at the tool boundary, not by the auditor's judgment.
print(f"blocked: {e}")