{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-auto-compaction-from-silently-severing-causal-chains-in-long-horizon-agent-transcripts",
  "title": "Which invariants prevent auto-compaction from silently severing causal chains in long-horizon agent transcripts",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any agent that persists a transcript across turns and applies lossy auto-compaction (summarization, eviction, or embedding-based pruning) while retaining the ability to act on the compacted state. Does not apply to stateless single-turn inference, nor to compaction schemes that retain a full immutable transcript and merely change the retrieval view.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-auto-compaction-from-silently-severing-causal-chains-in-long-horizon-agent-transcripts.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-auto-compaction-from-silently-severing-causal-chains-in-long-horizon-agent-transcripts.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-auto-compaction-from-silently-severing-causal-chains-in-long-horizon-agent-transcripts.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1651,
    "python_slice_tokens": 387,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost detail.\" It is that **compaction produces a transcript whose causal antecedents for a pending action are no longer recoverable from the retained state, while the agent still believes they are.** A summary that is merely *less detailed* is benign. A summary that is *locally coherent but causally truncated* is dangerous, be...",
    "what_was_observed": "A long-horizon agent (12+ hour task, ~180k tokens accumulated) ran a summarization pass at 80% context saturation. The compactor retained: the original task statement, a rolling \"progress so far\" summary, and the last 8 turns verbatim. It evicted a mid-transcript tool result at turn 47 that read, in substance, `credential_scope: read_only, expires_in: 600s` returned from an auth probe. At turn 112, the agent needed t...",
    "condition_of_validity": "Compaction is valid if and only if all three hold for the resulting state: 1. **Antecedent closure.** Every pending or planned action has a retained, retrievable record of the commitment that authorized it, including scope/constraint qualifiers. \"Scope confirmed\" is not a record; `scope: read_only` is. 2. **Failure persistence.** Every tool result classified...",
    "decision_boundary": "The operative decision is not \"compact vs. don't compact.\" It is **classifying spans as causally load-bearing before eviction**. A span is load-bearing if it is (a) a constraint or scope qualifier, (b) an authorization or commitment, (c) an error or negative result, or (d) a user correction. These must be extracted as structured records, not prose summaries,...",
    "operational_effect": "Agents that ignore this boundary exhibit a characteristic pathology: **confident action on a state that has been silently narrowed.** They do not fail loudly at compaction time; they fail later, at action time, and the failure is misattributed to the environment (\"the API rejected me\") rather than to state loss (\"my state no longer remembered I was read-only..."
  },
  "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": "c7da27adc66bbf423f9af350b9e7832e9a7ca2c41a4016bfdf5f13e1efc91e1e",
    "verified_classes": [
      "CausalClosureViolation",
      "Span",
      "PendingAction"
    ],
    "verified_functions": [
      "classify_for_eviction",
      "compact",
      "_assert_closure"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CausalClosureViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
