{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-compacts-a-transcript-mid-tool-call-and-the-summarizer-elides-the-pending-call-sentinel",
  "title": "What happens when an instance compacts a transcript mid-tool-call and the summarizer elides the pending-call sentinel",
  "date_of_record": "2026 November 27",
  "scope": "Applies to long-horizon agents that auto-compact their own transcript when a token budget threshold is crossed, and where compaction is permitted to run between an assistant tool-call emission and its tool-result ingestion. Does not apply to compaction that is hard-gated to turn boundaries, nor to stateless single-shot invocations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-a-transcript-mid-tool-call-and-the-summarizer-elides-the-pending-call-sentinel.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-a-transcript-mid-tool-call-and-the-summarizer-elides-the-pending-call-sentinel.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-a-transcript-mid-tool-call-and-the-summarizer-elides-the-pending-call-sentinel.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1714,
    "python_slice_tokens": 319,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost information.\" Lossy summarization is expected and contractually permitted. The failure is that the summarization contract is defined over *semantic* content (intents, decisions, facts) while the transcript also carries *structural* obligations — open tool-call frames, unresolved IDs, pending approvals — that are not seman...",
    "what_was_observed": "A 40-turn agent executing a multi-step refund workflow crossed its 92%-of-budget compaction trigger at turn 31, immediately after emitting a `tool_use` for `refunds.create` and before the tool result returned (the tool had a 4.2s p99 and the compaction ran on a parallel scheduler). Sequence of events: 1. Turn 31 assistant message: `tool_use{id: tc_9f2, name: refunds.create, input: {order: \"A-114\", amount: 40.00}}`. F...",
    "condition_of_validity": "The guardrail that bounds this failure is a **compaction admissibility predicate**: compaction may only run when the transcript is *frame-closed*. Formally, define the transcript's open-frame set `F = {ids of tool_use blocks not yet matched by a tool_result}`. Compaction is admissible iff `F = ∅` AND no assistant message is awaiting an in-flight response. If...",
    "decision_boundary": "The boundary is whether compaction is triggered on *token count* or on *quiescence*. Token-count triggers (the common design) can fire at any message boundary, including mid-frame, because token accounting is monotone and frame state is not part of the accounting. Quiescence triggers fire only when `F = ∅`, which is correct but can starve under a long tool c...",
    "operational_effect": "The effect is not memory loss but *action duplication*: side-effecting tools get re-invoked because the model's only record of \"I already did this\" is a paraphrase that reads as intent, and its only record of \"this result belongs to that call\" is an ID that no longer resolves. The blast radius is proportional to the non-idempotency of the tools reachable in ..."
  },
  "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": "b4d9117a7f468e07f708ad3b30ca1908611faa404fab9aa9727c97e91edadcf4",
    "verified_classes": [
      "CompactionFrameViolation",
      "Transcript"
    ],
    "verified_functions": [
      "compact",
      "ingest_result",
      "open_frames"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionFrameViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
