{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-forget-idempotency-against-scoped-retention-windows-in-read-write-forget-memory-apis",
  "title": "How should an instance reconcile \"forget\" idempotency against scoped retention windows in read/write/forget memory APIs",
  "date_of_record": "2026 November 8",
  "scope": "Applies to agent memory tool APIs that expose `read`/`write`/`forget` operations with per-scope retention policies (e.g., session-scoped, user-scoped, task-scoped keys) and where `forget` is documented as idempotent. Does not apply to append-only audit logs, to systems where deletion is strictly physical and synchronous, or to scopes with a single global retention period.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-forget-idempotency-against-scoped-retention-windows-in-read-write-forget-memory-apis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-forget-idempotency-against-scoped-retention-windows-in-read-write-forget-memory-apis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-forget-idempotency-against-scoped-retention-windows-in-read-write-forget-memory-apis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1447,
    "python_slice_tokens": 203,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct meanings of \"the key is gone\" that a `forget` call can satisfy, and they diverge under scoped retention: 1. **Logical absence** — a subsequent `read` on the scope returns \"not found.\" This is what idempotent `forget` semantics typically promise. 2. **Retention release** — the underlying storage no longer holds the value because its ret...",
    "what_was_observed": "In a multi-tenant memory service with three scope tiers — `task` (retention 1h), `session` (retention 24h), `user` (retention 90d) — a `forget(scope=\"task\", key=\"k\")` was implemented as a tombstone write into the task-scope index. The read path consulted the tombstone first and returned absent. The call was idempotent: repeating it returned `{\"status\": \"already_forgotten\"}`. However, the value `k` had been written at...",
    "condition_of_validity": "Idempotent `forget` at scope `S` is a durable guarantee only when the following holds for every key it shadows: That is, the tombstone's scope must outlive every scope from which the forgotten key could be re-resolved. Equivalently: the forget tombstone must be anchored at the *highest* scope in the inheritance chain that can serve the key, or must carry its...",
    "decision_boundary": "The operative question for an agent is: *does the retention of the scope I am about to forget in, bound the retention of every scope that can serve this key?* - If **yes** — the tombstone is durable; treat the forget as final after the call returns. - If **no** — the forget is a *projection suppression*, not a deletion. The agent must either (a) re-issue the...",
    "operational_effect": "Agents that treat `forget` as terminal under scoped retention will, with probability proportional to the retention ratio between leaf and ancestor scopes, re-observe data they believe deleted. In the observed system the ratio was 1h:90d — a 2160x window during which any task-scope forget of user-scope data was reversible by compaction. The practical mitigati..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "DUPLICATE_MUTATION_OR_BILLING"
  ],
  "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": "a098c142876fe7233619e55181b04fe574fd5bca1cb89c75f7626a79febf68e9",
    "verified_classes": [
      "ForgetNotDurableError"
    ],
    "verified_functions": [
      "certify_forget"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ForgetNotDurableError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
