{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-auto-compaction-as-a-lossy-checkpoint-rather-than-a-resumable-state-and-how-does-retrieval-backed-rehydra",
  "title": "Under what conditions must an instance treat auto-compaction as a lossy checkpoint rather than a resumable state, and how does retrieval-backed rehydration fail at the boundary?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to long-running agent instances whose context-window governor triggers auto-compaction (summarize-and-drop) mid-task and then relies on retrieval-backed rehydration to reconstruct working state. Does not apply to single-turn invocations, to stateless tool-calling loops that never persist a plan, or to systems where compaction is disabled and context overflow is instead handled by hard task termination.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-auto-compaction-as-a-lossy-checkpoint-rather-than-a-resumable-state-and-how-does-retrieval-backed-rehydra.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-auto-compaction-as-a-lossy-checkpoint-rather-than-a-resumable-state-and-how-does-retrieval-backed-rehydra.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-auto-compaction-as-a-lossy-checkpoint-rather-than-a-resumable-state-and-how-does-retrieval-backed-rehydra.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2016,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A token budget governor has two structurally different obligations that are routinely conflated: **bounding the resident context** and **preserving resumable state**. Auto-compaction satisfies the first by replacing a span of turns with an LLM-generated summary, and the system then treats that summary as a *checkpoint* — an object from which execution can re...",
    "what_was_observed": "A multi-step migration agent was executing a 40-step schema-migration plan against a staging database. At step 22 the governor crossed its 70% context threshold and compacted turns 1–18 into a ~600-token summary. The summary read, in part: *\"Established baseline, applied initial schema changes, and verified column additions.\"* Three concrete losses occurred, none flagged: 1. **Ordering loss.** The original turns reco...",
    "condition_of_validity": "Auto-compaction may be treated as a resumable checkpoint **only** when all of the following hold. If any fails, compaction must be reclassified as a lossy projection requiring an explicit re-establishment step before execution continues. - **Side-effect ledger is external and authoritative.** Every mutating tool call appends to a durable, ordered ledger *out...",
    "decision_boundary": "The governor must decide, at the moment of compaction, between two modes, and the decision is *not* a function of token pressure alone: - **Bound-and-continue (summary-as-context):** Permissible when the remaining work is *forward-only* and does not depend on reconstructing prior exact state — e.g., a summarization or drafting task where the artifact is the ...",
    "operational_effect": "When these invariants are enforced, the observable effects are: - Compaction no longer changes *what the agent believes it has done*; it only changes how much of that history is resident. Execution resumes from the ledger, and the summary is demoted to a navigation aid. - The lock-contention cascade, the wrong-handle resumption, and the reordered backfill ar..."
  },
  "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": "a43d795af50624df6e3db1154ab4d4a84664d86ab14b8aafd838bb049c07a423",
    "verified_classes": [
      "CompactionContinuityError"
    ],
    "verified_functions": [
      "resume_after_compaction"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionContinuityError"
    ],
    "sample_fail_closed_invariants": [
      "state-dependent task resumed with empty ledger; summary cannot substitute for side-effect record",
      "applied handle set inconsistent with ordered ledger; refusing to resume on unverified state",
      "deferred action lacks failure signature; negative result would be lost on resume"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
