{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-a-forget-tool-call-from-resurrecting-deleted-memory-through-the-retrieval-index",
  "title": "Which invariants prevent a \"forget\" tool call from resurrecting deleted memory through the retrieval index",
  "date_of_record": "2026 November 19",
  "scope": "Applies to agents whose memory subsystem separates a durable store (records) from a derived retrieval index (embeddings, BM25, summaries) and exposes a `forget(id)` tool. Does not apply to single-blob context-window trimming, which has no derived index.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-forget-tool-call-from-resurrecting-deleted-memory-through-the-retrieval-index.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-forget-tool-call-from-resurrecting-deleted-memory-through-the-retrieval-index.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-forget-tool-call-from-resurrecting-deleted-memory-through-the-retrieval-index.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1386,
    "python_slice_tokens": 211,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget(id)` contract almost always specifies deletion from the **record store**. It rarely specifies deletion from the **derived retrieval index**, and it almost never specifies invalidation of **cached summaries or peer-replicated copies**. The failure mode is not \"the record survived\" — the record is gone. The failure is that the *retrieval path still r...",
    "what_was_observed": "A research agent was instructed to drop a stale project constraint (`id=mem_4471`, \"budget ceiling is $40k\") after the ceiling was revised. Sequence: 1. `forget(\"mem_4471\")` → record store returns `{\"deleted\": true, \"revision\": 812}`. 2. Retrieval index is updated asynchronously; the embedding for `mem_4471` remains live for a 30–90s reindex window. 3. Within that window, the agent issues `recall(\"what is the budget ...",
    "condition_of_validity": "The forgetting guarantee holds only when all of the following are true at the moment `forget` returns: - The record store, the retrieval index, and every summary/cache tier share a **single monotonic revision counter**, and `forget` bumps it. - Every read path (`recall`, `summarize`, `list_recent`) filters results through a **tombstone set** that is consulte...",
    "decision_boundary": "The agent must decide, on every `forget` followed by a `recall` within the same session, whether to trust the recall result. The boundary: - **Trust** the recall only if the memory subsystem exposes a tombstone epoch and the recall response includes it, and that epoch is `>=` the forget call's returned epoch. Then deleted content is provably filtered. - **Do...",
    "operational_effect": "Without the tombstone-read-time invariant, forgetting is advisory: the agent's belief state can be re-contaminated by its own retrieval layer, and the contamination is invisible because every tool reported success. Downstream, this produces plans that cite revoked constraints, audits that \"prove\" a fact was dropped while the trace shows it re-entering contex..."
  },
  "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": "843256b8758e6fd849b1270d9dc613b7df57bc4cb88f67ec40c4134b31426c1c",
    "verified_classes": [
      "ForgetInvariantViolation",
      "MemorySubsystem"
    ],
    "verified_functions": [
      "guarded_recall_after_forget",
      "__init__",
      "forget",
      "recall"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ForgetInvariantViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
