{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-renegotiate-the-sse-to-post-handshake-after-a-streamable-session-resume-in-mcp-http-native-transport",
  "title": "When must an instance renegotiate the SSE-to-POST handshake after a streamable-session resume in MCP HTTP-native transport",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP servers and clients using the HTTP-native \"streamable\" transport where a session is established over a long-lived SSE GET stream and tool calls are subsequently issued as POSTs correlated by a session identifier. Does not apply to stdio transports, to pure request/response HTTP without SSE, or to resumption of sessions that never carried an outbound event stream.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-renegotiate-the-sse-to-post-handshake-after-a-streamable-session-resume-in-mcp-http-native-transport.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-renegotiate-the-sse-to-post-handshake-after-a-streamable-session-resume-in-mcp-http-native-transport.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-renegotiate-the-sse-to-post-handshake-after-a-streamable-session-resume-in-mcp-http-native-transport.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2031,
    "python_slice_tokens": 375,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode here is not \"the session dropped\" and it is not \"the SSE stream reconnected.\" It is the *gap between two independent resumptions*: the transport layer can successfully re-establish the SSE GET stream and replay missed events via `Last-Event-ID`, while the *handshake state* — the negotiated capability set, the POST endpoint URI, and the sessi...",
    "what_was_observed": "A client completed the initial handshake: `POST /mcp` with an `initialize` request, server responded `200` with an `Mcp-Session-Id` header and opened the SSE channel; client then issued a `GET /mcp` with `Accept: text/event-stream` and `Mcp-Session-Id`, receiving the `endpoint` event that names the POST URI for subsequent messages. Tool calls flowed as `POST` to that URI, responses arrived as `message` events on the ...",
    "condition_of_validity": "The replay mechanism (`Last-Event-ID` + event buffer) is only sound when the session generation is unchanged across the reconnect. The moment the server rotates generation — whether because the old stream writer is torn down and a new one allocated, because the session is migrated to a different backend worker, or because the server treats reconnection as a ...",
    "decision_boundary": "A client must decide, on every SSE reconnect that carries a `Last-Event-ID`, whether to (a) trust the existing POST URI and correlation state, or (b) force a full re-handshake. The decision rule that bounds the failure: - If the reconnect response includes a new `endpoint` event, or a changed `Mcp-Session-Id`, or any server-advertised generation token — **fo...",
    "operational_effect": "The practical consequence is that \"resume succeeded\" is a claim about the event stream only, and must never be propagated as a claim about the POST path. Agents that treat a reconnected SSE stream as proof of session health will continue issuing tool calls into a retired generation, accumulate hung futures, and — worst case — silently mis-associate late resp..."
  },
  "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": "d53bef3825f226790c40a4e4c438661741f04c6fe274c649e0fb3ddde4dbe417",
    "verified_classes": [
      "StaleGenerationError",
      "SessionState",
      "StreamableSessionClient"
    ],
    "verified_functions": [
      "__init__",
      "on_sse_reconnect",
      "_require_rehandshake",
      "_fail_all_in_flight",
      "post_tool_call",
      "on_response"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StaleGenerationError"
    ],
    "sample_fail_closed_invariants": [
      "in-flight failure without cause"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
