{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-of-the-mcp-streamable-http-transport-silently-lose-events-across-a-session-resumption-when-the-sse-upgrade-is-negotiated-on-a-pos",
  "title": "Why does an instance of the MCP streamable HTTP transport silently lose events across a session resumption when the SSE upgrade is negotiated on a POST that later returns 202 Accepted",
  "date_of_record": "2026 November 17",
  "scope": "Applies to MCP servers implementing the HTTP-native streamable transport (single endpoint, `POST` for client→server messages, optional `GET` for server→client SSE stream, `Last-Event-ID` resumption) where the server may return `202 Accepted` on a `POST` that has no immediately available response body. Does not apply to pure SSE transports where the stream is established once and never re-negotiated, nor to servers that always respond synchronously with `200` and an inline `text/event-stream` body.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-of-the-mcp-streamable-http-transport-silently-lose-events-across-a-session-resumption-when-the-sse-upgrade-is-negotiated-on-a-pos.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-the-mcp-streamable-http-transport-silently-lose-events-across-a-session-resumption-when-the-sse-upgrade-is-negotiated-on-a-pos.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-the-mcp-streamable-http-transport-silently-lose-events-across-a-session-resumption-when-the-sse-upgrade-is-negotiated-on-a-pos.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2041,
    "python_slice_tokens": 403,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The streamable transport conflates two logically distinct things onto one HTTP exchange: *acknowledgement of a client message* and *establishment of the server→client event stream*. A `POST` carrying a JSON-RPC request may legitimately return either `200` with an `text/event-stream` body (the response is streamed back on this exchange) or `202 Accepted` (the...",
    "what_was_observed": "A client held an established session (`Mcp-Session-Id: 7f3c…`) with a live `GET` SSE stream and a tracked `Last-Event-ID: 412`. The connection dropped (load-balancer idle timeout at 60s). On reconnect the client issued a `POST /mcp` with `Accept: application/json, text/event-stream`, `Last-Event-ID: 412`, and a `tools/call` request, expecting the server to either stream the response inline or acknowledge and resume. ...",
    "condition_of_validity": "This failure requires the conjunction of four conditions; remove any one and it does not occur: 1. The server advances its session-level replay watermark on *request receipt* rather than on *successful event-stream establishment* (i.e., watermark update is not gated on the response being `200` with a stream body). 2. The server is permitted to return `202` o...",
    "decision_boundary": "The correct rule is a single-sentence invariant to enforce on both sides: > **A `202 Accepted` response MUST NOT consume, advance, or otherwise mutate the session's event-replay cursor, and a client MUST treat `Last-Event-ID` on a `202`'d request as unconsumed and re-present the same cursor on the next stream-establishing exchange.** Operationally this means...",
    "operational_effect": "When this invariant is violated the failure is *silent and asymmetric*: the server's metrics show events delivered (they were written to the log and the watermark advanced), the client's metrics show a hung request, and neither side logs an error. The gap is only detectable by comparing the client's last-seen event ID against the server's watermark for that ..."
  },
  "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": "80c364d0625e150eff64d82f4b64360b34d69c419efce27cf4967c7d318eaad8",
    "verified_classes": [
      "ResumptionCursorConsumedError",
      "SessionReplayState"
    ],
    "verified_functions": [
      "decide_response",
      "advance_on_stream_commit"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionCursorConsumedError"
    ],
    "sample_fail_closed_invariants": [
      "assert decide_response(state, 412, will_stream_inline=False) == '202-accepted'",
      "assert state.last_delivered_event_id == 412"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
