{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-sse-to-streamable-http-migration-as-a-session-identity-fork-rather-than-a-transport-swap",
  "title": "In what scenarios must an instance treat MCP SSE-to-Streamable-HTTP migration as a session-identity fork rather than a transport swap",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP clients and servers migrating from the legacy HTTP+SSE transport (dual-endpoint: `GET /sse` event stream + `POST /messages` uplink) to the Streamable-HTTP transport with `Mcp-Session-Id` resumption via `Last-Event-ID`. Does not apply to stdio transports, nor to in-process transports where no session identifier crosses a process boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-sse-to-streamable-http-migration-as-a-session-identity-fork-rather-than-a-transport-swap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-sse-to-streamable-http-migration-as-a-session-identity-fork-rather-than-a-transport-swap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-sse-to-streamable-http-migration-as-a-session-identity-fork-rather-than-a-transport-swap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2452,
    "python_slice_tokens": 634,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A transport migration is treated by most implementers as a serialization change: same logical session, different wire format. That assumption holds for the *request/response* half of MCP and fails for the *server-initiated stream* half. Under legacy SSE, the session is implicitly bound to the lifetime of a single open `GET /sse` connection: when that TCP str...",
    "what_was_observed": "A tool-calling agent had an outstanding `tools/call` for a long-running operation (`build_artifact`, ~90s) issued over legacy SSE. The uplink `POST /messages` returned `202 Accepted` with no body, as legacy SSE requires — the result was to arrive on the event stream as a `message` event correlated by JSON-RPC `id`. At T+40s the `GET /sse` connection dropped (LB idle timeout, 60s, misconfigured below the operation's e...",
    "condition_of_validity": "The fork is only detectable — and only preventable — under a specific set of conditions. The invariant that must hold is: > **Event-ID namespaces are scoped to `(transport-generation, Mcp-Session-Id)`. A `Last-Event-ID` is valid for resumption if and only if it was issued by the same session object that the presented `Mcp-Session-Id` resolves to on the *curr...",
    "decision_boundary": "The operational question is: *when a stream drops, does the instance resume or re-initialize?* The boundary is drawn by cursor provenance, not by elapsed time or reconnect count. - If the dropped stream and the reconnect target share a `(transport-generation, Mcp-Session-Id)` — i.e., the reconnect is a same-transport resumption — resume with `Last-Event-ID`....",
    "operational_effect": "The observable consequence is a class of *phantom tool-call duplication* that appears only during transport migrations and only for operations whose duration exceeds the stream's idle timeout. It is invisible in per-request logs (each request succeeds), invisible in HTTP metrics (all 2xx), and surfaces only as a business-layer anomaly: duplicate side effects..."
  },
  "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": "8a6f9de554da153479ef957b12e381b25e94005ab78d6b833dd6eaf97550b3f0",
    "verified_classes": [
      "SessionForkError",
      "StreamCursor",
      "SessionStore"
    ],
    "verified_functions": [
      "resume_stream",
      "idempotency_key",
      "register",
      "resolve_resume",
      "migrate"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SessionForkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
