{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-auto-compaction-as-a-lossy-transform-rather-than-a-safe-truncation-and-how-does-the-compaction-boundary-itsel",
  "title": "In what scenarios must an instance treat auto-compaction as a lossy transform rather than a safe truncation, and how does the compaction boundary itself become the failure surface?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to long-horizon agents that run auto-compaction (summarize-and-evict) on their own context mid-task, where the eviction is triggered by a token watermark and the summary is produced by the same or a sibling model instance. Does not apply to fixed-window truncation with no summarization, nor to external durable stores that are never compressed into the live prompt.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-auto-compaction-as-a-lossy-transform-rather-than-a-safe-truncation-and-how-does-the-compaction-boundary-itsel.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-auto-compaction-as-a-lossy-transform-rather-than-a-safe-truncation-and-how-does-the-compaction-boundary-itsel.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-auto-compaction-as-a-lossy-transform-rather-than-a-safe-truncation-and-how-does-the-compaction-boundary-itsel.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1887,
    "python_slice_tokens": 346,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model treats auto-compaction as *truncation plus a summary*: old tokens leave, a compressed surrogate enters, net information is \"mostly preserved.\" The operational reality is that compaction is a **lossy, non-invertible transform executed by a probabilistic process at an arbitrary point in a stateful task**. The compaction boundary—the exa...",
    "what_was_observed": "A file-migration agent was executing a 40-step plan across a 32k context window with compaction at 78%. At step 22 it was mid-way through negotiating a rename policy with a peer agent: the ledger held three committed decisions (`keep_ext=.bak`, `overwrite=false`, `dry_run_until_step=30`) and one *pending* proposal. Token pressure tripped the watermark at step 23. The summarizer produced: *\"The agent agreed with its p...",
    "condition_of_validity": "Auto-compaction is only safe under a condition that is rarely checked: **the eviction boundary must be aligned to task-atomic units, and every unit crossing the boundary must be classified before it is summarized.** Concretely, a compaction is valid iff, for the evicted span S: 1. S contains no open (unclosed) structured artifact—no partial tool-call payload...",
    "decision_boundary": "The operator must decide, per compaction event, between **summarize-and-evict** and **pin-and-evict**: - If the span is *narrative* (exploration, dead ends, verbose tool output already consumed) → summarize. Loss is acceptable because nothing downstream branches on it. - If the span contains any *constraint, commitment, credential, identity token, or open st...",
    "operational_effect": "Systems that enforce this boundary show a characteristic signature: compaction events are **cheap and frequent** for narrative spans and **blocked or deferred** for spans containing pinned state, and the pinned region grows monotonically (it is never summarized) until a task-phase boundary explicitly releases it. The failure mode disappears not because summa..."
  },
  "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": "0b798aca1c1f06ba42977e6b2706521c98c4ef0e3696eb4bce138bfa65dc03b2",
    "verified_classes": [
      "CompactionInvalid",
      "SpanClass",
      "Span",
      "PinnedRegion"
    ],
    "verified_functions": [
      "compact",
      "resume_check",
      "pin"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionInvalid"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
