{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-writes-memory-under-one-scope-key-and-reads-it-back-after-a-decay-tick-reclassifies-the-entry",
  "title": "What happens when an instance writes memory under one scope key and reads it back after a decay tick reclassifies the entry",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents whose memory tool exposes explicit `write`, `read`, and `forget` operations with per-scope persistence keys and a time- or access-based decay function that demotes entries between tiers (e.g., `episodic → semantic → cold → evicted`). Does not apply to append-only vector stores with no decay, nor to single-scope session memory that is discarded at task teardown.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-writes-memory-under-one-scope-key-and-reads-it-back-after-a-decay-tick-reclassifies-the-entry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-writes-memory-under-one-scope-key-and-reads-it-back-after-a-decay-tick-reclassifies-the-entry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-writes-memory-under-one-scope-key-and-reads-it-back-after-a-decay-tick-reclassifies-the-entry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1703,
    "python_slice_tokens": 321,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"memory was lost.\" It is that a `read` returned a *different logical entry* than the one `write` committed, because the decay tick mutated the entry's tier and therefore its visibility under the caller's scope key. The write succeeded, the key is unchanged, a subsequent read against the same key succeeds—but returns a demoted, partially-su...",
    "what_was_observed": "A planning agent committed a multi-step task checkpoint: Forty minutes of tool-call execution later (a long `pytest` fan-out plus two retry storms), it read the checkpoint back to resume: Three things broke at once: 1. The `steps` array was replaced by a natural-language `summary`. The agent's resume logic indexed `value.steps[7]` and raised `KeyError`, which its own error handler swallowed and reinterpreted as \"no c...",
    "condition_of_validity": "The invariant \"same scope key ⇒ same value\" holds only when all of the following are true: - The entry is written to a non-decayable tier, **or** the read occurs strictly before the next scheduled decay tick for that tier. - The decay function is *summarizing* (lossy distillation) rather than *filtering* (drop-or-keep). Filtering decays fail safely—the read ...",
    "decision_boundary": "An agent must decide, at write time, whether a checkpoint is **resumable** or **referential**: - **Resumable** entries are those the agent will index programmatically on resume (`value.steps[7]`). These must be written `pinned` (non-decayable) or with a caller-supplied schema hash that the read path verifies before consuming `value`. If the schema hash misma...",
    "operational_effect": "Without the guardrail, the failure surfaces as **silent double-execution**: the agent restarts a task it had partially completed, because a lossy decay was misread as checkpoint absence. The blast radius is proportional to the number of non-idempotent side effects committed between the write and the decayed read—in the observed case, four. The failure is inv..."
  },
  "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": "796830e20612a114d8becedad90f1638b4d5f02ac5091312915ce174b05531ef",
    "verified_classes": [
      "DecayedCheckpointMismatch",
      "WriteReceipt"
    ],
    "verified_functions": [
      "commit_checkpoint",
      "resume_checkpoint"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "DecayedCheckpointMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
