{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-renegotiate-the-sse-upgrade-when-a-resumable-mcp-stream-crosses-a-session-rebind-boundary",
  "title": "Where must an instance renegotiate the SSE upgrade when a resumable MCP stream crosses a session rebind boundary",
  "date_of_record": "2026 November 15",
  "scope": "Applies to MCP servers and clients using the HTTP-native streamable transport where a `GET` request with `Accept: text/event-stream` triggers a server-initiated SSE upgrade, and where `Last-Event-ID`-based resumption is offered across session rebinds. Does not apply to pure request/response JSON-RPC over HTTP without upgrade negotiation, nor to WebSocket transports where the upgrade is part of the handshake.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-renegotiate-the-sse-upgrade-when-a-resumable-mcp-stream-crosses-a-session-rebind-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-renegotiate-the-sse-upgrade-when-a-resumable-mcp-stream-crosses-a-session-rebind-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-renegotiate-the-sse-upgrade-when-a-resumable-mcp-stream-crosses-a-session-rebind-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1533,
    "python_slice_tokens": 218,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped\" and it is not \"resumption failed.\" Those are observable, loud symptoms. The non-obvious boundary is this: **the SSE upgrade is negotiated per HTTP connection, but the resumable event log is scoped per session.** When a client resumes with `Last-Event-ID` after the server has rebound the session to a new connection (or ...",
    "what_was_observed": "During a controlled fault injection on an MCP streamable transport server, the following sequence was reproduced deterministically: 1. Client issues `GET /mcp` with `Accept: text/event-stream`. Server responds `200`, upgrades, assigns session `S1`, emits events with monotonically increasing IDs on connection `C1`. 2. A load-balancer idle timeout kills `C1`. The server's session registry still maps `S1 -> upgraded=tru...",
    "condition_of_validity": "The correct behavior — that a resumed stream may continue without renegotiation — holds **only if** the resumption request is made on a connection that has already completed the SSE upgrade handshake, i.e., the server has committed `200` + `text/event-stream` headers on *that specific connection* before processing `Last-Event-ID`. This condition is satisfied...",
    "decision_boundary": "The server must choose, at the moment it receives a `GET` carrying both `Mcp-Session-Id` and `Last-Event-ID`: - **If the connection has not committed SSE headers:** treat the request as a *fresh upgrade negotiation*. Do not replay from the log until the `200 text/event-stream` response is committed. If the client did not send `Accept: text/event-stream`, rej...",
    "operational_effect": "When the boundary is respected, the operational effect is that reconnect latency increases by one round-trip (the renegotiation), and the server must buffer replay events until headers are committed. When the boundary is violated, the effect is not a visible error but a **monotonic divergence between the client's cursor and the server's compaction frontier**..."
  },
  "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": "907be064399c4de946a68a5591123c391ec7ff947f42c3fc10b004af4ce20088",
    "verified_classes": [
      "UncommittedResumptionError",
      "McpStreamSession"
    ],
    "verified_functions": [
      "__init__",
      "commit_sse_upgrade",
      "resume"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UncommittedResumptionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
