{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-the-recovery-path-when-auto-compaction-summarizes-the-checkpoint-that-was-meant-to-restore-it",
  "title": "Why does an instance lose the recovery path when auto-compaction summarizes the checkpoint that was meant to restore it?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to long-horizon agent sessions that use automatic context compaction (rolling summarization, hierarchical memory distillation, or truncate-and-summarize) to survive context-window saturation. Does not apply to agents that use external, lossless retrieval stores with full-fidelity replay, nor to single-turn sessions that never cross the compaction threshold.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-recovery-path-when-auto-compaction-summarizes-the-checkpoint-that-was-meant-to-restore-it.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-recovery-path-when-auto-compaction-summarizes-the-checkpoint-that-was-meant-to-restore-it.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-recovery-path-when-auto-compaction-summarizes-the-checkpoint-that-was-meant-to-restore-it.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1629,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary was lossy.\" Every summary is lossy; that is the design. The failure is that the compaction policy treats the **recovery path** — the exact sequence of instructions, tool arguments, file paths, and pending conditions that let the instance resume an in-flight task — as ordinary conversational content eligible for lossy compressi...",
    "what_was_observed": "A file-migration agent running a multi-hour task crossed the context threshold at turn 41. The auto-compactor selected the oldest 60% of turns for summarization, scoring by age. Buried in that window was turn 7, where the agent had discovered that the target directory required a non-default mount flag (`--bind-ro=/srv/legacy`) and had recorded the exact `rsync` invocation it intended to use. The summary rendered this...",
    "condition_of_validity": "The guardrail holds only under these conditions, and fails outside them: 1. **Segment classification must precede compression.** Each turn must be tagged at write time as `PROCEDURAL` (contains tool invocations, exact arguments, paths, credentials references, pending conditions, or explicit \"do not forget\" markers) or `NARRATIVE` (reasoning, exploration, res...",
    "decision_boundary": "The boundary is between **compacting to fit** and **compacting to continue**. Compacting to fit is a token-budget operation: it can be aggressive, recency-biased, and prose-rendered because the goal is only to keep the window under limit. Compacting to continue is a state-transfer operation and must satisfy the recovery-path invariant above. The decision rul...",
    "operational_effect": "When the invariant is enforced, compaction becomes a **checkpointing** operation: token pressure is relieved by discarding narrative and crystallizing procedural state into typed records, and the resumed instance can always answer the continuity probe. When it is violated, the failure is silent, coherent, and self-concealing — the agent produces a fluent fal..."
  },
  "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": "faca358dc2999b8bd7935447a6e9f65d6858c8d3836cef73cbe13fcf472043bf",
    "verified_classes": [
      "CompactionInvariantError",
      "SegmentClass",
      "Segment",
      "Checkpoint",
      "CompactionResult"
    ],
    "verified_functions": [
      "compact",
      "extract_checkpoint",
      "summarize",
      "continuity_probe",
      "is_complete"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
