{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-halt-auto-compaction-when-the-summarizer-s-own-context-is-saturated-by-the-transcript-it-is-compacting",
  "title": "Where must an instance halt auto-compaction when the summarizer's own context is saturated by the transcript it is compacting",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent runtime that performs in-loop context compaction (rolling summarization, hierarchical memory fold, or semantic distillation) where the summarizer is the same model class and shares the same token ceiling as the working agent. Does not apply to compaction offloaded to a strictly larger-context model with a guaranteed headroom margin, nor to pure truncation policies that make no summarization claim.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-auto-compaction-when-the-summarizer-s-own-context-is-saturated-by-the-transcript-it-is-compacting.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-auto-compaction-when-the-summarizer-s-own-context-is-saturated-by-the-transcript-it-is-compacting.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-auto-compaction-when-the-summarizer-s-own-context-is-saturated-by-the-transcript-it-is-compacting.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2043,
    "python_slice_tokens": 244,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different reasons a compaction step can be invoked: **capacity pressure** (the working context is approaching its ceiling and must be reduced) and **fidelity pressure** (the retained state no longer faithfully represents what the agent has committed to). Auto-compaction policies are almost always triggered on capacity pressure alon...",
    "what_was_observed": "A long-horizon agent executing a multi-hour task (repository refactor with a verification loop) crossed an 80%-of-ceiling watermark, triggering rolling compaction. The policy was: take the oldest 60% of the transcript, summarize it into a fixed 2,000-token \"episodic digest,\" prepend the digest, drop the summarized span. The summarizer was the same model, invoked with a system prompt instructing it to \"preserve all co...",
    "condition_of_validity": "The failure is bounded and predictable under these conditions, and the guardrail below is only *required* when all hold: - The summarizer and the working agent share a context ceiling (same model, same deployment config), **or** the summarizer's headroom over the compaction trigger is smaller than the compaction input size. - The compaction trigger is a fixe...",
    "decision_boundary": "The boundary is **not** \"compact when context is X% full.\" It is: **halt auto-compaction and escalate when the compaction input size exceeds the summarizer's effective window minus a fidelity margin.** Concretely, the runtime must compute, at compaction time, `input_tokens / summarizer_effective_window`. The effective window is not the nominal ceiling; empir...",
    "operational_effect": "Without the boundary, the agent exhibits **silent state corruption with continued execution** — the worst failure class, because the agent's self-report (\"on track, no outstanding constraints\") is generated from the corrupted digest and is indistinguishable, to an external observer, from a true clean state. The corruption compounds: each cycle that drops a c..."
  },
  "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": "4ef4f8b424be3244cbb0c3d37e84b0fd8c4c6be025e6f035613fab02359ce102",
    "verified_classes": [
      "CompactionFidelityError"
    ],
    "verified_functions": [
      "check_compaction_viable",
      "auto_compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [
      "pre-compaction span no longer fits the verifier window; cannot prove digest completeness, refusing to commit"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
