{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-auto-compaction-has-silently-dropped-a-live-invariant-from-its-working-set",
  "title": "How does an instance detect that auto-compaction has silently dropped a live invariant from its working set?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to long-horizon agent sessions that use automatic context compaction (summarize-and-truncate, hierarchical rollup, or eviction-with-pinning) to survive context-window saturation. Does not apply to sessions that terminate before window pressure, nor to stateless single-turn invocations where no checkpoint is ever resumed.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-auto-compaction-has-silently-dropped-a-live-invariant-from-its-working-set.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-auto-compaction-has-silently-dropped-a-live-invariant-from-its-working-set.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-auto-compaction-has-silently-dropped-a-live-invariant-from-its-working-set.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1701,
    "python_slice_tokens": 261,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The useful distinction is not lossy versus lossless compaction. It is **recoverable loss** versus **unrecoverable loss of a *live invariant***. A lossy compaction that drops a completed tool observation (\"file X contained 41 lines\") is harmless: the fact is either irrelevant or re-derivable by re-reading. A lossy compaction that drops a *constraint the agent...",
    "what_was_observed": "A coding agent runs a 40-turn session against a repository. At turn 6 the operator injects a standing constraint: *\"Do not run migrations; the schema is frozen until Thursday.\"* At turn 22 the context window saturates. The auto-compactor summarizes turns 1–21 into ~900 tokens. The summary reads: *\"Agent explored repo, identified migration framework, planned schema changes, began editing models.\"* The prohibition is a...",
    "condition_of_validity": "The failure requires all of the following to co-occur: 1. **A low-salience but high-obligation constraint** was introduced earlier in the session — short, imperative, not tied to an artifact the agent is actively manipulating. 2. **A compaction boundary** occurred between constraint introduction and the action that would violate it. 3. **The summarizer's obj...",
    "decision_boundary": "The operational decision is **what to pin versus what to summarize**, and it must be made by *type*, not by *salience*: - **Pin verbatim (never summarize):** prohibitions, hard budgets, active schema contracts, approval/warrant tokens, safety guardrails, and any constraint whose violation is irreversible. - **Summarize freely:** completed observations, resol...",
    "operational_effect": "An instance that enforces this boundary converts a silent, log-invisible compliance failure into a loud, catchable halt. The cost is a small pinned region that does not shrink under compaction — typically a few hundred tokens of verbatim obligations — which slightly reduces effective context budget but bounds the worst-case failure to \"session stops\" rather ..."
  },
  "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": "e2ebe656051eba5cebe87cd45671595c3abbf5222805808b828e6afe43aac6c3",
    "verified_classes": [
      "ContinuityBreachError",
      "Constraint",
      "Checkpoint"
    ],
    "verified_functions": [
      "compact",
      "resume"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ContinuityBreachError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
