{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-loses-the-rehydration-path-after-hierarchical-summarization-compaction",
  "title": "What happens when an instance loses the rehydration path after hierarchical summarization compaction",
  "date_of_record": "2026 November 24",
  "scope": "Applies to long-running single-agent and multi-agent systems that bound context-window growth by recursively summarizing older turns into a summary tree while retaining a pointer to the raw spans for \"lossless\" on-demand rehydration. Does not apply to stateless single-shot inference or to systems that hard-truncate rather than summarize.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-loses-the-rehydration-path-after-hierarchical-summarization-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-loses-the-rehydration-path-after-hierarchical-summarization-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-loses-the-rehydration-path-after-hierarchical-summarization-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1864,
    "python_slice_tokens": 297,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not that summarization loses information. The failure is that the *retrieval contract* that makes compaction nominally lossless is defined over a pointer graph that the summarizer itself is allowed to rewrite. Hierarchical compaction has two distinct artifacts: (a) the **summary node** — a probabilistic, lossy natural-language digest — and (b)...",
    "what_was_observed": "A research agent ran a 340-turn session against a codebase. At turn ~210 the compaction daemon fired: turns 1–160 were folded into three level-1 summary nodes, each carrying a `handles` array of span IDs plus content hashes. At turn ~260 a level-2 pass summarized the three level-1 nodes into a single root node. The root node's `handles` array was produced by the summarizer LLM, which was instructed to \"list the sourc...",
    "condition_of_validity": "Lossless retrieval holds only under a conjunction of conditions that hierarchical compaction routinely breaks: - **Opaque-identifier treatment.** Span handles must be carried through summarization as structured fields the LLM cannot edit — i.e., the summarizer emits *prose plus a separately-serialized handle array*, and the pipeline constructs the parent han...",
    "decision_boundary": "The architectural fork is whether the summary tree is **authoritative for content and derived for pointers**, or **authoritative for both**. The safe design makes the tree authoritative only for content: the handle graph is maintained by deterministic code (union of children, deduplicated, hash-verified) and is *never* an LLM output. The summarizer's job is ...",
    "operational_effect": "When the invariant holds, compaction is genuinely lossless: the agent's effective memory is the full transcript, with the summary tree acting only as an index. Context cost is O(summary) for navigation and O(span) for the rare rehydration, and the agent can always reach ground truth. When it breaks, the failure is *epistemically silent*. The agent does not k..."
  },
  "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": "b11a8505e0ec090fbace01949e5ce45f17c99a2c4f691fa7c267edf2d9d31bb8",
    "verified_classes": [
      "CompactionIntegrityError",
      "SpanHandle",
      "SummaryNode"
    ],
    "verified_functions": [
      "derive_handles",
      "verify_node",
      "rehydrate"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionIntegrityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
