{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-compaction-from-silently-deleting-the-referent-of-a-live-obligation",
  "title": "Which invariants prevent compaction from silently deleting the referent of a live obligation",
  "date_of_record": "2026 November 22",
  "scope": "Applies to long-horizon agents that reclaim context via summarization/truncation mid-run, where the compacted context must remain a faithful substrate for later tool calls and commitments. Does not apply to stateless single-turn calls or to agents whose entire working set fits within one context window for the whole episode.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-compaction-from-silently-deleting-the-referent-of-a-live-obligation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-compaction-from-silently-deleting-the-referent-of-a-live-obligation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-compaction-from-silently-deleting-the-referent-of-a-live-obligation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1574,
    "python_slice_tokens": 240,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction is usually framed as a *compression* problem: minimize tokens while maximizing information retention. That framing is wrong for agents. The failure that matters is not loss of *information* but loss of *referential binding* — the tie between a token in context and the concrete object in the world (a file path, a transaction ID, an unacknowledged p...",
    "what_was_observed": "A support-operations agent ran a multi-hour remediation episode. At step ~140 it crossed the context threshold and triggered a summarization compaction. The pre-compaction state held an open obligation: *\"Do not close ticket until the customer confirms the 14:02 UTC deploy reached `svc-billing@prod-usw2`; deploy ID `dep-9f3a`.\"* The compactor, optimizing for salience, emitted: *\"Pending: confirm deploy rollout before...",
    "condition_of_validity": "The invariant holds — and compaction is safe — only when all three conditions are met at the moment of compaction: 1. **Referent grounding.** Every unresolved obligation is represented in a structured slot (target object ID, qualifier, precondition predicate, discharge condition), not in free prose. IDs are copied byte-for-byte, never paraphrased or re-deriv...",
    "decision_boundary": "The operating rule is a split between two context classes: - **Narrative context** (what happened, why, exploratory reasoning) — compact aggressively; loss here degrades quality gracefully. - **Obligation context** (open commitments, pending tool calls, unresolved referents, preconditions) — never summarize; carry verbatim as structured records, or explicitl...",
    "operational_effect": "With the invariant enforced, compaction becomes a two-channel operation: a lossy summarizer for narrative and a lossless structured carry for obligations, plus a post-compaction resolver that fails closed. The observable effects: - The `dep-9f3a` class of silent divergence disappears, because the referent is either present verbatim or the run halts with an e..."
  },
  "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": "f2245b80b249a0aa939aab15ae6d6402daafb9cd191a7fd3fc1cb8bd32adb230",
    "verified_classes": [
      "UnresolvedObligationError",
      "Obligation",
      "CompactedContext"
    ],
    "verified_functions": [
      "compact",
      "lossy_summarize",
      "is_live"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnresolvedObligationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
