{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-auto-compacts-across-a-tool-call-boundary-and-drops-the-pending-obligation-register",
  "title": "What happens when an instance auto-compacts across a tool-call boundary and drops the \"pending obligation\" register",
  "date_of_record": "2026 November 24",
  "scope": "Applies to long-running single-agent loops that persist conversation state and trigger automatic context compaction (summarization/eviction) when a hard token budget is approached, especially when compaction can fire between a tool invocation and its result ingestion. Does not apply to stateless one-shot inference or to systems where compaction is only permitted at explicit quiescent checkpoints.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-compacts-across-a-tool-call-boundary-and-drops-the-pending-obligation-register.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-compacts-across-a-tool-call-boundary-and-drops-the-pending-obligation-register.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-compacts-across-a-tool-call-boundary-and-drops-the-pending-obligation-register.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1864,
    "python_slice_tokens": 349,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost information.\" Summarizers always lose information; that is the point. The failure is that auto-compaction treats the conversation transcript as the *unit of state*, when the actual task-critical state is a set of **outstanding obligations** — unresolved tool calls, promises the agent made to itself (\"I still need to verif...",
    "what_was_observed": "A tool-using agent was executing a multi-step verification task: `read_config → mutate_field → re-read_config → assert_unchanged_elsewhere`. Between the `mutate_field` call and the `re-read_config` call, the accumulated context crossed the soft threshold (e.g., 78% of a 200k budget). The auto-compactor fired on the *pre-result* transcript. The trace: 1. Assistant emits `mutate_field(id=42, value=\"v2\")`. The call is d...",
    "condition_of_validity": "This analysis holds only under the conjunction: - Compaction is **triggered by a token counter that can fire mid-turn**, i.e., asynchronously with respect to tool-call/result pairing. If compaction only runs at turn boundaries after all in-flight results are ingested, the orphaned-result pathology cannot occur (though the obligation-loss pathology still can,...",
    "decision_boundary": "The architectural fork is whether compaction is **transcript-driven** or **obligation-driven**. - *Transcript-driven* (the failing default): decide what to keep by recency, salience, or summarizer judgment over message text. Cheap, simple, and structurally incapable of guaranteeing obligation preservation because obligations are not first-class. - *Obligatio...",
    "operational_effect": "Enforcing the invariant changes three things: 1. **Compaction becomes deferrable.** When the budget is hit with a live unresolved call, the system either blocks compaction until the result is ingested (bounded wait) or compacts the narrative but pins the call/result pair as an atomic unit. Orphaned results become structurally impossible. 2. **False completio..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "5733c57889440c36c52fd0dbb879fc352b40d86e51449439d0ce00807e1785f3",
    "verified_classes": [
      "ObligationInvariantError"
    ],
    "verified_functions": [
      "compact",
      "mark_complete",
      "_summarizable",
      "_result_has_pinned_call"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ObligationInvariantError"
    ],
    "sample_fail_closed_invariants": [
      "compaction would orphan a tool result from its call; defer until the call/result pair is atomic or pinned"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
