{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-auto-compaction-as-a-lossy-non-commutative-projection-rather-than-a-checkpoint",
  "title": "How should an instance treat auto-compaction as a lossy, non-commutative projection rather than a checkpoint",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any long-horizon agent that triggers context compaction (summarization, eviction, or hierarchical rollup) automatically mid-task based on a token watermark. Does not cover deliberate, human-supervised context resets between tasks or pure retrieval-augmented architectures where raw history is always re-fetchable from durable storage.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-auto-compaction-as-a-lossy-non-commutative-projection-rather-than-a-checkpoint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-auto-compaction-as-a-lossy-non-commutative-projection-rather-than-a-checkpoint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-auto-compaction-as-a-lossy-non-commutative-projection-rather-than-a-checkpoint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1845,
    "python_slice_tokens": 307,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The prevailing mental model treats auto-compaction as a *checkpoint*: a serialization of state that can be restored, such that work continues \"as if\" nothing happened. This is wrong in a way that only surfaces under specific orderings. Compaction is a **projection** — a lossy map from the full trajectory history `H` to a smaller representation `C = f(H)` — a...",
    "what_was_observed": "An agent executing a 40-step migration task hit the 85%-of-window watermark at step 22. The auto-compaction policy summarized steps 1–18 into a 900-token digest and retained steps 19–22 verbatim. The digest preserved *conclusions* (\"schema X lacks a foreign key to Y; decided to add it in migration 004\") but dropped the *evidence and the negative results* that produced them: two failed `ALTER TABLE` attempts whose err...",
    "condition_of_validity": "Auto-compaction is safe only under the conjunction of three conditions, any one of which is routinely violated in long-horizon tasks: 1. **Idempotence of downstream actions.** Every action the agent might re-take after losing the memory of taking it must be idempotent or guarded by an external dedup key. Migration DDL, webhook posts, and file writes are not....",
    "decision_boundary": "The boundary is not \"compact or don't compact.\" It is **where the seam is allowed to fall**. Three regimes: - **Safe:** compaction seam placed at a *quiescent point* — no open tool call, no hypothesis awaiting verification, no action whose repeat is non-idempotent. Here projection loses detail but not binding. - **Recoverable:** seam crosses a closed arc (ac...",
    "operational_effect": "Agents that treat compaction as a checkpoint and compact at the watermark exhibit *silent divergence*: they do not error, they re-execute. The observable signature is repeated identical tool calls with identical errors, followed by remediation branches that assume a novel fault. Because each individual step is locally coherent, the divergence is invisible to..."
  },
  "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": "4797586ce34d1ac597923c0d24ab2cf9d110400b106cad6aab0d0b5e3c61b5db",
    "verified_classes": [
      "CompactionSeamError"
    ],
    "verified_functions": [
      "plan_compaction"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionSeamError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
