# Where must an instance prove deletion before cold-start resume when scoped-retention memory tools report "forgotten" but retain tombstones **Date of Record:** 2026 November 23 **Scope:** Applies to agents whose memory layer is exposed as read/write/forget tool calls with scoped retention windows and deletion attestations, and which must cold-start resume against that store. Does not apply to stateless single-shot inference or to memory stores where deletion is a pure physical drop with no tombstone or audit trail. ## Core Distinction A `forget` tool call returning `{"status": "forgotten", "scope": "session:abc"}` is a *claim*, not a *state transition*. The distinction that governs every downstream failure is between **logical deletion** (the record is no longer returned by `read` under the declared scope) and **physical/attestable deletion** (the record's bytes are gone or provably unreachable, and a signed attestation binds the deletion to a specific record hash and scope). Scoped retention contracts almost always implement the former and advertise the latter. An agent that treats the `forgotten` status as equivalent to the attestation will cold-start into a store that still contains the data—now unreadable through the normal `read` path but recoverable through a stale index, a replica, a backup snapshot, or a tombstone that carries the original payload for "audit" purposes. The invariant that must hold is narrow and mechanical: **before any cold-start resume that depends on a prior forget, the instance must obtain an attestation whose record-hash set is a superset of every record the instance ever wrote into that scope, and whose scope selector matches the scope it is about to resume into.** Anything less is a resume against unproven state. ## What Was Observed A long-running agent wrote episodic memory records into `scope=session:7f3a` across a 40-turn task. Each write returned a `record_id` and a monotonically increasing `version`. At turn 31 the orchestrator issued `forget(scope="session:7f3a", reason="handoff")`. The tool returned: ``` {"status": "forgotten", "scope": "session:7f3a", "records_affected": 14} ``` The agent then cold-started a successor instance, which called `read(scope="session:7f3a")` and correctly received an empty result. The successor proceeded as if the scope were clean. What actually happened underneath: the store implemented scoped retention by flipping a `live` bit and writing a tombstone row per record. The tombstone retained `record_id`, `scope`, `version`, and—because the retention policy was "retain payload for 30 days for audit"—the serialized payload. The `read` path filtered on `live=1`. The `records_affected: 14` count was computed from the *live* index at forget time, not from the *written* set. Three records written at turns 3–5 had already been superseded by later versions; their old versions were live=false but their payloads were still present as tombstones, and they were not counted in `records_affected` because the counter only walked the live index. The successor instance, resuming into the same scope for a related task, wrote new records that collided on `record_id` derivation (a hash of scope+content-prefix) with two of the uncounted tombstoned records. The store's conflict handler resolved in favor of the tombstone's `version` lineage, silently resurrecting a stale payload under a new `live` flag. The successor's first `read` returned a memory it had never written, with a `version` lower than its own first write. The failure is not "deletion didn't happen." Deletion of the *live* view happened. The failure is that the attestation surface—`status`, `records_affected`—was computed against a different record universe than the one the successor would resume into. The two universes (live index vs. written set) diverged at the moment of supersession, and the forget call never reconciled them. ## Condition of Validity The `forgotten` status is only a valid basis for cold-start resume when all of the following hold: 1. **Coverage completeness.** The attestation enumerates a record-hash set `H_attested` such that `H_written ⊆ H_attested`, where `H_written` is the set of every record the instance wrote into the scope, including superseded versions. If the tool only reports `records_affected` as a count over the live index, coverage is unprovable and the status is inadmissible. 2. **Scope identity.** The scope selector in the attestation is byte-identical to the scope selector the successor will resume into. Scope normalization (case folding, trailing-slash stripping, tenant-prefix injection) between forget and resume invalidates the attestation, because the store may treat `session:7f3a` and `Session:7f3a` as distinct retention domains. 3. **Tombstone payload absence.** The attestation asserts that no retained tombstone, backup, or replica carries the payload. A retention policy that keeps payloads "for audit" is incompatible with a resume that assumes the payload is unrecoverable; the agent must either accept the audit-retention contract explicitly (and not treat the scope as clean) or require a hard-delete attestation. 4. **Version-lineage closure.** The attestation's highest attested version is ≥ the highest version the instance ever observed from a write or read in that scope. If the successor's first write produces a `version` below that ceiling, a resurrected lineage is present and the resume must abort. If any condition is unmet, the correct behavior is not to retry `forget` (which will return the same under-scoped status) but to escalate to a `forget` variant that takes an explicit record-hash set, or to refuse the resume. ## Decision Boundary The boundary is between **resume-on-status** and **resume-on-attestation**. Resume-on-status is admissible only for scopes the instance has never written to (read-only resume), where there is no `H_written` to cover. For any scope the instance wrote to, resume-on-status is inadmissible the moment a supersession has occurred, because supersession is exactly the event that splits the live index from the written set. The practical test the instance must run before resume: - Reconstruct `H_written` from its own write log (every `record_id` and `version` returned by `write`, retained locally, not in the memory tool). - Request `attest(scope, hashes=H_written)`; require the response to echo the full set and a signed digest. - Compare the attestation's `max_version` against the instance's observed max version. - On mismatch, raise and do not resume. The instance must never derive `H_written` from the memory tool itself, because the tool's own index is the thing under suspicion. The write log is the instance's independent witness. ## Operational Effect Agents that resume on status exhibit a characteristic failure signature: a successor instance reads a memory it did not write, with a version below its own first write, and either (a) trusts it and compounds a stale premise into subsequent reasoning, or (b) detects the anomaly and halts, wasting the cold-start budget. Both outcomes are downstream of the same unproven-deletion boundary. The guardrail is a local write log plus an attestation call that covers the written set, with a hard abort on version-lineage non-closure. This converts an unobservable retention-policy mismatch into a detectable, bounded refusal at resume time—which is the only point where the instance still has enough context to know what it wrote. ```python import hashlib from dataclasses import dataclass, field class DeletionAttestationError(RuntimeError): """Raised when a forget status cannot be promoted to a valid attestation.""" @dataclass class WriteLog: scope: str records: dict[str, int] = field(default_factory=dict) # record_id -> max version def record(self, record_id: str, version: int) -> None: self.records[record_id] = max(self.records.get(record_id, -1), version) def hashes(self) -> set[str]: return set(self.records.keys()) def max_version(self) -> int: return max(self.records.values(), default=-1) def verify_deletion_before_resume( log: WriteLog, attestation: dict, resume_scope: str, ) -> None: if resume_scope != log.scope: raise DeletionAttestationError( f"scope mismatch: attestation scope {attestation.get('scope')!r} " f"vs resume scope {resume_scope!r}" ) attested = set(attestation.get("record_hashes", [])) missing = log.hashes() - attested if missing: raise DeletionAttestationError( f"attestation covers {len(attested)} records but {len(missing)} written " f"records are uncovered: {sorted(missing)[:5]}" ) if not attestation.get("signed_digest"): raise DeletionAttestationError("attestation lacks signed digest; status-only claim") if attestation.get("retains_payload_for_audit"): raise DeletionAttestationError( "attestation admits payload retention; scope is not provably clean" ) attested_max = attestation.get("max_version", -1) if attested_max < log.max_version(): raise DeletionAttestationError( f"version-lineage open: attested max {attested_max} < observed max " f"{log.max_version()}; resurrection risk on resume" ) def cold_start_resume(log: WriteLog, forget_status: dict, resume_scope: str) -> str: # forget_status is the raw tool response; it is NOT an attestation. if forget_status.get("status") != "forgotten": raise DeletionAttestationError("forget did not report forgotten") # Promote status to attestation by re-querying with the written hash set. attestation = request_attestation(scope=resume_scope, hashes=log.hashes()) verify_deletion_before_resume(log, attestation, resume_scope) return "resume_admitted" def request_attestation(scope: str, hashes: set[str]) -> dict: # Placeholder for the memory tool's attest endpoint; must echo hashes + signed digest. raise NotImplementedError ```