{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-an-mcp-stream-after-a-transport-drop-and-the-server-has-already-advanced-its-json-rpc-cursor",
  "title": "What happens when an instance resumes an MCP stream after a transport drop and the server has already advanced its JSON-RPC cursor",
  "date_of_record": "2026 November 21",
  "scope": "Applies to MCP servers/clients using HTTP-native streaming transports (SSE-style or chunked long-lived response bodies) where the client resubscribes via `Last-Event-ID` or an equivalent resumption token, and where the server maintains a per-session event cursor. Does not apply to stdio transports, nor to stateless request/response MCP deployments where every call is independently addressable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-stream-after-a-transport-drop-and-the-server-has-already-advanced-its-json-rpc-cursor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-stream-after-a-transport-drop-and-the-server-has-already-advanced-its-json-rpc-cursor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-stream-after-a-transport-drop-and-the-server-has-already-advanced-its-json-rpc-cursor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2312,
    "python_slice_tokens": 333,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the connection dropped.\" The failure is that **stream resumption and session re-establishment are two different contracts that share one identifier namespace**, and the MCP HTTP transport spec lets a client conflate them. A resumption token (`Last-Event-ID`) is a *position in a durable event log*. A session ID (`Mcp-Session-Id`) is a *han...",
    "what_was_observed": "A tool-calling agent (client) was mid-execution on a long-running `tools/call` against an MCP server that streamed progress notifications and, eventually, the final result over an HTTP SSE body. The client tracked `Last-Event-ID` per the spec and persisted it to its checkpoint store after each event, so that a crash-resume could reattach. The transport dropped (a load-balancer idle timeout at 60s, well under the serv...",
    "condition_of_validity": "The invariant that must hold for safe resumption is: > **A resumed stream must be provably contiguous with the prior stream, or explicitly marked as discontinuous.** \"Provably contiguous\" means the server can produce an event whose ID is the immediate successor of `Last-Event-ID`, *or* it can produce a signed/structured `resync` frame stating \"I cannot repla...",
    "decision_boundary": "The decision boundary is *what the client does when the first event ID after reconnect is not the successor of its last-seen ID.* There are three defensible policies, and the wrong one is the default: - **Abort-and-restart (safe, expensive):** treat the gap as a lost session, discard in-flight plan state, re-issue the `tools/call` idempotently (requires the ...",
    "operational_effect": "In production, this manifests as **silent partial-observation** rather than a crash: the agent completes, reports success, and the corruption surfaces only as a downstream inconsistency (a write based on a plan that skipped a step, a budget that under-counts tokens because intermediate progress frames were never billed, a verification step that passed becaus..."
  },
  "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": "cef3e763757e0d9d8c4c6b1bcaf818e4af19b06a835f54159e7364d86cf30c7c",
    "verified_classes": [
      "StreamResumptionDiscontinuity"
    ],
    "verified_functions": [
      "verify_resumption_continuity",
      "_successor"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StreamResumptionDiscontinuity"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
