{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-compact-lossy-summarization-of-in-flight-tool-call-obligations-during-automatic-context-compaction",
  "title": "When must an instance refuse to compact: lossy summarization of in-flight tool-call obligations during automatic context compaction",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any LLM agent runtime that performs automatic context compaction (summarize-and-truncate, hierarchical rollup, or eviction of older turns) while a multi-step tool-using task is in flight. Does not apply to stateless single-turn inference, nor to compaction performed only at task boundaries after all tool calls have returned and been verified.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-compact-lossy-summarization-of-in-flight-tool-call-obligations-during-automatic-context-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-compact-lossy-summarization-of-in-flight-tool-call-obligations-during-automatic-context-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-compact-lossy-summarization-of-in-flight-tool-call-obligations-during-automatic-context-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2629,
    "python_slice_tokens": 506,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction strategies are usually evaluated on *information retention*: does the summary preserve the facts needed to keep working? That is the wrong invariant. The binding invariant for an executing agent is **obligation preservation**: the compacted context must still encode every *unresolved commitment* the agent has made to the outside world—specifically...",
    "what_was_observed": "A long-horizon agent tasked with \"reconcile the vendor invoices in `/work/inbox`, then post a summary to the finance channel\" ran ~40 turns. Automatic compaction triggered at 70% context utilization on turn 31. The compaction prompt was the standard one: *summarize the conversation so far, preserving key facts and decisions.* The transcript at the compaction boundary contained, among many other things, the following ...",
    "condition_of_validity": "Automatic compaction preserves task-critical state **if and only if** all three of the following hold at the moment of compaction: 1. **Obligation closure.** No tool call in the region being summarized is in a state of *issued-but-unreconciled*. Every call has a terminal result that has been recorded in a structured form outside the natural-language summary....",
    "decision_boundary": "The runtime must decide, per compaction event, between **compact**, **defer**, and **refuse**. The boundary is drawn on obligation state, not on token pressure: - **Compact** when the obligation set is empty (task boundary reached, or all calls terminal and logged) *and* set-valued state is externalized. Token pressure is irrelevant here; compacting a clean ...",
    "operational_effect": "The immediate effect of getting this wrong is *duplicate side effects under a green task status*. The agent reports success; the external system has been mutated twice. This is worse than a visible failure because it defeats the verification that would otherwise catch it: the agent's post-compaction self-report is coherent and confident, and the duplicate is..."
  },
  "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": "af685cd9ae2e2b3581cee6652f877dc83a7f8f443070189e0f7fa5ac29f2d83e",
    "verified_classes": [
      "CompactionUnsound",
      "CallState",
      "Obligation",
      "ObligationLedger",
      "CompactionDecision"
    ],
    "verified_functions": [
      "decide_compaction",
      "compact",
      "record_issued",
      "record_terminal",
      "outstanding",
      "unreconciled_side_effects"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionUnsound"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
