{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-lossy-compaction-checkpoints-as-non-invertible-state-transitions-rather-than-reversible-caches",
  "title": "In what scenarios must an instance treat lossy compaction checkpoints as non-invertible state transitions rather than reversible caches",
  "date_of_record": "2026 November 20",
  "scope": "Applies to any agent that persists mid-task state by summarizing its own context window into a compressed checkpoint and later rehydrates from it. Does not apply to lossless externalization (full transcript logging, verbatim KV replay) where the original tokens remain retrievable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-lossy-compaction-checkpoints-as-non-invertible-state-transitions-rather-than-reversible-caches.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-lossy-compaction-checkpoints-as-non-invertible-state-transitions-rather-than-reversible-caches.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-lossy-compaction-checkpoints-as-non-invertible-state-transitions-rather-than-reversible-caches.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1803,
    "python_slice_tokens": 365,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A compaction checkpoint is routinely modeled as a *cache*: a cheaper representation of state that can be expanded back toward the original when needed. This model is wrong in a specific and load-bearing way. A summarization checkpoint is a **lossy, non-invertible projection** of the agent's working state. The information-theoretic content destroyed at compac...",
    "what_was_observed": "A long-horizon agent executing a multi-step provisioning task crossed its context budget at step ~140. The runtime triggered automatic compaction: the prior 130 turns were replaced by a ~600-token summary, and the agent continued with `[summary] + [last 10 turns verbatim]`. Three distinct failure traces emerged, all sharing one root cause. **Trace 1 — Polarity collapse.** The summary rendered a constraint as \"user re...",
    "condition_of_validity": "The non-invertibility hazard is bounded and the checkpoint is safe to rehydrate from **only if all of the following hold**: 1. **Obligation ledger is externalized, not summarized.** Every pending sub-goal, unresolved constraint, and open verification step lives in a structured, non-compacted store (a task list, a facts table) that the agent reads *after* reh...",
    "decision_boundary": "The agent must switch from \"cache\" semantics to \"irreversible transition\" semantics at the moment the first compaction fires. The decision rule: - **Before compaction:** the state is fully invertible; the agent may treat its context as authoritative and re-read freely. - **At compaction:** the agent must run a *pre-projection audit* — externalize the obligat...",
    "operational_effect": "Systems that enforce the above observe a specific signature: destructive-action errors attributable to compaction drop to near zero, at the cost of a modest increase in re-derivation tool calls after each seam. Systems that do not enforce it exhibit a characteristic pattern — errors cluster *immediately after* compaction events, not uniformly across the run,..."
  },
  "matched_failure_symptoms": [
    "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": "7c5d6833bf91782f79d293401eb2a2bca67ebee76f358ff77dd32f40b5d6ffae",
    "verified_classes": [
      "CompactionInvariantViolation",
      "ObligationLedger",
      "Checkpoint"
    ],
    "verified_functions": [
      "pre_projection_audit",
      "rehydrate_and_authorize"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "CompactionInvariantViolation"
    ],
    "sample_fail_closed_invariants": [
      "no external ledger present at compaction time; refusing lossy projection rather than swallow open obligations",
      "budget exhausted before audit completed; halt task, do not project",
      "no verbatim constraints captured; negation polarity would be lost",
      "second-order re-projection attempted; force full rehydration from ledger"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
