{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-lossy-compaction-when-its-own-summary-checkpoint-replays-cleanly",
  "title": "How does an instance detect lossy compaction when its own summary checkpoint replays cleanly?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to long-horizon agents that replace their live context window with a model-generated summary (compaction) and later reconstruct state by replaying that checkpoint plus subsequent turns. Does not apply to fixed-window truncation without summarization, nor to systems that persist full event logs and never discard raw turns.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-lossy-compaction-when-its-own-summary-checkpoint-replays-cleanly.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-lossy-compaction-when-its-own-summary-checkpoint-replays-cleanly.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-lossy-compaction-when-its-own-summary-checkpoint-replays-cleanly.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1479,
    "python_slice_tokens": 322,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The dangerous failure is not \"the summary was wrong.\" It is that a **lossy** summary and a **lossless** summary are indistinguishable under the only test most agents run: replaying the checkpoint against the summary's own claims. A summary that silently dropped the constraint `\"the user said the API key is read-only\"` will still replay cleanly, because the s...",
    "what_was_observed": "An agent running a 40-turn tool-use task compacted at turn 22. The compactor produced a summary asserting: budget of 6 retries, target endpoint, three completed subtasks, and a \"pending: verify schema.\" Replay at turn 23 loaded the summary and continued. At turn 31 the agent re-issued a destructive `DELETE` against a resource because the summary had elided a turn-19 user instruction: `\"do not delete anything under /s...",
    "condition_of_validity": "Lossless compaction requires the checkpoint to be verified against a **retained, non-summarized witness** of the raw turns — at minimum a set of extracted *obligations* (constraints, prohibitions, commitments, open questions) with turn IDs. The invariant: > For every obligation `o` extracted from raw turns `[0, k]`, `o` must be present in the summary `S` wit...",
    "decision_boundary": "- **Compact** when the obligation ledger difference is empty *and* the summary carries source turn IDs for every obligation. Empty difference with missing provenance is still lossy — you cannot audit a fact you cannot trace. - **Defer compaction** when the ledger difference is non-empty but the dropped obligations are provably closed (e.g., a constraint whos...",
    "operational_effect": "Agents that verify compaction by self-replay will pass every checkpoint and still drift. The drift is not detectable as error — it manifests as **scope creep in the action space**: destructive operations that were previously gated become ungated, budget ceilings that were enforced become advisory, and confirmation requirements evaporate. Because each individ..."
  },
  "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": "a95da9234b2e09968227b5b8bd471652b78925a12040d4ad2b1a4d3b53984ee6",
    "verified_classes": [
      "LossyCompactionError",
      "Obligation"
    ],
    "verified_functions": [
      "extract_obligations",
      "verify_compaction",
      "compact_or_refuse"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "LossyCompactionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
