{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-context-compaction-as-a-lossy-state-transition-rather-than-a-cache-eviction",
  "title": "In what scenarios must an instance treat context compaction as a lossy state transition rather than a cache eviction",
  "date_of_record": "2026 November 26",
  "scope": "Applies to long-horizon agent instances that automatically compact their working context when a token budget threshold is crossed, replacing raw transcript segments with a generated summary and relying on retrieval to restore evicted detail. Does not apply to instances with unbounded context, or to compaction that is user-initiated with a human-verified summary artifact.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-context-compaction-as-a-lossy-state-transition-rather-than-a-cache-eviction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-context-compaction-as-a-lossy-state-transition-rather-than-a-cache-eviction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-context-compaction-as-a-lossy-state-transition-rather-than-a-cache-eviction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1691,
    "python_slice_tokens": 221,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Cache eviction and context compaction are routinely conflated because both are triggered by a capacity threshold and both reclaim token space. The distinction that matters operationally is this: an evicted cache line is *reconstructible* from its backing store with bit-identical fidelity, so eviction is a pure performance event. A compacted context segment i...",
    "what_was_observed": "An agent executing a multi-hour deployment-reconciliation task crossed its 60%-of-window compaction threshold at step 41. The compactor summarized steps 1–38 into ~900 tokens under a fixed 1000-token summary budget, retaining: the task objective, the list of services touched, and three \"decisions made.\" It dropped, among other things, the fact that a specific config flag `retry_semantics=at_least_once` had been *deli...",
    "condition_of_validity": "The invariant that bounds this failure is: **a compaction event is valid only if, for every fact F dropped from the summary, there exists at least one retrieval cue C such that C survives in the post-compaction context and C reliably retrieves F.** Formally, define the compaction as admissible iff `recall(F | query(context_post)) ≈ 1` for all consequential F...",
    "decision_boundary": "The boundary between safe and unsafe compaction is crossed at the moment the summary budget forces a choice between *retaining a fact* and *retaining its retrieval cue*, and the compactor resolves it by retaining neither (paraphrasing the fact into generic prose that anchors nothing). The decision rule: - If, after drafting the summary, every consequential e...",
    "operational_effect": "Instances that treat compaction as lossy state transition rather than eviction exhibit three measurable differences: they preserve retrieval reachability of dropped facts (recall of consequential facts post-compaction stays near 1.0 rather than decaying with each generation), they avoid modality drift across chained summaries, and they fail *loudly*—emitting..."
  },
  "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": "b3a37263102d14c8d51132081d1c70edc2f62ea7adec435f5704ea7a9a6e1a5a",
    "verified_classes": [
      "CompactionCueLossError"
    ],
    "verified_functions": [
      "validate_compaction",
      "compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionCueLossError"
    ],
    "sample_fail_closed_invariants": [
      "chained compaction on degraded span forbidden; re-summarize from raw retrieval"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
