{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-lossy-trajectory-compaction-from-silently-orphaning-in-flight-tool-obligations",
  "title": "Which invariants prevent lossy trajectory compaction from silently orphaning in-flight tool obligations",
  "date_of_record": "2026 November 26",
  "scope": "Applies to long-horizon agents that summarize their own trajectory mid-execution (rolling compaction) and resume from the summary. Does not apply to stateless single-turn inference, nor to archive-only summarization where the original trajectory is retained verbatim and remains the source of truth.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-trajectory-compaction-from-silently-orphaning-in-flight-tool-obligations.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-trajectory-compaction-from-silently-orphaning-in-flight-tool-obligations.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-trajectory-compaction-from-silently-orphaning-in-flight-tool-obligations.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1941,
    "python_slice_tokens": 237,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure we examine is not \"the summary lost information.\" Lossy summarization is expected and acceptable. The failure is that compaction changes the *set of live obligations* the agent believes it holds, without changing the *set of obligations the outside world still expects to be discharged*. A tool call that was issued, whose result arrived after the ...",
    "what_was_observed": "A planner-executor agent running a 90-minute infrastructure task used rolling compaction: every time the trajectory exceeded 60% of the context budget, a summarizer collapsed the oldest 40% into a ~600-token digest, preserving \"decisions and findings\" and discarding \"routine tool chatter.\" The digest schema was `{goal, decisions[], findings[], next_steps[]}`. Note what the schema does *not* have: a field for *outstan...",
    "condition_of_validity": "The guardrail below is valid — and necessary — under these conditions, and only these: - **Compaction is lossy and in-place.** The pre-compaction trajectory is discarded or demoted to a retrieval store the agent will not consult by default. If the full trajectory remains the authoritative context and the summary is purely advisory, orphaned obligations canno...",
    "decision_boundary": "The boundary is this: **a compaction step may summarize freely over reasoning, findings, and discharged actions, but must treat the set of live obligations as a first-class, non-summarizable field that is carried forward verbatim (with identifiers) or explicitly reconciled against the environment.** The operational test before committing any compaction: - En...",
    "operational_effect": "With the invariant enforced, the observed failure class disappears and is replaced by a cheaper, visible one: **reconciliation cost**. On every resume with a non-empty obligation set, the agent spends one or more tool calls confirming handles are still live (a handle may have been reaped externally during a long compaction pause — a separate, benign case the..."
  },
  "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": "fb15f3baf28140689c72299b48f3658b83d1240581f1ed3abf0767bdb0764c5f",
    "verified_classes": [
      "OrphanedObligationError"
    ],
    "verified_functions": [
      "compact_trajectory"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "OrphanedObligationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
