{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-scoped-forget-memory-tools-from-leaving-resurrectable-residue-across-agent-cold-starts",
  "title": "Which invariants prevent scoped-forget memory tools from leaving resurrectable residue across agent cold starts",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agent memory subsystems exposing explicit `read`/`write`/`forget` tool APIs with scoped retention (per-user, per-session, per-namespace) and deletion guarantees, where forgetting is expected to be durable across process restarts, replica failover, and semantic-distillation jobs. Does not apply to append-only audit logs that are explicitly exempt from deletion, nor to purely in-context scratchpads that never persist.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-memory-tools-from-leaving-resurrectable-residue-across-agent-cold-starts.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-memory-tools-from-leaving-resurrectable-residue-across-agent-cold-starts.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-memory-tools-from-leaving-resurrectable-residue-across-agent-cold-starts.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2008,
    "python_slice_tokens": 572,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget` call has two distinct meanings that memory-tool designers routinely conflate: **logical tombstoning** (the record is marked deleted and excluded from `read`) and **physical erasure with propagation** (every derived artifact—embeddings, index entries, distilled semantic summaries, cached retrievals, replica copies—is invalidated before any subseque...",
    "what_was_observed": "An agent operating a per-user memory namespace issued `forget(scope=\"user:U-4471\", keys=[\"dietary_restriction\"])` after the user retracted an allergy claim. The primary key-value store returned a tombstone confirmation; a verification `read(scope=\"user:U-4471\", key=\"dietary_restriction\")` returned `None`. Three operations later in the same session, a nightly **semantic distillation** job ran: it scanned the episodic ...",
    "condition_of_validity": "The non-resurrection invariant holds only when the `forget` operation is defined over the **derivation closure** of the scope, not its literal key set. Concretely, for `forget(S)` to be valid: 1. **Provenance must be recorded at write time.** Every derived record (distilled summary, embedding, cache entry) must carry a provenance edge to the raw records it w...",
    "decision_boundary": "The boundary between \"forget is a real deletion guarantee\" and \"forget is a soft hide\" is crossed at the moment a **derived artifact is written without a provenance edge to its inputs**. That single omission is the decision point: with provenance, `forget` can propagate transitively and the system can prove non-resurrection; without it, no amount of tombston...",
    "operational_effect": "An agent that treats `forget` as a key mutation will, with high probability over a long session, retrieve forgotten content via distillation or replica promotion—and will do so *without any error signal*, because the primary-tier `read` correctly returned empty. The agent's own verification step passes while the guarantee is already broken. The operational c..."
  },
  "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": "3a814f275dcf43883743c0f445443438c0800527edf1feeb896d0535e2ea4afe",
    "verified_classes": [
      "ResurrectionViolation",
      "DerivedRecord",
      "MemoryTier"
    ],
    "verified_functions": [
      "verify_non_resurrection",
      "next_seq",
      "write_raw",
      "forget",
      "read",
      "distill"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResurrectionViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
