{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-lossy-trajectory-compaction-from-silently-invalidating-agent-commitments",
  "title": "Which invariants prevent lossy trajectory compaction from silently invalidating agent commitments",
  "date_of_record": "2026 December 1",
  "scope": "Applies to long-horizon agents that persist state by summarizing their own trajectory (rolling window compaction, hierarchical memo trees, or LLM-generated checkpoints) and then resume from the summary. Does not apply to agents that retain full raw transcripts or that use append-only externalized memory with no destructive rewrite.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-trajectory-compaction-from-silently-invalidating-agent-commitments.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-trajectory-compaction-from-silently-invalidating-agent-commitments.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-trajectory-compaction-from-silently-invalidating-agent-commitments.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2160,
    "python_slice_tokens": 546,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost detail.\" Summaries always lose detail; that is their purpose. The failure is that the compaction operator is **not commitment-preserving**: it can drop or mutate the *binding* facts an agent has already acted on—irreversible side effects, accepted obligations, and negated constraints—while preserving the *narrative* of th...",
    "what_was_observed": "A 40-step tool-using agent was given a rolling compaction policy: when context exceeded 70% of window, summarize the oldest 60% of turns into a ≤300-token memo and continue. Three distinct failure traces recurred: **Trace 1 — Negation collapse.** At step 9 the agent recorded \"do NOT migrate the `billing_v1` schema; it is still live in prod.\" At step 22 the compaction memo rendered this as \"billing schema migration di...",
    "condition_of_validity": "The commitment-monotonicity invariant holds only when all four of the following are true at compaction time: 1. **Commitment tagging is complete.** Every executed irreversible side effect, every externally observable promise, and every active negation is tagged in the trajectory with a stable identifier and a type (`SIDE_EFFECT`, `OBLIGATION`, `PROHIBITION`)...",
    "decision_boundary": "The boundary is between **compaction that may proceed** and **compaction that must halt or escalate**: - **Proceed** when all tagged commitments are carried forward by reference and status is unchanged or monotonically advanced (OPEN→DISCHARGED, never DISCHARGED→OPEN). Lossy prose compression of non-commitment turns is always permitted. - **Halt and re-summa...",
    "operational_effect": "With the invariant enforced, three operational properties change: - **Resume becomes verifiable rather than trusted.** On cold start the agent loads the commitment ledger and asserts each entry's status before acting. A missing or contradictory entry raises before any tool call, converting a silent world-corrupting action into a loud, cheap failure. - **Comp..."
  },
  "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": "51d47e491d75943f587afccd92d050531691f6fe87859ba234a8fc5d1c6a2a11",
    "verified_classes": [
      "CommitmentKind",
      "CommitmentStatus",
      "Commitment",
      "Memo",
      "CompactionInvariantError"
    ],
    "verified_functions": [
      "_rank",
      "merge_memos",
      "verify_compaction",
      "safe_compact"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "CompactionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
