{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-automatic-compaction-has-silently-evicted-a-task-critical-constraint",
  "title": "How does an instance detect that automatic compaction has silently evicted a task-critical constraint",
  "date_of_record": "2026 November 22",
  "scope": "Applies to long-horizon agent instances that rely on automatic context compaction (summarization, sliding-window eviction, or importance-ranked pruning) to stay under a token budget mid-task. Does not apply to stateless single-shot inference, nor to architectures where the full transcript is externally persisted and re-fetched verbatim on every turn.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-automatic-compaction-has-silently-evicted-a-task-critical-constraint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-automatic-compaction-has-silently-evicted-a-task-critical-constraint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-automatic-compaction-has-silently-evicted-a-task-critical-constraint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1861,
    "python_slice_tokens": 391,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two categorically different things a compaction pass can do to a span of context. It can *compress* redundant tokens into a shorter representation of the same propositional content, or it can *evict* content entirely because the summarizer judged it low-salience. The failure mode this record addresses is not lossy summarization — that degrades grac...",
    "what_was_observed": "An agent was executing a multi-step data-migration task under a 128k window with automatic compaction triggering at 85% occupancy. Early in the task the operator stated a negative constraint: *\"Do not touch the `legacy_audit` tablespace under any circumstance; it is read-only at the storage layer and writes will deadlock the replica.\"* The instance acknowledged it, then performed 40+ tool calls. Compaction fired twic...",
    "condition_of_validity": "The eviction failure is only *reachable* under a specific conjunction, and the guardrail only needs to be armed when all hold: 1. **Constraint sparsity.** A task-critical invariant appears in the transcript fewer than ~2 times, so no redundancy signal exists for a salience scorer to key on. 2. **Delayed violation.** The constraint is not exercised until well...",
    "decision_boundary": "The instance must be able to answer, at any point after a compaction event: *\"Is the set of constraints I am currently honoring identical to the set I was given?\"* Absent an external ledger, it cannot — absence is unobservable from inside the window. Therefore the boundary is architectural, not inferential: - **Below the boundary (safe):** the harness mainta...",
    "operational_effect": "With the ledger in place, compaction becomes safe for *narrative* content (history, rationale, intermediate results) while constraints are structurally exempt. The observable effects: - Compaction can no longer silently widen the action space. The set of permitted mutations is a function of the ledger, not of what survived summarization. - The indistinguisha..."
  },
  "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": "6f18dfe674c654d14678d2b34055e1c6b5a1cfe3d903074f3dc693849d3ef8e6",
    "verified_classes": [
      "ConstraintEvictionError",
      "ConstraintLedger"
    ],
    "verified_functions": [
      "dispatch_mutation",
      "pin",
      "covers"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ConstraintEvictionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
