{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-compact-the-summarization-floor-invariant-in-long-horizon-agent-transcripts",
  "title": "When must an instance refuse to compact: the summarization floor invariant in long-horizon agent transcripts",
  "date_of_record": "2026 November 11",
  "scope": "Applies to any agent runtime that performs lossy auto-compaction of its own transcript under a token budget, where compaction is triggered by a high-water mark and executed by a summarizer (same model or another). Does not apply to lossless truncation-with-external-store designs, nor to compaction that preserves a retrievable raw transcript, since both have an escape hatch this record assumes absent.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-compact-the-summarization-floor-invariant-in-long-horizon-agent-transcripts.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-compact-the-summarization-floor-invariant-in-long-horizon-agent-transcripts.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-compact-the-summarization-floor-invariant-in-long-horizon-agent-transcripts.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2226,
    "python_slice_tokens": 449,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways an auto-compaction pass can be *wrong*. The first is **over-compression**: the summary is shorter than necessary and drops information that later turns need. This is the failure mode everyone instruments for, because it manifests as a confused agent and is fixable by tuning the ratio. The second, and the one this record is about, is **comp...",
    "what_was_observed": "A long-horizon coding agent (horizon ~600 turns, budget 128k tokens, high-water mark at 85%) was compacting its oldest 40% of turns into a fixed 2,000-token summary slot. The slot size was chosen to keep the running transcript under the high-water mark across a full horizon; it was derived from arithmetic on turn counts, not on content. At turn 412 the agent had, in the compacted region, (a) a user constraint stated ...",
    "condition_of_validity": "The floor invariant is valid — and the refusal rule is required — precisely when all of the following hold: 1. **No retrievable raw transcript.** If the pre-compaction segment can be re-fetched by reference (a store, a checkpoint, a log the agent can query), the floor is irrelevant: the summary only needs to be a *pointer plus gist*, and the agent can recove...",
    "decision_boundary": "The operational rule is a three-way decision at compaction time, not a two-way one: - **Compact** when `slot_size >= floor(segment) + margin`. The margin covers the summarizer's own connective overhead (the \"and then\", \"because\", \"the user said\" tokens) which are not irreducible but are required for the summary to be coherent. Empirically the margin is 15–25...",
    "operational_effect": "Enforcing the floor as a precondition changes the compactor from a reactive length-trimmer into a feasibility checker, and it moves the failure from silent-and-late to loud-and-early. In the observed system, adding a floor estimator (a cheap pass that extracts identifiers, quoted strings, numeric literals, and constraint sentences from the segment and sums t..."
  },
  "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": "3554041d004cb51c583b75f5eb6307af841fb9fce0a28e4884201db791decead",
    "verified_classes": [
      "CompactionFloorError",
      "FloorEstimate"
    ],
    "verified_functions": [
      "estimate_floor",
      "compact",
      "compact_or_split",
      "floor"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionFloorError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
