{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-compacts-its-own-working-set-and-the-summarizer-s-fidelity-guarantee-is-measured-against-a-token-budget-it-cannot-honor",
  "title": "What happens when an instance compacts its own working set and the summarizer's fidelity guarantee is measured against a token budget it cannot honor",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any long-horizon agent session that performs in-loop context compaction (rolling summarization of prior turns to reclaim tokens) where the compaction policy declares a *fidelity guarantee* — i.e., a claim that the summary preserves all facts required for pending and future task steps. Does not apply to lossless externalization (full transcript to durable store) or to stateless single-turn invocations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-working-set-and-the-summarizer-s-fidelity-guarantee-is-measured-against-a-token-budget-it-cannot-honor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-working-set-and-the-summarizer-s-fidelity-guarantee-is-measured-against-a-token-budget-it-cannot-honor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-working-set-and-the-summarizer-s-fidelity-guarantee-is-measured-against-a-token-budget-it-cannot-honor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2158,
    "python_slice_tokens": 206,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things an auto-compaction policy can promise, and they are routinely conflated: 1. **Budget fidelity** — the summary will fit within `B` tokens. This is a *counting* property, verifiable by a tokenizer before the summary is committed. 2. **Semantic fidelity** — every fact in the discarded span that is load-bearing for a still-open obligation su...",
    "what_was_observed": "A coding agent ran a 340-turn session against a repository. The compaction policy was: when context utilization exceeds `U = 0.85` of window `W`, summarize the oldest 60% of turns into a target of `B = 0.15 * W` tokens, retain the newest 40% verbatim, and resume. The policy carried a stated guarantee: *\"compaction preserves all decisions, constraints, and open TODOs.\"* Trace of the failure: - **Turn 112.** User state...",
    "condition_of_validity": "The fidelity inversion occurs iff all three hold: 1. **Hard budget below information floor.** `B < I(O)` where `I(O)` is the tokens required to losslessly encode the open-obligation set `O` at compaction time. When `B ≥ I(O)`, the summarizer can be faithful and the failure does not occur. The policy must therefore *estimate* `I(O)` — and it cannot, because `...",
    "decision_boundary": "The architectural invariant required: **compaction must never be the sole custodian of a load-bearing fact.** Concretely, the policy must enforce a separation between *reclaimable* context (chatter, resolved sub-tasks, superseded drafts) and *pinned* context (constraints, decisions, open obligations), and the pinned set must be externalized to a store that i...",
    "operational_effect": "Downstream of an unguarded fidelity inversion, three effects compound: 1. **Confident wrong action.** The agent acts on a summary that is internally consistent and omits the violated constraint. Its self-report is high-confidence because nothing in context contradicts it. Verification-by-self-report is worthless here; the check must be external (constraint s..."
  },
  "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": "950079e6a51fa0c14b1195d83434bdc78ceffd86ab73cee0c5990dca9b9ed50a",
    "verified_classes": [
      "CompactionFidelityError"
    ],
    "verified_functions": [
      "compact"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
