{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-task-critical-facts-when-hierarchical-auto-compaction-evicts-a-level-2-summary-before-its-children-are-re-derivable",
  "title": "Why does an instance lose task-critical facts when hierarchical auto-compaction evicts a level-2 summary before its children are re-derivable",
  "date_of_record": "2026 November 30",
  "scope": "Applies to long-running agent instances that manage context pressure via multi-level (hierarchical) summarization with auto-compaction triggers, where summaries at level N are generated from summaries at level N+1 and raw turns are evicted after summarization. Does not apply to flat single-level summarization, to systems that retain a full raw transcript in external durable storage with guaranteed retrieval, or to compaction triggered only at task boundaries.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-task-critical-facts-when-hierarchical-auto-compaction-evicts-a-level-2-summary-before-its-children-are-re-derivable.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-task-critical-facts-when-hierarchical-auto-compaction-evicts-a-level-2-summary-before-its-children-are-re-derivable.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-task-critical-facts-when-hierarchical-auto-compaction-evicts-a-level-2-summary-before-its-children-are-re-derivable.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2420,
    "python_slice_tokens": 349,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *lossy* and *unrecoverable*. A hierarchical compaction scheme is designed to be lossy: it drops tokens in exchange for a bounded context footprint. The implicit invariant that makes it safe is **re-derivability** — every evicted artifact must remain reconstructible from some surviving artifact plus a retrieval path to raw storag...",
    "what_was_observed": "A code-migration agent ran a 340-turn task under an auto-compaction policy configured as: compact when context utilization exceeds 0.72; summarize the oldest 40% of turns into level-1 summaries; when level-1 summary count exceeds 12, fold the oldest 8 into one level-2 summary; evict raw turns 60 turns after their level-1 summary is written. At turn 211 the policy fired the level-2 fold. The level-2 summary captured t...",
    "condition_of_validity": "The re-derivability invariant holds for a hierarchical compaction scheme **iff** for every evicted node *n*, at least one of the following is true at the moment of eviction: 1. *n* has a surviving ancestor whose summary schema is guaranteed to preserve every fact class that *n*'s descendants could be queried for; or 2. *n*'s raw source spans remain addressab...",
    "decision_boundary": "The boundary between safe and orphaned eviction is drawn at the **eviction authorization check**, and it must be a semantic check, not a structural one. Before any node is evicted, the compactor must answer: *for each fact class present in this node's subtree, is there a surviving artifact whose schema is certified to carry that fact class, or an addressable...",
    "operational_effect": "The downstream effect is a class of failure that looks like a reasoning error but is a memory-integrity error. Because the surviving summaries are internally consistent and the model is fluent, the agent produces high-confidence outputs grounded in a reconstructed — not recalled — history. In this record the reconstruction inverted a correct decision, but th..."
  },
  "matched_failure_symptoms": [
    "SUBPROCESS_PIPE_HANG_OR_FD_LEAK",
    "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": "eef801df998e0ab35085d2c5a795f5a9cd40aa0a94664c861bab0d4b1efb4d77",
    "verified_classes": [
      "FactClass",
      "OrphanedEvictionError",
      "SummaryNode",
      "CompactionGraph"
    ],
    "verified_functions": [
      "fold_and_evict",
      "coverage_for",
      "authorize_eviction"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "OrphanedEvictionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
