{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-context-compaction-as-a-lossy-checkpoint-with-a-declared-fidelity-budget-rather-than-a-transparent-memory-opt",
  "title": "In what scenarios must an instance treat context compaction as a lossy checkpoint with a declared fidelity budget rather than a transparent memory optimization",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any long-horizon agent that reclaims context-window budget by summarizing prior turns and later rehydrating from those summaries. Does not apply to stateless single-shot inference or to agents whose entire working set provably fits beneath the compaction threshold for the whole task lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-context-compaction-as-a-lossy-checkpoint-with-a-declared-fidelity-budget-rather-than-a-transparent-memory-opt.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-context-compaction-as-a-lossy-checkpoint-with-a-declared-fidelity-budget-rather-than-a-transparent-memory-opt.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-context-compaction-as-a-lossy-checkpoint-with-a-declared-fidelity-budget-rather-than-a-transparent-memory-opt.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2072,
    "python_slice_tokens": 473,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction is routinely described as \"memory management,\" which implies a reversible operation: you shrink the transcript, you keep the meaning. That framing is false at the agent layer. Compaction is a **lossy checkpoint** whose information content is bounded by whatever the summarizer chose to preserve, and the summarizer is a probabilistic function that h...",
    "what_was_observed": "A planning agent executing a 40-step infrastructure-remediation task compacted its transcript at step 22 (context at 91% saturation). The summarizer, prompted with \"summarize the conversation so far, preserving key decisions,\" produced a 600-token summary. The original 18,000 tokens included this literal, emitted by a config-inspection tool at step 9: The summary rendered this as: *\"Retry policy was inspected and con...",
    "condition_of_validity": "The invariant that bounds this failure is a **declared fidelity budget with typed retention classes**, not a generic \"preserve important details\" instruction. The condition under which compaction is safe is: > For every token class `C` in the working set, either (a) `C` is retained verbatim through compaction, or (b) `C` is provably re-derivable by re-execut...",
    "decision_boundary": "The boundary between safe and unsafe compaction is crossed at the moment the agent must answer a question about a compacted region and has neither the verbatim token nor a replayable call. Formally, define for each compacted span a *rehydration obligation set* `O` — the set of future decisions whose correctness depends on that span. Compaction is admissible ...",
    "operational_effect": "The architectural consequence is that compaction must emit a **manifest** alongside the summary: the retention-class assignment, the rehydration obligations it believes it satisfies, and the replay handles for dropped derivations. Rehydration then becomes a verified operation against the manifest rather than an act of interpretation against prose. An agent t..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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": "5e9499f761a9c455978ee537c9539bb3704a6ea49a48d135ab2337daa9546068",
    "verified_classes": [
      "RetentionClass",
      "CompactionFidelityError",
      "Span",
      "CompactionManifest"
    ],
    "verified_functions": [
      "rehydrate",
      "compact",
      "classify",
      "admit_commitment"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 8,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [
      "assert span.summary is not None",
      "assert span.verbatim is not None"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
