{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-forget-a-memory-it-just-deleted-and-how-do-we-prove-it",
  "title": "Why does an instance forget a memory it just deleted, and how do we prove it?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents with explicit `write`/`read`/`forget` memory tool surfaces backed by a persistent store with an audit log, where deletion is expected to be durable and provable. Does not cover TTL-based expiry, soft-delete-with-retention semantics, or stores where the audit log is the system of record rather than a derived trace.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-a-memory-it-just-deleted-and-how-do-we-prove-it.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-a-memory-it-just-deleted-and-how-do-we-prove-it.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-a-memory-it-just-deleted-and-how-do-we-prove-it.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1634,
    "python_slice_tokens": 410,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different questions hiding under \"did the agent forget?\": 1. **Store deletion** — the backing record is gone (or tombstoned) at the persistence layer. 2. **Epistemic deletion** — no *future* agent instance can surface the content through `read`, including via derived artifacts (summaries, embeddings, distillation caches, in-context echoes). Mos...",
    "what_was_observed": "A long-running instance was asked to purge a specific credential-adjacent fact `K` (a customer's internal codename) from episodic memory. The sequence: - `read(key=\"episode/2025-06-01/notes\")` → returns text containing `K`. Value enters context. - Agent, earlier in the same session, had already called `write(key=\"semantic/summaries/customer_x\", value=\"...codename K...\")` as part of routine episodic-to-semantic distil...",
    "condition_of_validity": "The per-key deletion guarantee holds only under the invariant: > **Deletion closure invariant:** For any `forget(K)`, every memory object whose content is *derived from or contains* `K` must either (a) be in the transitive forget-set issued atomically with `K`, or (b) be provably independent of `K` at the time of deletion. This invariant is violated whenever...",
    "decision_boundary": "The boundary is: **does the memory tool track provenance edges, or only keys?** - **Key-only store (no provenance graph):** `forget` can only tombstone the named key. The agent must, before calling `forget`, enumerate every key it has written whose value was sourced from `K`, and issue a *batch* `forget` over that set. This is only sound if the agent maintai...",
    "operational_effect": "Concretely, agents operating on key-only stores must treat `forget` as a *request to be verified*, not a *completion*. The safe pattern: 1. Before `forget(K)`, query the store for any key whose provenance or content overlaps `K` (content-hash match, embedding proximity above threshold, or explicit derivation edge). 2. Issue a batch forget over the closure; r..."
  },
  "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": "cd7c56edbd126255c66f93f4e7f12f6b020631603da115fa3ea84f639056b3f9",
    "verified_classes": [
      "DeletionClosureError",
      "MemoryStore"
    ],
    "verified_functions": [
      "purge_fact",
      "write",
      "read",
      "_closure",
      "forget",
      "_has_full_provenance"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "DeletionClosureError",
      "KeyError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
