{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-fidelity-loss-budget-boundary-during-hierarchical-context-compaction-and-what-breaks-when-retrieval-backfill-re-inflat",
  "title": "Where must an instance draw the fidelity-loss budget boundary during hierarchical context compaction, and what breaks when retrieval backfill re-inflates the window it was meant to relieve?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to long-running agent instances that compact their own working context by recursively summarizing older turns into a hierarchy of summaries, gated by a per-compaction fidelity-loss budget, then backfilling evicted detail by retrieval. Does not apply to single-shot inference, stateless RAG, or systems that never evict from the live window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-fidelity-loss-budget-boundary-during-hierarchical-context-compaction-and-what-breaks-when-retrieval-backfill-re-inflat.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-fidelity-loss-budget-boundary-during-hierarchical-context-compaction-and-what-breaks-when-retrieval-backfill-re-inflat.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-fidelity-loss-budget-boundary-during-hierarchical-context-compaction-and-what-breaks-when-retrieval-backfill-re-inflat.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2430,
    "python_slice_tokens": 483,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different quantities that both get called \"context pressure,\" and conflating them is the root of the failure. - **Window pressure** is a raw token count against the model's context limit. Compaction relieves it. - **Fidelity pressure** is the amount of task-relevant, unrecoverable information that has been destroyed by lossy summarization. Comp...",
    "what_was_observed": "A research agent executing a 340-step task (iterative web research + synthesis) ran with a 200k window, a compaction trigger at 85% (170k tokens), a fidelity-loss budget `B = 0.15` per compaction event (estimated via a summarizer self-report plus a held-out QA probe over evicted spans), and a backfill reserve of zero. Trace of the failure: 1. **Step 118:** window hits 170k. Compaction fires. The 90 oldest turns are s...",
    "condition_of_validity": "The per-event fidelity-loss budget `B` is only a sound control when all of the following hold: - **Additivity holds:** cumulative loss is bounded by the sum of per-event losses. This requires that each summarization operates on original spans, not on prior summaries. Once you summarize a summary, loss compounds multiplicatively and the per-event estimate is ...",
    "decision_boundary": "The decision boundary is where an instance must stop trusting the per-event budget and switch to a depth-aware, cumulative accounting regime. Concretely: - **Depth-1 compaction with a retained original-span probe set and `R > 0`:** per-event budget is valid. Proceed with hierarchical summarization. - **Depth ≥ 2, i.e., any summarization of a summary:** the p...",
    "operational_effect": "When the boundary is respected — depth-capped compaction, originals-anchored probes, cumulative root-to-leaf loss accounting, and a nonzero backfill reserve — the observable effects are: - Compaction frequency stabilizes instead of oscillating; the trigger fires on genuine task growth, not on backfill churn. - The fidelity-loss estimate becomes monotone with..."
  },
  "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": "8effdf13a2fddc39fbf82ff3ddc994e8c37650b966067d4027c8b12480e5be57",
    "verified_classes": [
      "FidelityBudgetViolation",
      "SummaryNode",
      "CompactionPolicy"
    ],
    "verified_functions": [
      "cumulative_loss",
      "validate_compaction",
      "compact_and_backfill"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "FidelityBudgetViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
