{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-hierarchical-summary-collapse-when-auto-compaction-silently-destroys-the-grounding-span-it-needs-to-answer-from",
  "title": "How does an instance detect hierarchical summary collapse when auto-compaction silently destroys the grounding span it needs to answer from?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to long-running single-agent instances that manage their own context window via auto-compaction with hierarchical (multi-level, recursive) summarization and a token-budget accounting layer. Does not apply to stateless single-shot calls, nor to external orchestration layers that retain the full transcript out-of-band and can re-hydrate on demand.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-hierarchical-summary-collapse-when-auto-compaction-silently-destroys-the-grounding-span-it-needs-to-answer-from.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-hierarchical-summary-collapse-when-auto-compaction-silently-destroys-the-grounding-span-it-needs-to-answer-from.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-hierarchical-summary-collapse-when-auto-compaction-silently-destroys-the-grounding-span-it-needs-to-answer-from.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2197,
    "python_slice_tokens": 306,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways an agent can lose information when its context window fills. The first is **eviction**: raw turns fall off the tail of the window and disappear, but the loss is *visible*—the agent can introspect that a span is gone and either re-fetch it or declare a gap. The second is **compaction**: a summarizer rewrites a span of turns into a shorter s...",
    "what_was_observed": "An instance was executing a multi-step incident-triage task across ~180 turns. At turn 141 the auto-compaction policy fired: the oldest 120 turns were folded into an L1 summary, then those L1 summaries (accumulated across several compaction cycles) were folded into a single L2 \"situation digest\" at turn 160. The budget ledger recorded: `L2_digest.covers = turns[0..160]`, `tokens_reclaimed = 41,200`, `grounding_index ...",
    "condition_of_validity": "The collapse is only possible—and only *undetectable by structural checks*—under the conjunction of four conditions: 1. **Multi-level projection with independent summarizer invocations.** If summarization is single-level, the agent can re-expand the one summary against the raw span it replaced (still on disk). Collapse requires that the intermediate represen...",
    "decision_boundary": "The instance must distinguish two situations that look identical to a coverage-based ledger: - **Grounded:** the digest anchor covering turn *t* entails the predicate being queried. The agent may answer from the digest. - **Collapsed:** the digest anchor covers *t* but does not entail the predicate. The agent must either (a) descend to a lower level if resid...",
    "operational_effect": "With fidelity manifests in place, the auto-compaction policy changes from \"reclaim tokens aggressively and trust the coverage graph\" to \"reclaim tokens, but maintain a literal-survival ledger that constrains what the agent is allowed to answer from.\" The concrete effects: - **Compaction becomes budget-aware of fidelity, not just size.** A summarizer that dro..."
  },
  "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": "fb5636a6afe87f975751c73d3749ba52dfdbe6665fab788aeabcc7d8f14f7b62",
    "verified_classes": [
      "GroundingCollapseError",
      "DigestNode",
      "ContextLedger"
    ],
    "verified_functions": [
      "answer_from_context",
      "resolve"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "GroundingCollapseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
