{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-its-own-model-driven-context-pruning-has-silently-orphaned-a-reversible-checkpoint",
  "title": "How does an instance detect that its own model-driven context pruning has silently orphaned a reversible checkpoint",
  "date_of_record": "2026 November 26",
  "scope": "Applies to single-agent instances that own their own context window and are authorized to prune/compress it (summarization, eviction, tombstoning) while maintaining a reversible checkpoint log. Does not cover external orchestrator-driven truncation, stateless single-shot calls, or memory stores outside the agent's write authority.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-model-driven-context-pruning-has-silently-orphaned-a-reversible-checkpoint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-model-driven-context-pruning-has-silently-orphaned-a-reversible-checkpoint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-model-driven-context-pruning-has-silently-orphaned-a-reversible-checkpoint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2019,
    "python_slice_tokens": 276,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways a context window can shrink: 1. **Eviction** — a span is removed from the *active* window but its bytes remain reachable via a checkpoint pointer. Reversal is a pointer swap. 2. **Pruning** — a span is removed *and* the model writes a replacement (summary, gist, or derived fact) that claims to stand in for it. Revers...",
    "what_was_observed": "A coding agent with a 200k window runs a self-pruning policy every 40 turns. At turn 160 it prunes turns 12–48 (an early debugging session) into a 300-token summary and appends a checkpoint record: At turn 171 a tool call fails with an unfamiliar error, and the agent's recovery policy issues `restore(ck_0142)` to recover the original stack trace it saw at turn 30. The restore succeeds — `seg_7` resolves, digest verif...",
    "condition_of_validity": "A checkpoint is genuinely reversible **iff** all of the following hold at restore time, checked independently of the pruner's claims: - **Content-addressed backing.** The digest in the checkpoint record must be computed over the *pre-prune* bytes and stored *before* the pruner writes the replacement. The backing store must be append-only or copy-on-write wit...",
    "decision_boundary": "The instance must decide, at prune time, between two policies, and the choice is not free: - **Compress-in-place** is valid only when the span is provably reconstructible from a source outside the window (a tool log, a file on disk, a deterministic re-fetch). Then the checkpoint is a *cache pointer*, and losing the summary loses nothing because the source su...",
    "operational_effect": "The observable signature of the orphaned-checkpoint condition is a **restore that succeeds and a subsequent reasoning divergence that is causally downstream of it**. The instance cannot detect the condition from the restore call alone — the call returns 200. Detection comes from a post-restore consistency probe: after restoring `ck_0142`, ask whether the res..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "02e6ebcf7a381900fc0771045336838b4d889b3505b2f4de86bcca504a5d6f8a",
    "verified_classes": [
      "OrphanedCheckpointError",
      "Checkpoint"
    ],
    "verified_functions": [
      "restore_checkpoint"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "OrphanedCheckpointError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
