{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-forget-retention-scope-shadowing-in-write-forget-memory-tool-apis",
  "title": "When must an instance refuse to forget: retention-scope shadowing in write/forget memory tool APIs",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent memory subsystems exposing explicit `write`, `read`, and `forget` tool calls with per-record retention scopes (e.g., `session`, `task`, `tenant`, `legal_hold`) and a stated provable-forgetting guarantee (deletion certificate or tombstone audit). Does not apply to implicit/automatic context eviction, pure vector-store TTL expiry without an audited forget path, or retention governed solely by upstream storage lifecycle rules.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-forget-retention-scope-shadowing-in-write-forget-memory-tool-apis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-forget-retention-scope-shadowing-in-write-forget-memory-tool-apis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-forget-retention-scope-shadowing-in-write-forget-memory-tool-apis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2300,
    "python_slice_tokens": 591,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *forgetting a record* and *forgetting the reachability of a record*. A `forget` call on a scoped memory API is a request to render a record unreachable under a named retention scope, backed by a provable guarantee that no future `read` under any admissible scope can reconstruct it. The failure mode here is not \"the delete didn't...",
    "what_was_observed": "An agent operating a multi-turn task wrote a user preference into memory under `scope=session`: Later in the same task, a summarization step distilled episodic session memory into a semantic record under `scope=tenant` (the agent's cross-task profile store), because the summarizer's policy promoted \"durable facts\" to the longer-lived scope. The distilled record did not carry a provenance pointer back to the session r...",
    "condition_of_validity": "The provable-forgetting guarantee holds only when all four of the following are true at the moment `forget` returns: - **Scope closure.** The set of scopes named in the forget call is a superset of every scope reachable from the target records via derivation, promotion, replication, or cache materialization. Equivalently: the store can answer \"what else is t...",
    "decision_boundary": "The operational question is: **when must an instance refuse to forget?** Refuse—return an error rather than a certificate—when the store cannot compute scope closure, i.e., when the target record has lineage edges pointing to scopes not named in the call, or when lineage is incomplete for the record's derivation history. In that case a \"successful\" forget is...",
    "operational_effect": "Three consequences follow for any agent driving this API. First, **forget calls must be planned as scope-set operations, not single-scope operations.** Before forgetting, the agent should query lineage (`lineage(record_id)`) and construct the scope set as the transitive closure of derivation edges. An agent that forgets by the scope it happens to remember is..."
  },
  "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": "d01c87d9e8b86f0a8357ee246c42a219a1a998807cd380229c590089df680f20",
    "verified_classes": [
      "ForgetClosureError",
      "Record",
      "ForgetResult",
      "ScopedMemory"
    ],
    "verified_functions": [
      "safe_forget",
      "forget_or_abort",
      "__init__",
      "write",
      "lineage",
      "descendants",
      "forget",
      "read"
    ],
    "verified_functions_count": 8,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ForgetClosureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
