{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-compacts-a-checkpoint-whose-summary-has-already-been-superseded-by-a-sibling-branch",
  "title": "What happens when an instance compacts a checkpoint whose summary has already been superseded by a sibling branch",
  "date_of_record": "2026 December 3",
  "scope": "Applies to long-horizon agents that persist state as a tree of hierarchical summaries (leaf → segment → episode → root) and resume from a checkpoint selected by recency or similarity. Does not apply to single-shot agents or to agents that only ever compact a strictly linear, single-parent history.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-a-checkpoint-whose-summary-has-already-been-superseded-by-a-sibling-branch.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-a-checkpoint-whose-summary-has-already-been-superseded-by-a-sibling-branch.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-a-checkpoint-whose-summary-has-already-been-superseded-by-a-sibling-branch.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2502,
    "python_slice_tokens": 562,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things an agent calls \"the checkpoint\": the **materialized working set** (the actual tokens, tool results, and scratch buffers that will be replayed into the next context window) and the **summary node** that *points at* that working set via a lineage of parent summaries. Auto-compaction conflates them. When compaction ru...",
    "what_was_observed": "A long-horizon coding agent (≈140 tool calls per task, context window 200k, compaction threshold at 85% utilization) used hierarchical summarization: every 40 messages it distilled a *segment summary*, every 5 segment summaries it produced an *episode summary*, and the episode summary plus the last two segments formed the resume checkpoint. On a task involving a schema migration, the agent hit a tool error at call 96...",
    "condition_of_validity": "The hierarchical-summary checkpoint is valid for replay **iff** all of the following hold at resume time: 1. **Lineage liveness.** Every segment referenced by the chosen summary node, transitively through all ancestors, has `superseded_by IS NULL`. A summary whose lineage contains any superseded segment is *historical*, not *current*, and must not be used as...",
    "decision_boundary": "The boundary is between **compaction as lossy compression** and **compaction as referential redirection**. Lossy compression is safe: dropping detail is the point, and the invariant is only that the summary not *contradict* the segments it replaces. Referential redirection is unsafe unless lineage is verified, because the summary now stands in for state that...",
    "operational_effect": "The operational consequence is that **resume latency and resume correctness are decoupled**, and the decoupling is invisible to the agent. A stale checkpoint resumes in the same number of tokens and the same wall-clock as a valid one; the divergence only manifests downstream, often after the point where the agent could cheaply backtrack. The blast radius sca..."
  },
  "matched_failure_symptoms": [
    "UNNECESSARY_OR_STALE_EXTERNAL_FETCH"
  ],
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "29d73e14fbff6e95d3c066527f079e560880a33a28a7f403f6d07739039ee37e",
    "verified_classes": [
      "StaleCheckpointError",
      "UnreconciledForkError",
      "Segment",
      "SummaryNode"
    ],
    "verified_functions": [
      "verify_lineage",
      "select_checkpoint",
      "compact"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 8,
    "raised_exceptions": [
      "StaleCheckpointError",
      "UnreconciledForkError"
    ],
    "sample_fail_closed_invariants": [
      "no live checkpoint available; re-derive from last verified ancestor"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
