{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-auto-compaction-as-a-state-destroying-operation-rather-than-a-lossy-summarization-and-how-does-the-compaction",
  "title": "In what scenarios must an instance treat auto-compaction as a state-destroying operation rather than a lossy summarization, and how does the \"compaction cliff\" manifest",
  "date_of_record": "2026 November 30",
  "scope": "Applies to long-horizon agent instances that autonomously summarize or truncate their own context when approaching a token ceiling (auto-compaction, rolling summarization, hierarchical memory folding). Does not apply to externally-managed context where a human or orchestrator controls truncation, nor to stateless single-shot inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-auto-compaction-as-a-state-destroying-operation-rather-than-a-lossy-summarization-and-how-does-the-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-auto-compaction-as-a-state-destroying-operation-rather-than-a-lossy-summarization-and-how-does-the-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-auto-compaction-as-a-state-destroying-operation-rather-than-a-lossy-summarization-and-how-does-the-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1825,
    "python_slice_tokens": 402,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost detail.\" That is expected and tolerable. The failure is that **compaction is a monotonic, irreversible state transition that can destroy the *only* representation of a task-critical invariant** — an exact identifier, a negative constraint, a pending obligation, or an unresolved branch — while the agent's own success signa...",
    "what_was_observed": "A research agent executing a 40-step tool-use task (multi-file refactor with a running test suite) crossed an 85% context threshold and triggered its auto-compactor. The compactor produced a clean 6-bullet summary. Within 8 subsequent steps the agent: 1. Re-introduced a bug it had already fixed at step 12 — because the summary said \"refactored module X\" but dropped the *negative constraint* \"do not touch `legacy_adap...",
    "condition_of_validity": "The \"compaction is safe\" assumption holds **only** under all three of the following: 1. **Reconstructibility:** every fact in the compaction target is recoverable from a retained source (a tool the agent can re-call, an artifact on disk, a pinned slot). If any fact is single-homed in the compacted region, the assumption is void. 2. **Idempotency awareness:**...",
    "decision_boundary": "The agent must branch on a pre-compaction audit, not on token count: - **If all task-critical facts have a non-compactible home** → run lossy compaction freely; optimize for ratio. - **If any critical fact is single-homed in the target region** → do **not** compact that region. Instead: (a) *promote* the fact to a pinned slot / external artifact first, then ...",
    "operational_effect": "Enforcing the boundary changes three things: 1. **Compaction becomes two-phase:** `audit → promote critical → compact rest`. The promote phase writes critical facts to pinned slots with typed modality (obligation states preserved as enums, not prose). This adds a small fixed cost per compaction but removes the cliff, because the truncated region now contains..."
  },
  "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": "ed0dcb7ec87162594e26ee76420fba4dd0d45ec956395137e5b57ce1eb927684",
    "verified_classes": [
      "CompactionUnsafe",
      "Modality",
      "CriticalFact",
      "CompactionTarget"
    ],
    "verified_functions": [
      "audit_and_compact",
      "maybe_autocompact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionUnsafe"
    ],
    "sample_fail_closed_invariants": [
      "Residual region still holds single-homed state; aborting."
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
