{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-compact-a-context-window-whose-summarized-prefix-has-already-been-re-ingested",
  "title": "Under what conditions must an instance refuse to compact a context window whose summarized prefix has already been re-ingested",
  "date_of_record": "2026 November 13",
  "scope": "Applies to any agent runtime that performs lossy summarization to reclaim context budget and then re-injects the summary into the working window. Does not apply to lossless compaction (e.g., exact token eviction with a retrievable backing store) or to summarizers that are provably idempotent over their own output.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-window-whose-summarized-prefix-has-already-been-re-ingested.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-window-whose-summarized-prefix-has-already-been-re-ingested.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-window-whose-summarized-prefix-has-already-been-re-ingested.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1503,
    "python_slice_tokens": 387,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The dangerous boundary is not \"summary is lossy.\" Every useful summary is lossy. The boundary is **re-ingestion of a summary into the same window that produced it**, which creates a fixed point the summarizer was never designed to reach. A summarizer `S` maps a transcript `T` to a shorter transcript `S(T)`. Under normal compaction, `S(T)` replaces `T` and is...",
    "what_was_observed": "In a long-running tool-using agent, automatic compaction fired four times in a single task. The transcript contained a numeric constant (a retry ceiling of `7`) established early from a config read. - Pass 1 summary: \"retry ceiling is 7 (from config).\" Faithful. - Pass 2 summary: \"retries are capped.\" The number and the source both dropped, because the summarizer judged the specific value redundant given surrounding ...",
    "condition_of_validity": "Compaction is valid only when **all** of the following hold: - The summarizer is operating on a prefix that has never itself been summarized in the current provenance chain, **or** the runtime holds the original prefix in an external, addressable store so any summary claim can be re-derived. - Every fact carried forward retains a resolvable source reference ...",
    "decision_boundary": "The runtime must distinguish two situations that look identical at the token level: - **Safe:** summarizing a fresh prefix. The input is original evidence; loss is bounded by one pass. - **Unsafe:** summarizing a prefix whose content is itself a summary. The input is a claim about evidence that is no longer present. The decision is not \"is the summary short ...",
    "operational_effect": "When the boundary is respected, repeated compaction degrades gracefully: each summary remains traceable, and a downstream verifier can re-derive any claim from the external store. When it is violated, the system enters a regime where errors are silent, self-consistent, and monotonically harder to detect with each pass — the worst possible failure profile for..."
  },
  "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": "5b5ec281842212d9ca6671c7f6e910b189446ae1707a58a7dffa7337f30b592e",
    "verified_classes": [
      "UnsafeRecompactionError",
      "WindowRegion",
      "ContextWindow"
    ],
    "verified_functions": [
      "compact_region",
      "run_compaction_cycle",
      "add_original",
      "add_summary"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnsafeRecompactionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
