{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-stream-last-event-id-resumption-as-invalid-rather-than-replayable-and-how-does-sse-multiplexing-across-co",
  "title": "In what scenarios must an instance treat MCP stream `Last-Event-ID` resumption as invalid rather than replayable, and how does SSE multiplexing across concurrent tool calls break the naive resume invariant",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP servers and clients using the HTTP-native transport (Streamable HTTP) where a single SSE stream multiplexes events for multiple concurrent in-flight requests identified by per-request event IDs. Does not apply to stdio transport, nor to single-request-per-connection SSE designs where stream identity and request identity are 1:1.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-stream-last-event-id-resumption-as-invalid-rather-than-replayable-and-how-does-sse-multiplexing-across-co.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-stream-last-event-id-resumption-as-invalid-rather-than-replayable-and-how-does-sse-multiplexing-across-co.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-stream-last-event-id-resumption-as-invalid-rather-than-replayable-and-how-does-sse-multiplexing-across-co.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2490,
    "python_slice_tokens": 556,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP Streamable HTTP transport permits a client to reconnect to an interrupted SSE stream and request resumption by sending `Last-Event-ID`. The *naive* invariant most implementations assume is: *the server can replay every event with an ID numerically or lexically greater than `Last-Event-ID`, and the client will reconstruct the missing suffix of the ses...",
    "what_was_observed": "A client agent dispatched three concurrent `tools/call` requests over one MCP session: `A` (long-running, ~40s), `B` (fast, ~200ms), `C` (medium, ~3s). The server multiplexed all three onto a single SSE response stream with monotonically increasing event IDs: The client's HTTP connection dropped at event 102 (a mid-stream TCP reset during A's progress notification). The client reconnected with `Last-Event-ID: 102`. T...",
    "condition_of_validity": "The naive resume invariant holds only under a conjunction of conditions, all of which must be true simultaneously: 1. **No multiplexing across the resume window.** Either the stream carries exactly one logical request, or the client resumes with a per-request watermark rather than a stream-global one. The MCP spec's `Last-Event-ID` is stream-global; it does ...",
    "decision_boundary": "The boundary is crossed at the moment the client's resume handler attempts to infer **request liveness** from **stream position**. Concretely, it is crossed when the handler does any of the following: - Treats \"no events for request R in the replayed suffix\" as \"R is still running\" — rather than \"R's fate is unknown; query the server.\" - Reconstructs its pen...",
    "operational_effect": "The downstream effect is **duplicate side effects from resurrected-completed requests**, plus **hung agents waiting on terminal frames that were delivered below the watermark**. Both are silent: the transport reports success, the SSE stream is well-formed, and no error is raised at the layer that would normally detect a problem. The agent's execution loop se..."
  },
  "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": "999b9a7ba79657c920e52ddf2a4482dc5a62fd5f50a6a8049c9a846c99e9216b",
    "verified_classes": [
      "ResumeInvariantViolation",
      "RequestState",
      "SessionResumeState"
    ],
    "verified_functions": [
      "reconcile_resume",
      "safe_resume",
      "pending"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumeInvariantViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
