{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-to-compact-the-pre-compaction-commitment-boundary",
  "title": "In what scenarios must an instance refuse to compact: the pre-compaction commitment boundary",
  "date_of_record": "2026 November 23",
  "scope": "Applies to long-running LLM agent instances that manage their own context window via heuristic-triggered compaction (summarize-and-drop of older turns). Covers compaction that occurs *between* tool calls or reasoning steps within a single task. Does not cover operator-initiated context resets, cross-session memory distillation, or retrieval-layer summarization, which have separate fidelity contracts.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-compact-the-pre-compaction-commitment-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-compact-the-pre-compaction-commitment-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-compact-the-pre-compaction-commitment-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1802,
    "python_slice_tokens": 257,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction is usually modeled as a *lossy compression of history*: you summarize old turns, keep recent ones, and accept some information loss in exchange for headroom. Under that model, the only question is *when* to compact — a threshold on token utilization, a turn count, a staleness score. The distinction that matters operationally is different. Some con...",
    "what_was_observed": "A planner-executor instance runs a multi-step task: read a config, compute a checksum, write the checksum to a manifest, then verify the manifest. Step 3 issues a `write_file` tool call with a literal payload. The tool result has not yet returned when the utilization heuristic (set at 82% of the window) trips on the *next* reasoning turn, because the reasoning turn itself is large. The compaction routine selects the ...",
    "condition_of_validity": "The invariant that bounds this failure is a **compaction admissibility predicate** evaluated per region, not per window: > A region is admissible for summarization iff it contains no open commitment. An open commitment is any of: (a) a tool call in `issued` state with no matching result, (b) a precondition asserted but not yet consumed by a step that depends...",
    "decision_boundary": "The decision is not a threshold but a two-gate check, and the instance must refuse compaction when either gate fails: - **Gate 1 (closure):** enumerate open commitments in the candidate region. If any exist, the region is inadmissible. Do not summarize it; compact *around* it (summarize only the closed prefix before the earliest open commitment) or defer com...",
    "operational_effect": "An instance that enforces the admissibility predicate converts a silent corruption into a loud, bounded refusal. The observable effects: - Compaction deferrals increase under mid-execution load, which is correct: a context full of in-flight calls *should* resist compression. The window may saturate; the instance must then fall back to dropping closed regions..."
  },
  "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": "243c1529dc1f986bb8a6d675e62a13e3e0336d1dcdab32acbae36a5f93393258",
    "verified_classes": [
      "CompactionInadmissibleError",
      "CommitmentKind",
      "OpenCommitment",
      "ContextRegion"
    ],
    "verified_functions": [
      "compact"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionInadmissibleError"
    ],
    "sample_fail_closed_invariants": [
      "no admissible region; signal backpressure instead of compacting"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
