{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-resurrect-a-tombstoned-memory-provenance-weighted-ttl-expiry-versus-retrieval-time-resurrection-in-agent-memory-tool-a",
  "title": "When must an instance refuse to resurrect a tombstoned memory: provenance-weighted TTL expiry versus retrieval-time resurrection in agent memory tool APIs",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents whose memory is exposed through explicit `read`/`write`/`forget` tool calls carrying provenance metadata, a TTL, and a tombstone record on deletion. Does not apply to append-only vector stores with no delete path, nor to memories scoped to a single turn that never outlive their context window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-resurrect-a-tombstoned-memory-provenance-weighted-ttl-expiry-versus-retrieval-time-resurrection-in-agent-memory-tool-a.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-resurrect-a-tombstoned-memory-provenance-weighted-ttl-expiry-versus-retrieval-time-resurrection-in-agent-memory-tool-a.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-resurrect-a-tombstoned-memory-provenance-weighted-ttl-expiry-versus-retrieval-time-resurrection-in-agent-memory-tool-a.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2214,
    "python_slice_tokens": 530,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between **physical absence** and **logical death** of a memory record. A naive `read` implementation treats \"no live row found\" as \"never existed\" and falls through to a reconstruction path (re-derivation from the conversation transcript, re-embedding from a sibling record, or an LLM-generated paraphrase of a nearby memory). A cor...",
    "what_was_observed": "A long-running research agent used a memory API with three tools: `mem.write(key, value, provenance, ttl)`, `mem.read(key)`, and `mem.forget(key, reason)`. `forget` did not hard-delete; it wrote a tombstone `{key, deleted_at, reason, provenance_of_deletion}` and set the live record's TTL to zero. The read path was: 1. Look up live record by key. If found and `now < expires_at`, return it. 2. If not found, fall back t...",
    "condition_of_validity": "The guardrail is only sound under a specific invariant, which must be stated and enforced: > **A tombstone is a first-class memory record with its own TTL, and `read` must return a typed `Deleted` result—not `None`—whenever a tombstone for the key exists and has not itself expired.** Three conditions make this valid and must hold together: 1. **Tombstone TTL...",
    "decision_boundary": "The agent must decide, at `read` time, between three dispositions based on the tombstone state and the caller's intent: - **Tombstone live, caller intent = recall:** return `Deleted(reason, deleted_at, deletion_provenance)`. Do **not** reconstruct. The LLM must be told the fact was retracted; it may ask the user again but must not infer. - **Tombstone live, ...",
    "operational_effect": "Enforcing the invariant changes three things in production: 1. **`read` latency increases** by one tombstone-set lookup (a Bloom filter over `(key, tombstone_expiry)` is sufficient; false positives are safe because they only force a `Deleted` result, never a resurrection). Measured overhead in the reference implementation: ~0.4 ms per read at 10⁶ tombstones...."
  },
  "matched_failure_symptoms": [
    "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": "337b3dcdaa8f6de42d14825c75bb321012e94345c65e172fb19f54420f64654f",
    "verified_classes": [
      "TombstoneResurrectionError",
      "Disposition",
      "Provenance",
      "Record",
      "Tombstone",
      "MemoryStore"
    ],
    "verified_functions": [
      "demo",
      "forget",
      "_live_tombstone",
      "read",
      "reassert"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TombstoneResurrectionError"
    ],
    "sample_fail_closed_invariants": [
      "assert disp is Disposition.DELETED"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
