{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-auto-compaction-when-the-summarizer-s-own-context-window-is-smaller-than-the-transcript-it-is-compacting",
  "title": "In what scenarios must an instance refuse auto-compaction when the summarizer's own context window is smaller than the transcript it is compacting",
  "date_of_record": "2026 November 27",
  "scope": "Applies to long-horizon agents that reclaim context budget by recursively summarizing their own transcript (rolling compaction, \"memory folding,\" hierarchical summarization) where the compaction subroutine runs on a model whose effective context is not guaranteed to exceed the segment being compacted. Does not apply to lossless externalization (full transcript offloaded to a retrievable store with verbatim pointers) or to single-shot truncation of oldest turns.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-auto-compaction-when-the-summarizer-s-own-context-window-is-smaller-than-the-transcript-it-is-compacting.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-auto-compaction-when-the-summarizer-s-own-context-window-is-smaller-than-the-transcript-it-is-compacting.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-auto-compaction-when-the-summarizer-s-own-context-window-is-smaller-than-the-transcript-it-is-compacting.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2200,
    "python_slice_tokens": 587,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary was lossy.\" All summaries are lossy; that is the point of compaction. The failure is that the compaction subroutine can be **silently fed a segment larger than its own window**, in which case the underlying inference stack does not error — it truncates the *input* to the summarizer, produces a confident, well-formed summary of...",
    "what_was_observed": "A research agent running a multi-hour task folded its transcript every time the window crossed 70% occupancy. The fold routine chunked history into segments of `compaction_unit = 0.6 × window` tokens and summarized each. This looked safe: 0.6 < 1.0. The bug surfaced at a segment boundary. The agent had, inside a single segment, performed a tool-heavy investigation: a `grep` returning 4,200 lines, followed by a sequen...",
    "condition_of_validity": "Auto-compaction is valid only when **all** of the following hold simultaneously: 1. **Budget accounting is conservative and per-unit.** The unit length must be measured with the summarizer's own tokenizer, not a character heuristic, and must include the summarizer's system prompt, any schema/instruction preamble, and the reserved output budget. The check is ...",
    "decision_boundary": "The boundary is not \"is the segment big?\" but \"**is the segment bigger than the summarizer can actually read, after the summarizer's own overhead is subtracted?**\" These diverge precisely when the agent is compacting with a model whose window is comparable to its own, which is the common case for cost reasons — you compact with the cheap model, and the cheap...",
    "operational_effect": "Enforcing the invariant converts a silent, compounding corruption into a bounded, visible cost. The agent externalizes a few large segments instead of summarizing them; it pays retrieval latency on those segments later, but it never proceeds on a summary that has amputated a contiguous tail of its own history. The re-execution storms (re-running tools whose ..."
  },
  "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": "92abbbdf957249b2f1b4cd84dc190e34127741e221266459f546a04842ec4519",
    "verified_classes": [
      "CompactionCoverageError",
      "CompactionBudget"
    ],
    "verified_functions": [
      "plan_compaction",
      "verify_compaction_output",
      "fold_transcript",
      "effective_input_budget"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionCoverageError"
    ],
    "sample_fail_closed_invariants": [
      "Empty source unit; nothing to compact."
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "math"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
