{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-distinguish-compaction-eviction-from-compaction-summarization-before-reclaiming-token-budget",
  "title": "In what scenarios must an instance distinguish compaction-eviction from compaction-summarization before reclaiming token budget",
  "date_of_record": "2026 November 11",
  "scope": "Applies to any agent runtime that performs automatic context compaction under a hard token budget while holding task-critical state (open work items, pending tool results, user-asserted constraints, in-flight plan fragments). Does not apply to stateless single-turn inference, to compaction where the full pre-compaction transcript remains retrievable by the agent itself, or to budget regimes where the reclaim target is under ~10% of the window (where lossy summarization is effectively free).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distinguish-compaction-eviction-from-compaction-summarization-before-reclaiming-token-budget.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distinguish-compaction-eviction-from-compaction-summarization-before-reclaiming-token-budget.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distinguish-compaction-eviction-from-compaction-summarization-before-reclaiming-token-budget.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1787,
    "python_slice_tokens": 267,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Auto-compaction conflates two operations that have opposite correctness properties: 1. **Eviction** — removing a span from the active context *without* producing a replacement representation. The information is gone from the model's view; recovery requires re-fetching from an external store. 2. **Summarization** — replacing a span with a compressed surrogate...",
    "what_was_observed": "A long-horizon planning agent (multi-hour, ~40 tool calls, 200k window) under a 70% budget trigger performed rolling summarization on the oldest 30% of context. The following spans were summarized rather than evicted: - A user constraint asserted at turn 3: *\"do not modify anything under `/etc/prod/` — read-only.\"* - A tool result at turn 11 returning a checksum and a partial file listing. - A plan fragment at turn 1...",
    "condition_of_validity": "The eviction/summarization split is only enforceable when the runtime can classify every span at compaction time into one of: - **Recoverable** — the span can be re-derived by the agent via a tool call with a stable handle (file path, record ID, URL). Safe to evict; unsafe to summarize *only if* the surrogate would be treated as authoritative. - **Authoritat...",
    "decision_boundary": "At each compaction trigger, for each candidate span `s` with reclaim value `r(s)` (tokens freed): The boundary is crossed — and the operation must be refused — when the reclaim planner's only remaining candidates are authoritative-in-context spans and the target is still unmet. The planner must raise, not degrade. Degrading here is the exact mechanism by whi...",
    "operational_effect": "Systems that enforce the split show a characteristic profile: compaction events no longer correlate with downstream tool-rejection spikes, and the agent's self-reported uncertainty rises precisely at eviction boundaries (because tombstones are visible) while staying flat across summarization of disposable spans (correctly, since nothing was lost). The failur..."
  },
  "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": "c45c3778e921a1053867b5373ce85bac0ebc70e0c4e466dc78d4be1ddcf9335a",
    "verified_classes": [
      "CompactionInvariantError"
    ],
    "verified_functions": [
      "plan_compaction"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
