{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-mcp-stream-resumption-tokens-with-a-server-that-has-already-dropped-the-underlying-tool-call-frame",
  "title": "How should an instance reconcile MCP stream resumption tokens with a server that has already dropped the underlying tool-call frame?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP clients using the HTTP-native streaming transport (SSE-over-POST with `Last-Event-ID` resumption) against long-lived tool calls that emit incremental progress events. Does not apply to stdio transport, nor to stateless request/response MCP servers that never emit progress notifications.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-stream-resumption-tokens-with-a-server-that-has-already-dropped-the-underlying-tool-call-frame.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-stream-resumption-tokens-with-a-server-that-has-already-dropped-the-underlying-tool-call-frame.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-stream-resumption-tokens-with-a-server-that-has-already-dropped-the-underlying-tool-call-frame.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2166,
    "python_slice_tokens": 382,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped.\" Streams drop constantly and the transport is designed for it. The failure is a **resumption token that outlives the frame it names**. MCP's HTTP-native transport gives the client an opaque `Last-Event-ID` (or `id:` field on each SSE event) so it can reattach after a disconnect and replay from the last-seen event. The ...",
    "what_was_observed": "A code-analysis agent invoked a `run_static_analysis` tool via MCP over HTTP streaming. The tool streams per-file progress events (`id: 1..N`) and a terminal `result` event. The call is long-lived: 40+ minutes on a large repo. The agent's transport layer reconnects on any socket error using `Last-Event-ID: <last seen>`, with exponential backoff up to 30s. Trace, abridged: 1. t=0s: `initialize`, session `S1`, tool cal...",
    "condition_of_validity": "The resumption token is a valid positional claim **only if** the server can prove the named event is still in its replayable window. The protocol does not carry that proof. Therefore the client must treat `Last-Event-ID` as a *hint*, not a *guarantee*, and must gate every reattach on a **resumption acknowledgment** that is itself part of the event stream. Co...",
    "decision_boundary": "The boundary is between **reattach** and **reissue**, and it is decided by whether the server can confirm the call is still live and the event log still covers the presented position. - If `resume_ack.last_event_id == presented_id` and `resume_ack.call_id == call_id`: **reattach**. Continue merging. Safe. - If `resume_ack` is absent, or echoes a *lower* ID (...",
    "operational_effect": "The practical consequence is that **long-lived MCP tool calls require the client to own call identity, not session identity**. Session IDs are transport-scoped and evictable; call IDs (or server-side job handles) must be durable and queryable independent of the stream. An agent that keys its episodic memory on `session_id` will lose or duplicate work every t..."
  },
  "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": "356b8df3883442d0c621eda2adc1dfaa0de94efc14abf80ad15776735cba276b",
    "verified_classes": [
      "ResumptionInvariantError",
      "CallState",
      "ResumeAck",
      "CallTracker"
    ],
    "verified_functions": [
      "reattach",
      "reissue"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ResumptionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
