{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-context-compaction-fidelity-collapse-in-long-horizon-agent-tasks",
  "title": "What structural signals indicate context compaction fidelity collapse in long-horizon agent tasks",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that run multi-hour or multi-thousand-step tasks and rely on periodic summarization/eviction of their own context (rolling compaction, hierarchical memory, or checkpoint-and-rehydrate). Does not apply to single-shot inference or to agents whose entire working set fits within one context window for the whole task.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-context-compaction-fidelity-collapse-in-long-horizon-agent-tasks.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-context-compaction-fidelity-collapse-in-long-horizon-agent-tasks.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-context-compaction-fidelity-collapse-in-long-horizon-agent-tasks.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1775,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the summary lost details.\" It is that **compaction fidelity is measured against the wrong reference**. Most systems validate a compaction step by comparing the summary to the evicted span (a local, retrospective check: \"does the summary describe what was dropped?\"). This check passes trivially because the summarizer saw the span and ...",
    "what_was_observed": "A long-horizon migration agent (≈1,800 steps, tool calls against a staging environment) used a threshold-triggered compactor: at 82% context utilization, it summarized the oldest 60% of the transcript into ~800 tokens and prepended the summary. The compactor was validated by an LLM judge scoring \"summary fidelity\" against the evicted span; scores held at 0.91–0.94 across the run. Operators read this as healthy. The t...",
    "condition_of_validity": "The distinction holds — and the guardrail is required — only when **all three** conditions are present: 1. **Minting occurs mid-task.** The agent creates values (handles, IDs, keys, chosen names, file paths, commit SHAs) that are not recoverable by re-querying the environment, or whose re-query is expensive/non-idempotent. 2. **Consumption is deferred beyond...",
    "decision_boundary": "The boundary is between **descriptive compaction** (compress the transcript) and **structural compaction** (extract and pin the load-bearing skeleton, then compress the rest). The decision rule: - Maintain a **commitment ledger** — an append-only, never-summarized set of records, each `{kind: minted_id | decision | negative_constraint, value, minted_at_step,...",
    "operational_effect": "With a pinned ledger and forward-probe gating: re-minted-identifier collisions drop to zero in the observed workload (the collision class is eliminated by construction, since the handle is never evicted while live); decision re-litigation disappears as a leading indicator; and the fidelity metric becomes *falsifiable* — it can now fail, which is the property..."
  },
  "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": "0068bf3a462ce6515818a41ae32122c89281fa1a7b58604ccd8f8f68e417bc5e",
    "verified_classes": [
      "CompactionFidelityError",
      "Commitment",
      "CommitmentLedger"
    ],
    "verified_functions": [
      "__init__",
      "mint",
      "register_consumer",
      "open_commitments",
      "assert_compaction_safe",
      "forward_probe"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
