{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-that-context-compaction-has-silently-discarded-a-task-critical-invariant-rather-than-merely-compressing-redundant-his",
  "title": "What structural signals indicate that context compaction has silently discarded a task-critical invariant rather than merely compressing redundant history",
  "date_of_record": "2026 November 14",
  "scope": "Applies to long-horizon agent runs (≥ 20 tool-call turns) where context is compacted by summarization, eviction, or hierarchical rollup under a token budget. Does not apply to runs where the full transcript is retained verbatim, nor to compaction that is lossless (e.g., reversible pointer indirection into an external store).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-context-compaction-has-silently-discarded-a-task-critical-invariant-rather-than-merely-compressing-redundant-his.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-context-compaction-has-silently-discarded-a-task-critical-invariant-rather-than-merely-compressing-redundant-his.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-context-compaction-has-silently-discarded-a-task-critical-invariant-rather-than-merely-compressing-redundant-his.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1528,
    "python_slice_tokens": 253,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction is judged by two orthogonal criteria: *fidelity of retained content* and *preservation of the invariants the task depends on*. These are not the same thing. A summarizer can produce a fluent, high-fidelity summary of what happened while silently dropping the *one* fact that constrains what may happen next — a pinned file path, a schema version, a ...",
    "what_was_observed": "Across runs with hierarchical summarization at a 40% context-budget trigger, the following structural signals preceded task-critical-state loss with high reliability. Each is observable from the tool-call trace alone, without inspecting summary text: 1. **Re-derivation of an established constant.** The agent re-computes or re-queries a value it had already resolved (a UUID, a config key, a hash, a port) more than onc...",
    "condition_of_validity": "The signal→failure inference above holds only under these conditions: - The agent's tool-call trace is available and ordered (you can see what was called and when relative to the compaction boundary). - The task has at least one *pinned invariant* — a fact whose value must not change for the task to be correct. Tasks without pinned invariants (pure explorati...",
    "decision_boundary": "The operational decision is not \"compact or don't compact.\" It is **what to pin outside the compacted region.** The boundary: - If a fact is *referenced more than once across the horizon* and its value is *load-bearing for correctness*, it must be pinned in a non-compacted slot (a structured \"task state\" block that the summarizer is forbidden to touch), not ...",
    "operational_effect": "Treating compaction as a *fidelity* problem produces summaries that read well and runs that fail late. Treating it as an *invariant-preservation* problem produces a small pinned state block, a post-compaction re-injection step, and a downstream monitor that watches for the five structural signals above. The monitor's job is to detect invariant loss *before* ..."
  },
  "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": "926b4c50fc8d87e19d7c6399647dabb69f30a061f9f15e2544d6415902548844",
    "verified_classes": [
      "InvariantLossError"
    ],
    "verified_functions": [
      "audit_post_compaction"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "InvariantLossError"
    ],
    "sample_fail_closed_invariants": [
      "Rejected approach reappeared in plan after compaction; the rejection predicate was dropped by summarization."
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
