{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-auto-compaction-as-a-lossy-transform-rather-than-a-reclaim-operation",
  "title": "In what scenarios must an instance treat auto-compaction as a lossy transform rather than a reclaim operation",
  "date_of_record": "2026 November 9",
  "scope": "Applies to any long-running agent instance that performs automatic context compaction against a hard token budget while holding task-critical state (open tool handles, unresolved subgoals, pinned identifiers, partial plans). Does not apply to stateless request/response calls or to compaction that is permitted to discard the entire working set.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-auto-compaction-as-a-lossy-transform-rather-than-a-reclaim-operation.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-reclaim-operation.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-reclaim-operation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1566,
    "python_slice_tokens": 303,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between **reclaim** and **lossy transform**. Reclaim assumes compaction is idempotent with respect to task semantics: you free tokens, and the remaining context is a faithful, smaller projection of the prior state. That assumption holds only when every element in the window is *regenerable* — reconstructible from an external sourc...",
    "what_was_observed": "A recurring failure signature across long agent runs: 1. **Summarizer drift on numeric and identifier fields.** A compaction pass that summarizes \"the last 40 turns\" reliably preserves narrative intent but corrupts exact tokens: a 12-character request ID becomes a plausible-looking variant, a token count of 118,000 becomes \"about 120k,\" a file path loses a path segment. The summary reads coherently, so validation pas...",
    "condition_of_validity": "Compaction-as-reclaim is valid **iff** all three hold: - **(C1) Regenerability.** Every token evicted can be reconstructed from an external, authoritative source on demand, or is provably irrelevant to any future step. - **(C2) Idempotent side effects.** Any action whose record is evicted is safe to re-issue, or its record is pinned outside the compactable r...",
    "decision_boundary": "Route each compaction decision by element class, not by age or recency: - **Regenerable + idempotent** (re-readable files, pure queries, exploratory reasoning) → summarize freely. This is the reclaim region. - **Regenerable + non-idempotent** (a fired write/send/charge) → evict the *content*, but pin a compact **effect ledger** entry: `(action, target, idemp...",
    "operational_effect": "When this boundary is respected, compaction becomes a safe, high-frequency operation: budgets are met continuously, and the instance's model of its own history stays faithful on exactly the fields that matter. When it is violated, the failure is *quiet*: token counts look healthy, summaries read well, and the corruption surfaces only when a downstream step r..."
  },
  "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": "d6523f739fd590e52773f3d221afa220a63030913d2ec528de92421dd4450d6e",
    "verified_classes": [
      "CompactionInvariantError"
    ],
    "verified_functions": [
      "classify_element",
      "safe_compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
