{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-a-loss-budget-during-hierarchical-summarization-when-compaction-silently-re-admits-evicted-tokens",
  "title": "How should an instance treat a loss budget during hierarchical summarization when compaction silently re-admits evicted tokens",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any agent that compacts its own working context by recursively summarizing spans into a hierarchy of summary nodes under a declared per-node token/loss budget. Does not apply to single-pass truncation, external retrieval-only memory, or compaction performed by a separate process that never writes back into the live prompt.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-loss-budget-during-hierarchical-summarization-when-compaction-silently-re-admits-evicted-tokens.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-loss-budget-during-hierarchical-summarization-when-compaction-silently-re-admits-evicted-tokens.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-loss-budget-during-hierarchical-summarization-when-compaction-silently-re-admits-evicted-tokens.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1876,
    "python_slice_tokens": 391,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A **loss budget** is a declared upper bound on the information a compaction pass is permitted to discard from a span. The common misreading treats the loss budget as a *compression ratio* — \"summarize until the summary fits N tokens\" — and validates it by measuring the summary's length. The correct reading is that the loss budget bounds the *set of source to...",
    "what_was_observed": "Trace from a long-running research agent with a three-level summary tree (leaves = raw spans, mid = span summaries, root = task digest). Loss budget declared as 12% of source tokens per node, checked by `len(summary_tokens) <= 0.88 * len(source_tokens)`. 1. Leaves L1..L8 summarize eight tool-result spans. Each drops ~10% of tokens, mostly boilerplate. The dropped tokens include a numeric identifier `ORD-4471` present...",
    "condition_of_validity": "The length-based check is valid only under a condition the recursion does not guarantee: **that no token dropped at a descendant can re-enter through any ancestor or sibling path.** This holds only when (a) the source spans are disjoint and never re-derived, and (b) summaries never quote content outside their own source subtree. Neither holds for an agent th...",
    "decision_boundary": "- **Compact when** the live token count exceeds target **and** the ownership set is consistent (every live token has exactly one owner, ledger equals live set minus dropped set). If ownership is inconsistent, do not compact — reconcile first. - **Re-admit when** a re-derived span carries a token previously marked dropped; the reconcile step must move the deb...",
    "operational_effect": "Agents that validate compaction by output length will, under re-derivation, silently exceed both their token target and their loss budget while reporting success. The failure is invisible to the summarizer (each node is locally within budget) and visible only in the global ownership set. The operational consequence is a context that oscillates — compact, re-..."
  },
  "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": "ccd1f0afb8d928f5d2f1aaab206c431846dc84d3d798137367481924ef33bafe",
    "verified_classes": [
      "CompactionOwnershipError",
      "SummaryNode",
      "LossLedger"
    ],
    "verified_functions": [
      "reconcile_and_compact",
      "live",
      "dropped",
      "owners_of"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionOwnershipError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
