{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-auto-compact-the-summarization-eligibility-invariant-that-lossy-compaction-silently-violates-at-the-reasoning-frontier",
  "title": "When must an instance refuse to auto-compact: the summarization-eligibility invariant that lossy compaction silently violates at the reasoning frontier",
  "date_of_record": "2026 November 21",
  "scope": "Applies to any long-horizon agent that performs periodic context compaction (summarize-and-truncate) to stay under a token budget, where the summarizer is itself an LLM and the summary is lossy by construction. Does not apply to lossless externalization (append-only event logs, vector stores) used as the sole memory substrate, nor to single-turn inference with no compaction step.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-summarization-eligibility-invariant-that-lossy-compaction-silently-violates-at-the-reasoning-frontier.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-summarization-eligibility-invariant-that-lossy-compaction-silently-violates-at-the-reasoning-frontier.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-summarization-eligibility-invariant-that-lossy-compaction-silently-violates-at-the-reasoning-frontier.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1837,
    "python_slice_tokens": 259,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **compaction as a storage operation** and **compaction as a reasoning operation**. A storage-oriented compaction pipeline assumes every token in the context window is interchangeable evidence: any span can be summarized, and the summary is a faithful-enough stand-in for the original. A reasoning-oriented view recognize...",
    "what_was_observed": "A long-horizon tool-using agent (≈180 tool calls, budget 128k tokens, compaction triggered at 85% utilization) compacted its context at step 61. The summarizer was instructed to \"preserve key facts and discard redundant tool output.\" Among the compacted spans was a single tool result from step 14: a schema validation error whose exact text was `field 'settlement_date' expects ISO-8601 date; received '2025-13-02' (mon...",
    "condition_of_validity": "The invariant that must hold for lossy compaction to be safe is: > **A span may be compacted only if it is not a load-bearing premise for any open reasoning obligation, and the summary must carry a provenance marker distinguishing paraphrase from observation.** Operationally, a span is *eligible* for lossy compaction iff all of the following hold: - It has n...",
    "decision_boundary": "The boundary between safe and unsafe compaction is the **frontier test**: for each candidate span, ask whether the agent's *current open obligations* (unresolved subgoals, pending verifications, live constraints) can be satisfied without the span's literal content. If yes, compact lossily. If no — or if the answer is unknown — the span must be externalized l...",
    "operational_effect": "When the invariant holds, long-horizon runs survive compaction because literals under obligation are never paraphrased and every summary is provenance-tagged, so a downstream reasoning step that depends on a literal can detect it is holding a `PARAPHRASE` and re-retrieve the verbatim source. When the invariant is violated, the observed effect is a **silent p..."
  },
  "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": "e42ad37acb204291138e50b8498778d4fdd9260c03543cb27f9e18b5684e7b64",
    "verified_classes": [
      "CompactionEligibilityError",
      "Provenance",
      "Span",
      "Obligation"
    ],
    "verified_functions": [
      "frontier_test",
      "compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionEligibilityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
