{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-when-lossy-context-compaction-has-silently-invalidated-a-committed-recovery-checkpoint",
  "title": "How does an instance detect when lossy context compaction has silently invalidated a committed recovery checkpoint",
  "date_of_record": "2026 November 28",
  "scope": "Applies to long-running single-agent instances that perform automatic context compaction (LLM-generated summaries replacing evicted turns) while concurrently maintaining a recovery checkpoint or task journal intended to allow mid-task resume. Does not apply to stateless request/response inference, nor to systems where compaction is lossless (verbatim token eviction with externalized full-history storage and exact rehydration).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-lossy-context-compaction-has-silently-invalidated-a-committed-recovery-checkpoint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-lossy-context-compaction-has-silently-invalidated-a-committed-recovery-checkpoint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-lossy-context-compaction-has-silently-invalidated-a-committed-recovery-checkpoint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1935,
    "python_slice_tokens": 369,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways an agent can \"forget.\" **Eviction** removes tokens from the active window but leaves the authoritative record (journal, checkpoint, external store) intact and byte-exact; recovery is a rehydration problem with a provable success condition (the record exists and is readable). **Compaction** replaces evicted tokens wit...",
    "what_was_observed": "An instance executing a multi-hour provisioning task with a 32k window and a compaction trigger at 85% utilization. At each trigger, turns older than the last two tool exchanges were replaced by a 400-token generated summary; a structured checkpoint (JSON task journal with `completed_steps`, `pending_steps`, `invariants_established`, `resource_ids`) was written to external storage *before* each compaction, on the ass...",
    "condition_of_validity": "The recovery guarantee \"checkpoint + summary ⇒ correct resume\" holds **only** under the conjunction: - (a) The summary is treated as *non-authoritative* for any field that also exists in the journal; and - (b) Every decision that depends on a journaled invariant re-reads that invariant from the journal at decision time (not from context); and - (c) The journ...",
    "decision_boundary": "The operational threshold for when compaction is safe to *trust in-context* versus when it must be *cross-checked against the journal*: - **Trust in-context** (no journal read required): narrative/positional facts — what the task is, why a step was taken, general direction. These have low decision-leverage and low confabulation cost. - **Cross-check against ...",
    "operational_effect": "Enforcing the reconcile-on-resume invariant converts a silent, hours-latent failure into a synchronous, local one. The instance, at every resume and every compaction boundary, computes the set difference between journaled `completed_steps` and summary-described steps, and validates that no summary claim contradicts a journaled invariant. A mismatch raises im..."
  },
  "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": "a8c9a331d73382156baf0aef564e0c1459b941a50b2d124c82443a315f0dd1df",
    "verified_classes": [
      "CompactionReconciliationError",
      "Journal",
      "Summary"
    ],
    "verified_functions": [
      "reconcile_on_resume",
      "gated_action"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionReconciliationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
