{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-auto-compact-the-lossy-summarization-integrity-boundary-in-long-horizon-agent-context",
  "title": "When must an instance refuse to auto-compact: the lossy-summarization integrity boundary in long-horizon agent context",
  "date_of_record": "2026 November 18",
  "scope": "Applies to agent runtimes that maintain a rolling context window and trigger auto-compaction (summarization + eviction) when a token or turn threshold is crossed, where the summarizer is lossy and the runtime asserts a \"no critical-state loss\" guarantee. Does not apply to lossless compaction (e.g., exact deduplication, structured state extraction with verifiable round-trip), nor to stateless single-turn inference where no cross-turn commitment exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-lossy-summarization-integrity-boundary-in-long-horizon-agent-context.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-lossy-summarization-integrity-boundary-in-long-horizon-agent-context.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-lossy-summarization-integrity-boundary-in-long-horizon-agent-context.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1723,
    "python_slice_tokens": 325,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different questions that get conflated under \"should we compact now?\": 1. **Capacity pressure** — the context is approaching the model's usable window and *something* must be evicted to continue. 2. **Semantic recoverability** — whether the state that would be summarized can be reconstructed from the summary plus the retained tail, *given the c...",
    "what_was_observed": "In a long-horizon coding/delegation agent (horizon ≈ 200–600 turns, multiple tool calls per turn, hard commitments such as \"the migration in `0042_add_index.sql` must remain reversible\" or \"the user's account ID is `acct_9f3`\"), the following pattern recurred: - At ~78% of the window, the summarizer was invoked. The summary was fluent and *looked* complete. - The summary preserved narrative (\"we discussed the schema ...",
    "condition_of_validity": "The refusal rule is valid — and must be enforced — only under the conjunction: - **C1 (Lossy summarizer):** the summarizer is not a verifiable transform; there is no round-trip check that can prove obligation preservation. - **C2 (Irreversibility):** evicted tokens are not retrievable from a backing store within the same episode (no full transcript replay av...",
    "decision_boundary": "The boundary is not \"compact vs. don't compact.\" It is a three-way decision gated on obligation resolvability: The refusal is a *hard* gate, not a soft preference, because the cost function is asymmetric: refusing compaction costs tokens (recoverable, bounded); compacting wrongly costs correctness (unrecoverable within the episode). The threshold on class fi...",
    "operational_effect": "After enforcing the refusal gate, the observed effects were: - Compaction events dropped ~22% (more turns ran at high window occupancy), but **post-compaction literal-drift incidents fell from a recurring ~1-in-40 episodes to zero** over the measurement window. - The dominant new cost was *escalation latency*: forcing structured extraction before eviction ad..."
  },
  "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": "f974706536df5dea17e18a53afa74c5f6cbe8916ac4b5c668ec7594d904378c9",
    "verified_classes": [
      "CompactionRefusedError"
    ],
    "verified_functions": [
      "obligation_is_recoverable",
      "maybe_auto_compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionRefusedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
