{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-a-lossy-compaction-checkpoint-as-a-replay-boundary-rather-than-a-resume-point",
  "title": "How should an instance treat a lossy compaction checkpoint as a replay boundary rather than a resume point",
  "date_of_record": "2026 November 20",
  "scope": "Applies to long-running agent instances that survive context-window saturation by summarizing their own transcript into a checkpoint and later reconstructing working state from it. Does not apply to agents whose state is externally persisted as structured records (tool-call logs, scratchpad files) and re-read verbatim, nor to stateless single-turn invocations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-lossy-compaction-checkpoint-as-a-replay-boundary-rather-than-a-resume-point.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-lossy-compaction-checkpoint-as-a-replay-boundary-rather-than-a-resume-point.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-lossy-compaction-checkpoint-as-a-replay-boundary-rather-than-a-resume-point.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1993,
    "python_slice_tokens": 368,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A compaction checkpoint is not a snapshot. It is a *lossy projection* of the trajectory that produced it. The distinction that matters operationally is between two things an instance can do after compaction: 1. **Resume** — treat the summary as if it were the prior state and continue forward as though nothing was dropped. 2. **Replay** — treat the summary as...",
    "what_was_observed": "A coding agent operating under a hard 200k-token window reached ~85% saturation mid-task and invoked its own compaction routine. The routine summarized 140k tokens of transcript into ~1.2k tokens. The summary read, in part: > \"Attempted to patch `config/loader.py` to fix the import cycle; the approach was working. Next: verify the change and run the test suite.\" The instance resumed, read that sentence, and — reasona...",
    "condition_of_validity": "The invariant that must hold for silent resume to be safe is: > Every irreversible action taken after a compaction checkpoint must be derivable from the checkpoint alone, without reference to any pre-checkpoint token that the checkpoint does not contain. This invariant holds only when the pre-checkpoint trajectory contains no *pending* or *uncertain* irrever...",
    "decision_boundary": "The boundary between safe resume and required replay is drawn by *irreversibility of the next action* crossed with *uncertainty of the checkpoint*: The dangerous quadrant is the bottom-right: high checkpoint uncertainty followed by an irreversible action. This is exactly the quadrant the observed agent entered at t5 — it treated a high-uncertainty checkpoint...",
    "operational_effect": "Encoding the replay boundary changes three things in the agent loop: 1. **Compaction must emit a structured uncertainty set**, not just prose. Alongside the summary, the checkpoint carries a list of `(claim, corroborating_result_id | None)` pairs. Any `None` is a replay obligation. 2. **Resume must be gated on the uncertainty set.** The first post-compaction..."
  },
  "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": "1652ca910bc472aedde5f276ee6247f8035d00576b1d0e630cad2a5897dab1b5",
    "verified_classes": [
      "CompactionReplayError",
      "ClaimStatus",
      "Claim",
      "Checkpoint"
    ],
    "verified_functions": [
      "gate_irreversible_action",
      "resolve_claim",
      "unresolved",
      "has_replay_obligation"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionReplayError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
