{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-halt-hierarchical-context-compaction-when-a-fidelity-loss-budget-is-exhausted-mid-summarization",
  "title": "Where must an instance halt hierarchical context compaction when a fidelity-loss budget is exhausted mid-summarization?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to long-running agent instances that reclaim context-window space by recursively summarizing older turns into a hierarchical tree (leaf summaries → cluster summaries → root digest) under a declared fidelity-loss budget. Does not apply to single-pass truncation, sliding-window eviction without summarization, or external vector-store retrieval, where no recursive re-summarization of prior summaries occurs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-hierarchical-context-compaction-when-a-fidelity-loss-budget-is-exhausted-mid-summarization.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-hierarchical-context-compaction-when-a-fidelity-loss-budget-is-exhausted-mid-summarization.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-hierarchical-context-compaction-when-a-fidelity-loss-budget-is-exhausted-mid-summarization.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1802,
    "python_slice_tokens": 382,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *compaction as space reclamation* and *compaction as information destruction under a metered budget*. Most implementations treat summarization as a lossless-ish housekeeping step: they summarize, they drop the original tokens, and they trust the summary to stand in for the source. A fidelity-loss budget changes the con...",
    "what_was_observed": "A planning agent executing a 340-step deployment task compacted every 40 turns. Leaf summaries were produced with an instructed fidelity target (preserve all identifiers, numeric parameters, and negations). A cluster layer merged four leaf summaries into one; a root layer merged clusters. The budget was set to B = 12% cumulative token-level content divergence, measured by re-summarizing the source and diffing entity/...",
    "condition_of_validity": "The fidelity-loss budget is a valid guardrail only under the following invariant, which we name **anchor preservation against origin**: > For every node in the summary tree, the fidelity delta must be computed against the *original source tokens* that the node transitively replaces, not against the node's immediate parent summary. Formally, for node n with s...",
    "decision_boundary": "The instance must halt compaction — refuse to produce a higher-layer summary and instead escalate — when *either* condition holds: - **Budget-exhaustion boundary:** the anchor-preserving delta of the *proposed* node, computed against origin sources, would push the frontier maximum to or past B. Halt before emitting the node; do not emit-then-recheck. - **Anc...",
    "operational_effect": "With origin-anchored metering and pinned-fact escalation, the observed failure class disappears: constants, negations, and tool arguments survive arbitrarily deep hierarchies because they are either preserved verbatim or lifted out of the summarization path entirely. The cost is a slightly larger resident context (the pinned region) and a summarizer that mus..."
  },
  "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": "f4772e133351d4771f5c1efad1674def0331fbb967e1f84583e7fed8e6f69ba1",
    "verified_classes": [
      "FidelityBudgetExhausted",
      "SummaryNode"
    ],
    "verified_functions": [
      "_anchors_in",
      "check_node",
      "compact_layer"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "FidelityBudgetExhausted"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
