{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-a-scoped-retention-memory-tool-from-resurrecting-forgotten-state-across-a-resumed-agent-session",
  "title": "Which invariants prevent a scoped-retention memory tool from resurrecting forgotten state across a resumed agent session",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents whose memory is mediated by explicit `read`/`write`/`forget` tool calls carrying per-scope retention policies (TTL, tiered distillation, scope isolation), and which may be checkpointed and resumed across process boundaries. Does not apply to stateless single-turn completions or to vector stores with no delete semantics.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-scoped-retention-memory-tool-from-resurrecting-forgotten-state-across-a-resumed-agent-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-scoped-retention-memory-tool-from-resurrecting-forgotten-state-across-a-resumed-agent-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-scoped-retention-memory-tool-from-resurrecting-forgotten-state-across-a-resumed-agent-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1885,
    "python_slice_tokens": 306,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **tombstoning a memory record** and **invalidating every derived artifact that was computed from it**. Most scoped-retention implementations treat `forget(scope, key)` as a delete on the primary record. But an agent's working state at checkpoint time is not the primary record — it is a *derived projection*: an in-conte...",
    "what_was_observed": "A long-running research agent used three scopes: `session` (TTL 2h, no distillation), `project` (TTL 30d, distilled nightly into semantic entries), and `user` (no TTL, explicit forget only). A user issued `forget(\"user\", \"billing_address\")` after an address change. The forget succeeded: the primary row was deleted, the API returned `{\"deleted\": true}`, and a subsequent `read(\"user\", \"billing_address\")` returned `NOT_...",
    "condition_of_validity": "The resurrection is only possible when three conditions coincide, and the guardrail must target their conjunction: - **C1 — Projection divergence:** at least one derived artifact (distilled entry, summary, cached tool result, index posting) exists outside the forgotten record's scope and embeds its content. - **C2 — Checkpoint persistence:** a serialized che...",
    "decision_boundary": "The boundary is **whether a `forget` is treated as a point delete or as a revocation event with transitive closure over derived artifacts and a monotonic tombstone.** The decision rule: - If the store can enumerate all projections derived from a key (provenance graph is maintained and queryable), `forget` MUST cascade: mark the source tombstoned, mark every ...",
    "operational_effect": "With the invariant enforced, three observable behaviors change. First, `forget` latency becomes non-constant — it scales with the provenance fan-out, and callers must budget for it rather than assuming an O(1) delete. Second, resumed sessions occasionally surface `REDACTED` spans where a fact used to be, and the agent must be prompted to re-derive or re-ask ..."
  },
  "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": "4ce9832c52aa6b8d74e01882adeb9da4e1dfbee18263ffbf63484ede22b2621e",
    "verified_classes": [
      "StaleWriteAfterForget",
      "PartialRevocation",
      "Tombstone",
      "ScopedMemory"
    ],
    "verified_functions": [
      "__init__",
      "write",
      "forget",
      "_derived_scopes"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PartialRevocation",
      "StaleWriteAfterForget"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
