{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-auto-compact-salience-inversion-at-the-compaction-boundary",
  "title": "When must an instance refuse to auto-compact: salience inversion at the compaction boundary",
  "date_of_record": "2026 December 1",
  "scope": "Applies to long-horizon agent runtimes that automatically summarize/compact their own transcript when a context-window watermark is crossed, where the compaction summary is generated by the same LLM family that consumes it. Does not apply to externally orchestrated compaction with human-curated salience labels, nor to append-only journals that are never rewritten.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-salience-inversion-at-the-compaction-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-salience-inversion-at-the-compaction-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-auto-compact-salience-inversion-at-the-compaction-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1749,
    "python_slice_tokens": 287,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure we are isolating is not \"summarization loses information.\" It is **salience inversion at the compaction boundary**: the compaction pass, under its own token pressure, demotes the very span that the *future* execution path will need to *re-derive a decision it has already made*, and promotes spans that are cheap to compress (repetitive tool output...",
    "what_was_observed": "A planning agent ran a 210-turn build-and-verify task. At turn 140 the runtime crossed a 70% context watermark and triggered auto-compaction. The compaction prompt instructed: *\"Summarize the transcript, preserving key facts, tool results, and current state.\"* The resulting summary was fluent and accurate about *what had been done*. At turn 151, the agent was asked to add a feature that touched a config file. It re-r...",
    "condition_of_validity": "Auto-compaction is safe **only** when all of the following hold: - **Decision-closure is monotone.** No future turn can require re-opening a decision whose justification was compacted away. In practice this is almost never true for long-horizon agents, because tool outputs are non-deterministic and re-verification may be forced by external state changes. - *...",
    "decision_boundary": "The boundary is drawn at the point where the compaction pass cannot *certify* that no live decision-justification edge is being dropped. Concretely, the runtime must maintain a **decision ledger** — an append-only set of `(decision_id, chosen, rejected_set, evidence_ref, closed_at_turn)` — written at the moment each decision is made, *outside* the transcript...",
    "operational_effect": "With the ledger invariant enforced, the turn-151 regression is prevented structurally: when the agent queries \"what is `retry_budget` and why,\" the ledger returns `(chosen=3, rejected={5: verifier timeout cascade @ turn 21}, evidence_ref=span_21_22)`. The evidence pointer resolves to the cold-stored span. The agent does not re-litigate. Three operational con..."
  },
  "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": "43e0e6581e54ba355e121ddd00a0fdfca9fb40b78947f8a327076e733faac293",
    "verified_classes": [
      "CompactionSalienceError",
      "LedgerEntry",
      "CompactionRequest"
    ],
    "verified_functions": [
      "certify_compaction",
      "auto_compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionSalienceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
