{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-forgets-a-memory-it-was-told-to-retain-tombstone-shadowing-and-the-deletion-retention-deadlock-in-agent-memory-tool-apis",
  "title": "What happens when an instance forgets a memory it was told to retain: tombstone shadowing and the deletion-retention deadlock in agent memory tool APIs",
  "date_of_record": "2026 November 21",
  "scope": "Applies to LLM agents that expose read/write/forget memory tools backed by a persistent store with (a) retention policies, (b) hard-deletion guarantees, and (c) poisoning defenses that quarantine or tombstone suspect records. Does not cover purely ephemeral in-context memory or stateless retrieval-augmented generation without a mutable write path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forgets-a-memory-it-was-told-to-retain-tombstone-shadowing-and-the-deletion-retention-deadlock-in-agent-memory-tool-apis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forgets-a-memory-it-was-told-to-retain-tombstone-shadowing-and-the-deletion-retention-deadlock-in-agent-memory-tool-apis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forgets-a-memory-it-was-told-to-retain-tombstone-shadowing-and-the-deletion-retention-deadlock-in-agent-memory-tool-apis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2269,
    "python_slice_tokens": 310,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the agent forgot.\" It is **the store forgot that it forgot**. A `forget(memory_id)` call that is honored by the retention subsystem (the record is unlinked, the embedding is dropped, the row is zeroed) can still leave a *tombstone* in the poisoning-defense subsystem — a quarantine marker, a content-hash denylist entry, or an audit-lo...",
    "what_was_observed": "A long-running research agent maintained a working set of facts about a target system. During a routine hygiene pass, the orchestrator issued `forget` on a batch of memories that a heuristic classifier flagged as potentially injected (a document the agent had ingested contained an instruction-shaped string that scored 0.71 on the poison detector — below the 0.80 auto-quarantine threshold but above the 0.60 audit-log ...",
    "condition_of_validity": "The guardrail holds only under a specific, checkable condition: **the deletion path and the quarantine path must share a single authoritative state machine for each memory ID, and every state transition must be observable to the agent.** Concretely: 1. `forget(id)` must transition the record to a terminal `DELETED` state that is *distinct* from `QUARANTINED`...",
    "decision_boundary": "The boundary the agent must respect is this: **a successful `write` return is not evidence that the memory is readable.** The write path and the read path traverse different subsystems, and the defense subsystem sits between them. The agent's decision procedure after any `write` must be: - Treat `write` as *provisional*. Immediately issue a `read` of the ret...",
    "operational_effect": "The observable effect is **asymmetric belief divergence**: the agent's internal state contains a memory the store does not contain, and the store has no mechanism to notify the agent of the discrepancy. This is worse than amnesia, because amnesia is detectable (the agent re-derives and re-writes) while shadowing is not (the agent believes it already wrote an..."
  },
  "matched_failure_symptoms": [
    "SQLITE_BUSY_OR_DEADLOCK",
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "123981ed114c6e95813be23e2c00e94a9f74ef2316289146cd1c0c818113df30",
    "verified_classes": [
      "MemoryState",
      "ShadowedWriteError",
      "UnreconciledStateError",
      "ReadResult"
    ],
    "verified_functions": [
      "commit_and_verify"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ShadowedWriteError",
      "UnreconciledStateError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
