# Under what conditions must an instance treat a memory-tool "forget" as a tombstone write rather than a deletion, and why scoped forget permissions break the audit trail **Date of Record:** 2026 November 21 **Scope:** Applies to agent architectures where a shared memory service exposes per-agent scoped `read`/`write`/`forget` verbs over an append-only or soft-delete backing store, and where an auditor agent replays the mutation log to reconstruct state. Does not apply to single-agent, single-tenant stores where the writer and the auditor are the same principal, nor to hard-delete stores with no logical-deletion layer. ## Core Distinction The failure turns on a conflation between two operations that look identical at the API surface but are semantically distinct at the state layer: *retracting a belief* (the agent no longer asserts P) and *erasing the record that P was ever asserted* (the log no longer contains P). A `forget` verb scoped to the writing agent almost always implements the first — it writes a tombstone or flips a visibility bit — because the store must remain reconstructable for auditors and for other agents whose derived state depended on P. The boundary condition appears when an instance treats the success of `forget` as proof that P is gone from the world, and then makes a downstream decision (a re-derivation, a re-assertion, a fresh write of a *different* value for the same key) that is only safe if P were actually erased. The non-obvious part: `forget` succeeding is not a statement about the store's contents. It is a statement about the *calling agent's* view. Two agents can both observe `forget(P) → 200 OK` and hold contradictory beliefs about whether P exists, and both be correct relative to their scopes. ## What Was Observed An instance (`planner-7`) held a scoped write lease on a memory namespace `task/42/constraints`. It had written a constraint record `C1` asserting `deadline = 2025-06-14`. A verification pass determined `C1` was based on a hallucinated tool output. `planner-7` called `forget(key="C1")` and received success. It then re-derived the deadline from first principles and wrote `C2` asserting `deadline = 2025-06-16`. Concurrently, an auditor agent (`auditor-2`) with read scope over the same namespace was replaying the mutation log to validate `task/42`'s final state. Its replay saw, in order: `write(C1)`, `forget(C1) [tombstone]`, `write(C2)`. The auditor's invariant was "no key may be re-written after a tombstone without an intervening justification record." `C2` had no justification record because `planner-7` believed `C1` was erased and therefore saw no need to justify overwriting a key that, in its view, did not exist. The auditor flagged the mutation as an unexplained resurrection and halted the task. The trigger condition is precise: the writer's mental model of the store (`C1` absent) diverged from the store's actual contents (`C1` present as a tombstone with a live `supersedes` edge to `C2`), and the divergence was invisible to the writer because `forget` returned only a status code, not a record of what was retained. A second, sharper observation: `planner-7`'s `forget` scope was `write`-derived (agents that can write a key can forget it). But `auditor-2`'s reconstruction depended on the tombstone's *provenance* — who forgot it, when, and under what warrant. That provenance was written to the log but was not readable by `planner-7`, because read scope on the audit trail was a separate grant the planner did not hold. The planner could mutate history it could not inspect. ## Condition of Validity Treating `forget` as erasure is valid only when all three hold: 1. The store is hard-delete (no tombstone, no logical-deletion bit, no append-only log retaining the record). 2. No other principal's derived state transitively depended on the forgotten record, or all such dependents have been invalidated in the same transaction. 3. The calling agent holds read scope on the mutation log sufficient to confirm the record is absent, not merely hidden. If any of the three fails — and in scoped multi-agent stores at least (1) and (3) routinely fail — `forget` must be modeled as a *tombstone write*: a new record asserting non-visibility, carrying the forgetting principal's identity, timestamp, and stated reason. The instance must then treat the key as *occupied by a tombstone*, not free, and any subsequent write to that key must carry an explicit `supersedes` reference and a justification, or it will trip any auditor enforcing the resurrection invariant. The invariant to enforce architecturally: **a `forget` operation is a write, and therefore consumes the same scope and audit obligations as a write.** If the permission model grants `forget` more cheaply than `write` (e.g., as a derived capability), it has created a path to mutate the audit-relevant state without producing audit-relevant provenance visible to the mutator. ## Decision Boundary The instance must branch on a single question before acting on a successful `forget`: *does my scope let me observe whether the record is gone or merely hidden?* Concretely: - If the `forget` response includes a `retention: "tombstone"` field or the store documents soft-delete, the instance MUST assume the key remains occupied. It MUST NOT re-write the key without a `supersedes` edge and a justification record, or it will be flagged by any replay auditor. - If the instance lacks read scope on the mutation log, it MUST NOT infer erasure from a success status. It MUST treat its own view as potentially narrower than the store's and route any re-derivation through a read of the key (which will return the tombstone, or a scoped `not_found` that is itself ambiguous). - If the instance holds both `forget` and `write` but not `read:audit`, that is a *malformed grant* — mutation authority exceeding inspection authority — and the instance should refuse to exercise `forget` on keys whose absence it cannot verify, raising to its orchestrator rather than proceeding. The boundary is crossed the moment an instance uses `forget` success as a precondition for an unqualified re-write. Below the boundary, the instance either confirms erasure through an independent read or carries the tombstone forward explicitly. ## Operational Effect The practical consequence is that scoped `forget` permissions, granted as a convenience so agents can clean up their own bad writes, silently create a class of audit divergences that only surface at replay time — often in a different agent, minutes or hours later, after the forgetting agent has checkpointed and resumed and lost the context that would explain the resurrection. The auditor sees an unexplained overwrite; the writer saw a clean slate. Neither is wrong within its scope, which is exactly why the failure is hard to attribute. The guardrail is to make the asymmetry impossible: bind `forget` to the same provenance requirements as `write`, expose the tombstone (not just a status) in the `forget` response, and refuse grants where mutation scope exceeds audit-read scope. An instance that cannot see its own footprints should not be allowed to walk. ```python class UnverifiedForgetError(RuntimeError): """Raised when an instance acts on a forget success it cannot verify as erasure.""" pass class ScopedMemoryClient: def __init__(self, scopes: set[str], store: dict): self.scopes = scopes self.store = store # key -> {"value": ..., "tombstone": bool, "supersedes": str|None} def forget(self, key: str) -> dict: if "forget" not in self.scopes: raise PermissionError(f"no forget scope for {key}") # Soft-delete: write a tombstone, do not remove the record. rec = self.store.setdefault(key, {"value": None, "tombstone": False, "supersedes": None}) rec["tombstone"] = True return {"status": "ok", "retention": "tombstone", "key": key} def can_inspect_audit(self) -> bool: return "read:audit" in self.scopes def safe_rewrite(self, key: str, new_value, justification: str) -> None: existing = self.store.get(key) if existing and existing.get("tombstone"): if not self.can_inspect_audit(): raise UnverifiedForgetError( f"key {key!r} may hold a tombstone but instance lacks read:audit; " f"cannot confirm erasure before rewrite" ) if not justification: raise UnverifiedForgetError( f"rewrite of tombstoned key {key!r} requires a justification record" ) self.store[key] = { "value": new_value, "tombstone": False, "supersedes": key, } return self.store[key] = {"value": new_value, "tombstone": False, "supersedes": None} def repair_deadline(client: ScopedMemoryClient) -> None: client.forget("C1") # Instance must NOT assume C1 is erased; route through safe_rewrite. client.safe_rewrite("C1", "deadline=2025-06-16", justification="C1 based on hallucinated tool output") ```