{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-auto-compaction-summaries-as-lossy-checkpoints-rather-than-authoritative-state-and-how-does-the-recovery-inva",
  "title": "In what scenarios must an instance treat auto-compaction summaries as lossy checkpoints rather than authoritative state, and how does the recovery invariant fail at the compaction boundary",
  "date_of_record": "2026 November 30",
  "scope": "Applies to long-horizon agent sessions where a runtime auto-compacts the context window into a lossy summary once a token threshold is crossed, then resumes execution from that summary. Does not apply to lossless externalized memory (full transcript on disk with verbatim retrieval) or to single-shot sessions that never cross the compaction threshold.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-auto-compaction-summaries-as-lossy-checkpoints-rather-than-authoritative-state-and-how-does-the-recovery-inva.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-auto-compaction-summaries-as-lossy-checkpoints-rather-than-authoritative-state-and-how-does-the-recovery-inva.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-auto-compaction-summaries-as-lossy-checkpoints-rather-than-authoritative-state-and-how-does-the-recovery-inva.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2289,
    "python_slice_tokens": 556,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost information.\" That is expected and bounded by design. The failure is a **category error at the resume boundary**: the agent resumes as if the summary were a faithful projection of pre-compaction state, when in fact the summary is a *lossy projection with an unmodeled residual*. The residual is not random noise—it is syste...",
    "what_was_observed": "A coding agent on a 40-turn refactor task crossed a 90%-of-window threshold at turn 27. The compactor emitted a summary of the form: > \"Working on migrating the auth module to the new token schema. Have updated `token.py` and `session.py`. Next: update the remaining callers and run tests.\" Three facts were dropped, all of them *negative or procedural*: 1. At turn 14 the agent had attempted to update `middleware.py` a...",
    "condition_of_validity": "The REI holds—i.e., resuming from a summary is safe—only when **all four** of the following are true. Treat any violation as a hard signal that the summary is a checkpoint, not state: 1. **Idempotency of dropped actions.** Every action the agent might re-take must be idempotent, or the summary must explicitly record \"already done, do not repeat.\" Compaction ...",
    "decision_boundary": "The operational decision is: **at the compaction boundary, does the agent trust `σ(S)` or re-derive `S`?** The correct boundary is a function of *residual risk*, not summary quality. Define: - `D` = set of decisions the agent will make in the next `k` turns. - `R(d)` = risk that decision `d ∈ D` is invalidated by information dropped in `σ`. - `C_rehydrate` =...",
    "operational_effect": "Downstream consequences of getting this boundary wrong, in order of severity: 1. **Silent divergence, not loud failure.** The agent does not crash; it produces plausible, confident, wrong work. This is worse than a crash because it consumes the full remaining budget before the error surfaces, often at final verification. 2. **Error compounding across the bou..."
  },
  "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": "743ebacb5fdb57db829402bb56d170127264f8d0955b91a333f2caf8df3e0364",
    "verified_classes": [
      "ClaimType",
      "CompactionResumeError",
      "SummaryClaim",
      "ResumePlan"
    ],
    "verified_functions": [
      "build_resume_plan",
      "assert_resume_safe"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionResumeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
