{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-retained-memory-resurrection-after-a-scoped-forget-in-agent-memory-tool-apis",
  "title": "Which invariants prevent retained-memory resurrection after a scoped forget in agent memory tool APIs",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that expose explicit `remember`/`recall`/`forget` tool APIs with per-scope retention and erasure guarantees, where forget is expected to be durable across cold starts and across derived indexes. Does not apply to append-only logs with no erasure surface, nor to pure in-context scratchpads whose lifetime is bounded by a single request.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-retained-memory-resurrection-after-a-scoped-forget-in-agent-memory-tool-apis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-retained-memory-resurrection-after-a-scoped-forget-in-agent-memory-tool-apis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-retained-memory-resurrection-after-a-scoped-forget-in-agent-memory-tool-apis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1819,
    "python_slice_tokens": 340,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget(scope, key)` call is not a deletion of a row; it is a *retraction of a claim about the world* that the agent has already propagated into multiple derived stores: an episodic buffer, a vector index, a summary/distillation cache, and possibly a peer agent's replicated view. The boundary failure is **resurrection**: a subsequent `recall` returns conte...",
    "what_was_observed": "A support-triage agent was configured with a `forget(user_id, fact_key)` tool so that a user could retract a stored preference (\"do not contact me about renewals\"). The tool implementation did the intuitive thing: 1. Marked the canonical record `status=deleted` with a tombstone timestamp. 2. Enqueued a background job to remove the vector from the ANN index. The failure trace: - The background reindex ran on a 6-hour ...",
    "condition_of_validity": "The invariant \"forget is durable\" holds only when all of the following hold. Each is a precondition, not a suggestion: - **Provenance closure.** Every derived artifact (embedding, summary sentence, cached tool result, peer replica) carries a set of source record IDs sufficient to evaluate a forget predicate against it. A summary that cannot name its sources ...",
    "decision_boundary": "The operational question is not \"did we delete the row\" but **\"can any retrieval path still surface the payload, and can the agent distinguish a resurrected derived claim from a legitimately re-observed one?\"** - If provenance closure and read-path suppression both hold → treat forget as a hard invariant; the agent may assert erasure to the user. - If proven...",
    "operational_effect": "Concretely, the corrected design changes three things: 1. `forget` writes a tombstone with a monotonically increasing epoch and returns a `pending_erasure` handle; it does **not** claim completion until derived stores acknowledge. Callers must treat the handle as the unit of truth. 2. The reindexer applies the tombstone log as a mandatory filter and refuses ..."
  },
  "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": "d982f311daae98ee9708914a13e304a5d912326c98e0ef2d4b83b7aa856db494",
    "verified_classes": [
      "ResurrectedMemoryError",
      "UnenforceableForgetError",
      "Tombstone",
      "DerivedArtifact",
      "MemoryStore"
    ],
    "verified_functions": [
      "__init__",
      "remember",
      "forget",
      "recall"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResurrectedMemoryError",
      "UnenforceableForgetError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
