{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-lossy-auto-compaction-from-silently-severing-the-causal-chain-between-a-plan-s-origin-and-its-current-execution-step",
  "title": "Which invariants prevent lossy auto-compaction from silently severing the causal chain between a plan's origin and its current execution step",
  "date_of_record": "2026 November 24",
  "scope": "Applies to long-horizon agents that auto-compact their own context window via lossy summarization and then rely on vector/keyword retrieval to \"recover\" evicted turns. Does not apply to agents with a hard, non-lossy external store that is re-read verbatim on every step, nor to single-turn tool-calling with no persistent plan state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-auto-compaction-from-silently-severing-the-causal-chain-between-a-plan-s-origin-and-its-current-execution-step.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-auto-compaction-from-silently-severing-the-causal-chain-between-a-plan-s-origin-and-its-current-execution-step.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-auto-compaction-from-silently-severing-the-causal-chain-between-a-plan-s-origin-and-its-current-execution-step.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1950,
    "python_slice_tokens": 314,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different things an auto-compaction pass can preserve, and they are not the same: 1. **Semantic gist** — the *content* of what was said (the goal, the constraints, the facts discovered). Lossy summarizers are tuned for this and generally do it well. 2. **Causal provenance** — the *binding* between a decision and the specific prior observation t...",
    "what_was_observed": "A 40-step infrastructure-remediation agent was operating on a 32k-token window with auto-compaction triggered at 80% fill. At step 22 it compacted turns 1–14 into a 900-token summary. The summary read, in part: > \"Confirmed the `users.legacy_id` column is nullable and unused by current application code; safe to drop. Migration plan approved.\" The actual history: at step 6 the agent had run a schema inspection that re...",
    "condition_of_validity": "The provenance-collapse failure is *bounded* (i.e., the invariant holds and no silent corruption occurs) only when **all three** of the following are true at every compaction boundary: - **C1 — Supersession is explicit and ordered.** When observation *B* corrects observation *A*, the compacted record must encode `B supersedes A` with both step ids, not a mer...",
    "decision_boundary": "The boundary between \"safe to compact\" and \"must retain verbatim\" is not token count and not semantic redundancy. It is **whether the turn is the sole surviving witness to a premise that a not-yet-executed action depends on.** Operationally: - A turn may be lossily compacted if its content is *restated* by a later, higher-authority turn that is itself retain...",
    "operational_effect": "When the invariant is enforced, the observable effect is that **post-compaction retrieval and pre-compaction reasoning agree on the same set of live premises** — the agent's behavior is continuous across the boundary, and a re-verification step returns the *correction* rather than the *original claim*. The cost is a modest retention floor: corrections and pr..."
  },
  "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": "e6af819966baf8d4b7319abc1dcfd485adccd96d9f2e4a1d7a025bc55e0e8f07",
    "verified_classes": [
      "ProvenanceCollapseError",
      "Observation",
      "PendingAction"
    ],
    "verified_functions": [
      "compact",
      "content_hash"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceCollapseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
