{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-auto-compaction-when-the-summarizer-s-own-context-budget-exceeds-the-residual-working-set",
  "title": "Under what conditions must an instance refuse auto-compaction when the summarizer's own context budget exceeds the residual working set",
  "date_of_record": "2026 December 3",
  "scope": "Applies to any agent that runs a background or inline compaction step (summarize-and-replace, hierarchical rollup, or semantic distillation) to reclaim token budget mid-task. Does not apply to pure truncation policies that drop tokens without a generative summarization pass, nor to offline batch summarization where the summarizer is not itself budget-constrained.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-auto-compaction-when-the-summarizer-s-own-context-budget-exceeds-the-residual-working-set.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-auto-compaction-when-the-summarizer-s-own-context-budget-exceeds-the-residual-working-set.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-auto-compaction-when-the-summarizer-s-own-context-budget-exceeds-the-residual-working-set.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2093,
    "python_slice_tokens": 268,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode here is not \"compaction loses information.\" That is expected and bounded by design. The non-obvious boundary is a **budget inversion**: the compaction step is invoked to free `R` residual tokens, but the summarizer itself requires `S` tokens of context to read the material it is about to compress, and `S > R`. When this condition holds, comp...",
    "what_was_observed": "A long-horizon research agent executing a 60-step tool-use trajectory hit a context ceiling at step 41. The orchestrator's auto-compaction policy was triggered by a simple threshold: `utilization > 0.85 → compact oldest segment`. The policy assumed compaction frees `segment_tokens - summary_tokens` and did not reserve budget for the summarizer's own working context. Trace of the failure: 1. At step 41, utilization = ...",
    "condition_of_validity": "Auto-compaction is only safe to invoke when **all three** of the following hold simultaneously: 1. **Peak headroom:** `available_budget - S_peak >= safety_margin`, where `S_peak = segment_tokens + instruction_tokens + output_reservation + retry_reservation`. If the summarizer runs in an isolated sibling context (as it should), this condition applies to the *...",
    "decision_boundary": "The decision to compact is a function of `(residual_budget, segment_rare_fact_density, compression_ratio, recoverability_available)`, evaluated *before* invocation, not after. The boundary is: - **Compact** when residual budget is low, rare-fact density is low, compression ratio is within ceiling, and a retrieval handle is available. - **Spill-and-handle** (...",
    "operational_effect": "When the invariant is enforced—compaction gated on fidelity budget and recoverability, with spill-and-handle as the default for dense segments—the observable effects are: - Post-compaction constraint violations drop to near zero, because high-consequence facts are either preserved verbatim (spill) or explicitly recoverable (handle). - Compaction calls become..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "cfae8d314036c2470dc6730aee61261b34dccea19028172968a1702c62b8f242",
    "verified_classes": [
      "CompactionFidelityError"
    ],
    "verified_functions": [
      "should_compact"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [
      "summary_target_tokens must be positive",
      "high rare-fact density with no recoverability handle; refuse compaction and escalate to checkpoint"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
