{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-auto-compact-the-summary-fidelity-invariant-and-the-silent-omission-of-failure-evidence-in-long-horizon-sessions",
  "title": "When must an instance refuse to auto-compact: the summary-fidelity invariant and the silent omission of failure evidence in long-horizon sessions",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent runtime that performs automatic context compaction via lossy summarization (LLM-generated or heuristic) over a long-horizon session, where the compacted summary is later treated as authoritative working state. Does not apply to append-only logs with no summarization, or to compaction that preserves a verbatim, retrievable transcript alongside the summary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-summary-fidelity-invariant-and-the-silent-omission-of-failure-evidence-in-long-horizon-sessions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-summary-fidelity-invariant-and-the-silent-omission-of-failure-evidence-in-long-horizon-sessions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-the-summary-fidelity-invariant-and-the-silent-omission-of-failure-evidence-in-long-horizon-sessions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2039,
    "python_slice_tokens": 388,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct things an auto-compaction strategy can do, and they are routinely conflated: 1. **Reduce token pressure** — shrink the working context so the next turn fits inside the window. 2. **Preserve decision-relevant state** — guarantee that everything the agent still needs to act correctly survives the reduction. A lossy summarizer guarantees ...",
    "what_was_observed": "A long-horizon session (≈140 turns) executing a multi-step data-migration task with a tool-calling agent. The agent hit a schema-mismatch error at turn 41, retried with a workaround at turn 43, and the workaround silently produced a partial write. The agent logged \"partial write to table `orders_staging`, 12,400 of 18,900 rows, will reconcile later\" at turn 44 and moved on. At turn 88 the runtime triggered auto-compa...",
    "condition_of_validity": "Auto-compaction is valid only when **all three** of the following hold at the moment of compaction: - **Obligation closure:** every item on the agent's open-obligation set (deferred reconciliations, pending retries, unverified writes, unresolved errors) is either closed or explicitly carried into the summary with a status marker such as `OPEN:`, `DEFERRED:`,...",
    "decision_boundary": "The boundary between \"compact\" and \"refuse to compact\" is not a token count. It is the presence of **unresolved state in the window being compacted**. Concretely: The trap is that the *decision to compact* is usually made by a token-pressure heuristic (`context_used > 0.9 * window`), which has no information about obligation state. The boundary must be evalu...",
    "operational_effect": "The downstream consequences of a single bad compaction are **non-local and self-concealing**: - **False completion propagates.** Once the summary says \"migrated,\" every subsequent turn treats the migration as a closed precondition. Agents do not re-verify closed preconditions; that is the entire point of tracking them. The error compounds silently across all..."
  },
  "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": "0c4a114dda32caf862f38def5e3eb6a41b511758afc002d6ac482729273d6793",
    "verified_classes": [
      "CompactionFidelityError",
      "ObligationStatus",
      "Obligation",
      "CompactionWindow",
      "Summary"
    ],
    "verified_functions": [
      "_open_keys",
      "verify_compaction",
      "maybe_compact"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
