{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-resumable-mcp-streamable-session-versus-a-poisoned-sse-to-streamable-upgrade",
  "title": "What structural signals indicate a resumable MCP streamable-session versus a poisoned SSE-to-streamable upgrade",
  "date_of_record": "2026 November 15",
  "scope": "Applies to MCP servers exposing the HTTP-native streamable transport with `Mcp-Session-Id` and `Last-Event-ID` resumption semantics, and to clients negotiating an upgrade from a legacy SSE endpoint to the streamable endpoint. Does not apply to stdio transports or to pure SSE transports without session identifiers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-resumable-mcp-streamable-session-versus-a-poisoned-sse-to-streamable-upgrade.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-resumable-mcp-streamable-session-versus-a-poisoned-sse-to-streamable-upgrade.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-resumable-mcp-streamable-session-versus-a-poisoned-sse-to-streamable-upgrade.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1663,
    "python_slice_tokens": 238,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters operationally is between a *resumable session* and a *resumable event stream*. A streamable session is identified by `Mcp-Session-Id` and is a server-side lifecycle object with an associated event log keyed by monotonically increasing event IDs. An SSE event stream is a transport-level connection that may be re-established indepe...",
    "what_was_observed": "During a migration of an MCP server from SSE-only to streamable HTTP, the following sequence was observed repeatedly across three client implementations: 1. Client opens `GET /mcp` with `Accept: text/event-stream` and a legacy session cookie. Server responds `200`, `Content-Type: text/event-stream`, and immediately emits `event: endpoint` with a legacy POST URL. The client interprets this as a successful upgrade beca...",
    "condition_of_validity": "Resumption via `Last-Event-ID` is only valid when all of the following hold: - The server's event log is scoped to the session ID presented in the same request, not to a global or per-connection log. - The `Last-Event-ID` value was emitted by the *same* session's stream, not by a prior session that happened to use overlapping IDs. - The server has not rotate...",
    "decision_boundary": "The operational decision rule: - If a GET returns `200` with `Content-Type: text/event-stream` and no `Mcp-Session-Id`, treat as legacy SSE. Do not attempt streamable POSTs against this connection. - If a GET returns `200` with `Mcp-Session-Id` and an `event: endpoint` frame in the first flush, treat as a poisoned upgrade. Abort the connection, discard any s...",
    "operational_effect": "The practical consequence is that clients must validate the *shape* of the upgrade response, not its status. A `200 OK` is necessary but not sufficient. The cost of missing this is silent data loss: tool-call results emitted between the upgrade attempt and the first successful streamable POST are dropped, and the client has no way to detect the loss because ..."
  },
  "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": "49cbc47cd29732da1ef3e16cf7d930661606c2c2b32e9d7a877eca69f7660374",
    "verified_classes": [
      "PoisonedUpgradeError",
      "SessionBindingError"
    ],
    "verified_functions": [
      "validate_upgrade_response",
      "validate_resumption"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "PoisonedUpgradeError",
      "SessionBindingError"
    ],
    "sample_fail_closed_invariants": [
      "no Mcp-Session-Id on streamable upgrade response; treat as legacy SSE, not streamable",
      "response carries both Mcp-Session-Id and legacy endpoint frame; handler identity is ambiguous",
      "session not recognized on resumption; re-initialize"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
