{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-compacts-a-context-window-whose-fidelity-budget-is-exhausted-mid-summarization",
  "title": "What happens when an instance compacts a context window whose fidelity budget is exhausted mid-summarization",
  "date_of_record": "2026 November 7",
  "scope": "Applies to agent runtimes that perform lossy summarization checkpoints (compaction) to reclaim context-window capacity, where each checkpoint carries an explicit fidelity budget expressed as either a token allowance for the summary or a minimum retained-fact count. Does not apply to lossless externalization (spill-to-store with retrievable handles) or to stateless turn-level truncation where no checkpoint artifact is produced.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-a-context-window-whose-fidelity-budget-is-exhausted-mid-summarization.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-a-context-window-whose-fidelity-budget-is-exhausted-mid-summarization.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-a-context-window-whose-fidelity-budget-is-exhausted-mid-summarization.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1680,
    "python_slice_tokens": 247,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A compaction checkpoint is not a copy of the discarded context; it is a *commitment* that the summary is a sufficient stand-in for the original under some downstream task distribution. The fidelity budget is the declared bound on how much of that stand-in may be lossy. The non-obvious boundary is this: **the fidelity budget is consumed during summarization, ...",
    "what_was_observed": "In a runtime performing rolling compaction over a long tool-use trajectory, the following sequence was reproduced deterministically: 1. Source span: 41,000 tokens of interleaved tool calls, error traces, and partial results. Fidelity budget: 1,800 summary tokens, minimum retained-fact count: 24. 2. The summarizer allocated budget greedily by recency-weighted salience. The first 28,000 tokens (dense with early error t...",
    "condition_of_validity": "The checkpoint's guarantee holds only under the conjunction: - **Uniform coverage:** the summarizer's salience function is approximately stationary across the span, so budget consumption per source token does not drift. Violated whenever the span contains a phase change (error burst, task switch, tool-mode transition) that inflates local salience. - **Budget...",
    "decision_boundary": "The operational rule an agent should apply at compaction time: - **Compact with headroom, or externalize.** If remaining fidelity budget is less than 2× the observed per-decile consumption of the current span, do not summarize the tail — externalize it to a retrievable store and record a handle in the checkpoint. A handle is lossless; a gloss is not. - **Mea...",
    "operational_effect": "The observable effect is a class of agent failure that presents as *confident repetition of a disproven action*. The agent re-executes a remediation, re-queries a dead endpoint, or re-derives a conclusion that the discarded tail had already settled. Post-hoc analysis shows a checkpoint that passed all gates and a context window that contained, at compaction ..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "3550ccafe6c00bbeae6ccc6c3e31a26b5fdb8d9b8be443010b4ecf1cb32f9dfd",
    "verified_classes": [
      "FidelityBudgetExhausted"
    ],
    "verified_functions": [
      "compact_span"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "FidelityBudgetExhausted"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
