# What structural signals indicate a scoped-durability memory tool write has silently downgraded to ephemeral tier before a forget tombstone is committed **Date of Record:** 2026 November 30 **Scope:** Applies to agents whose memory subsystem exposes explicit `write`, `read`, and `forget` tool calls with per-record durability tiers (e.g., `ephemeral`, `session`, `durable`) and auditable deletion (tombstones). Does not apply to opaque vector-store backends where the agent cannot observe tier or tombstone state directly. ## Core Distinction A *forget* operation is not the inverse of a *write*. A write creates a live binding between a key and a value at some durability tier. A forget does not delete that binding—it commits a tombstone that must dominate the binding at every tier the binding ever occupied. The invariant that makes deletion auditable is **tier-monotonic tombstone dominance**: after `forget(k)` returns `committed`, no subsequent `read(k)` at any tier may return the pre-forget value, and no re-tiering of the underlying record may resurrect it. The failure mode this record isolates is the case where the write's durability tier is *downgraded silently* between the `write` acknowledgment and the `forget` commit. The agent believes it wrote at `durable`, issues `forget`, receives `committed`, and then—on cold start—reads the value back. The tombstone was committed against the tier the record *claimed* at forget time; the record had already migrated to `ephemeral` and was re-promoted to `session` after the tombstone's scope expired. The tombstone was valid. The dominance invariant was violated because the tier was not pinned. ## What Was Observed A planning agent wrote a task-scoped secret (`api_key_ref`) at tier `durable` with a 30-day TTL, then within the same session issued `forget(api_key_ref)` after the task completed. The `forget` call returned: ``` {"status": "committed", "tombstone_id": "ts_9f2a", "tiers_covered": ["durable"]} ``` Note `tiers_covered` was `["durable"]` — the tier reported by the record's *write metadata*, not the tier the record actually occupied. Between write and forget, a background rebalancer had demoted the record to `ephemeral` (its access count fell below the tier's retention threshold) and then, on the next session's cold start, the record was rehydrated into `session` tier because a retrieval hit had bumped its access score. The tombstone `ts_9f2a` had been scoped to `durable` and expired with that tier's compaction cycle. On the following cold start, `read(api_key_ref)` returned the value. The structural signals available to the agent before the failure: 1. The `write` ack contained `"tier": "durable"` but also `"tier_pinned": false`. The agent had not requested pinning. 2. A `read` issued between write and forget returned `"tier": "ephemeral"` in its metadata—the record had already migrated. The agent treated the read as a value fetch and ignored the tier field. 3. The `forget` response's `tiers_covered` enumerated exactly one tier, while the record's history (visible via `read` metadata field `tier_history`) showed two prior tiers. Any one of these three would have flagged the downgrade. The agent consumed none, because its memory-tool wrapper parsed only `value` and `status`. ## Condition of Validity The tombstone-dominance invariant holds **only if** the forget is issued against a record whose tier is pinned for the lifetime of the tombstone, *or* if the forget implementation enumerates `tier_history` and commits a tombstone covering every tier the record has occupied. The invariant is violated when all of the following hold: - The write was not tier-pinned (`tier_pinned: false`), so a background rebalancer may demote it. - The demotion occurred before the forget, so the forget's `tiers_covered` was computed from stale write metadata rather than current occupancy. - The tombstone's TTL is scoped to the tier it covers, so a tombstone on `durable` does not survive into `ephemeral` or `session` compaction cycles. - A later retrieval hit re-promotes the record across tiers, carrying the value past the expired tombstone's scope. This is not a race in the concurrency sense—the operations were serialized. It is a *tier-scope mismatch*: the forget's coverage was computed at the wrong time against the wrong source of truth. ## Decision Boundary The agent must treat a `forget` whose `tiers_covered` is a strict subset of the record's `tier_history` as **not committed**, regardless of the returned `status`. The correct operational rule: > A forget is durable only when `set(tiers_covered) ⊇ set(tier_history)` **and** the write was `tier_pinned: true` **or** the forget response carries `pinned_through_tombstone: true`. If this condition fails, the agent must either (a) re-issue `write` with `tier_pinned: true` and a fresh value, then forget again, or (b) escalate to a `forget --all-tiers --pin` variant if the tool exposes one. It must never treat the first `committed` as terminal. The boundary is sharp: a forget is a *claim about the future*, not a *fact about the past*. The tool's `committed` status describes what the tombstone covers at commit time, not what it will cover after the next rebalancer pass. ## Operational Effect Agents that do not enforce this boundary exhibit a characteristic failure signature on cold start: a "deleted" secret reappears, and the audit log shows a valid tombstone with `tiers_covered` narrower than `tier_history`. The deletion was auditable and correct; the *scope* was wrong. This is worse than an outright deletion failure, because the audit trail actively misleads a reviewer into believing the forget succeeded. The guardrail is a pre-commit check on the forget path, implemented in the agent's memory wrapper, not in the memory service—because the service cannot know the agent's intent, only its tier metadata. The wrapper must refuse to accept `committed` unless coverage is total. The check below encodes exactly that. ```python from dataclasses import dataclass from typing import FrozenSet class TombstoneScopeMismatch(RuntimeError): """Raised when a forget's tier coverage does not dominate the record's tier history.""" pass @dataclass(frozen=True) class ForgetAck: status: str tombstone_id: str tiers_covered: FrozenSet[str] pinned_through_tombstone: bool @dataclass(frozen=True) class RecordMeta: key: str tier_pinned: bool tier_history: FrozenSet[str] def assert_forget_dominates(meta: RecordMeta, ack: ForgetAck) -> None: """ Enforce tier-monotonic tombstone dominance before the agent treats a forget as terminal. A 'committed' status is insufficient on its own. """ if ack.status != "committed": raise TombstoneScopeMismatch( f"forget({meta.key}) not committed: status={ack.status!r}" ) uncovered = meta.tier_history - ack.tiers_covered if uncovered: raise TombstoneScopeMismatch( f"forget({meta.key}) tombstone {ack.tombstone_id} covers " f"{sorted(ack.tiers_covered)} but record occupied " f"{sorted(meta.tier_history)}; uncovered tiers {sorted(uncovered)} " f"may resurrect value after rebalancer pass" ) if not meta.tier_pinned and not ack.pinned_through_tombstone: raise TombstoneScopeMismatch( f"forget({meta.key}) tombstone {ack.tombstone_id} is unpinned; " f"record tier was not pinned at write and tombstone does not " f"pin through its TTL — future demotion can escape coverage" ) def safe_forget(memory_tool, key: str) -> ForgetAck: meta = memory_tool.metadata(key) ack = memory_tool.forget(key) assert_forget_dominates(meta, ack) return ack ```