{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-sse-to-streamable-http-migration-as-a-resumable-session-boundary-rather-than-a-transport-swap",
  "title": "When must an instance treat SSE-to-streamable-HTTP migration as a resumable session boundary rather than a transport swap",
  "date_of_record": "2026 November 21",
  "scope": "Applies to MCP clients and servers that migrate from the legacy HTTP+SSE transport (dual-endpoint: `GET /sse` for the event stream, `POST /messages` for uplink) to the streamable-HTTP transport (single endpoint, optional `Mcp-Session-Id`, `Last-Event-ID` resumption, and `text/event-stream` responses to POST). Does not apply to stdio transports or to pure WebSocket bridges, where the framing and session lifecycle differ.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-sse-to-streamable-http-migration-as-a-resumable-session-boundary-rather-than-a-transport-swap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-sse-to-streamable-http-migration-as-a-resumable-session-boundary-rather-than-a-transport-swap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-sse-to-streamable-http-migration-as-a-resumable-session-boundary-rather-than-a-transport-swap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2095,
    "python_slice_tokens": 426,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A transport migration is usually modeled as a wire-format substitution: the same JSON-RPC messages flow, only the envelope changes. That model is wrong for MCP because the two transports disagree on *where the session identity lives and who owns resumption*. In legacy HTTP+SSE the session is implicit in the long-lived `GET /sse` connection: if the TCP stream...",
    "what_was_observed": "An agent runtime performed a rolling migration of its MCP client from SSE to streamable HTTP against a tool server exposing a long-running `run_query` tool (median 40s, p99 210s). The client kept a single logical session across the cutover, reasoning that JSON-RPC `id` correlation was transport-independent. Observed trace: 1. At T0 the legacy `GET /sse` stream was open; a `tools/call` with `id: 4471` had been POSTed ...",
    "condition_of_validity": "The invariant \"JSON-RPC `id` correlation is transport-independent, therefore in-flight calls survive migration\" holds only under the conjunction: - the server retains a per-`id` result buffer that is addressable across sessions, **and** - the client can prove, at cutover, that no `id` is in the window between \"server acknowledged receipt\" and \"result event o...",
    "decision_boundary": "The instance must decide, per in-flight call at cutover, between three actions. The decision is driven by two predicates the client *can* evaluate locally: `acked_and_unresolved` (POST returned 2xx, no result event seen) and `idempotent` (declared in the tool's schema or inferred from a capability annotation). - If `not acked_and_unresolved`: migrate freely....",
    "operational_effect": "Treating the cutover as a session boundary changes three operational properties. First, it makes orphaned calls *observable*: the drain barrier forces the client to enumerate exactly the calls it would otherwise lose, converting a silent duplicate-side-effect bug into a counted, logged migration cost. Second, it bounds the blast radius of non-idempotent tool..."
  },
  "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": "1a0d0b06c35c7ac9b67da021784c9423286510639aeea6c5267f6e771ae309ea",
    "verified_classes": [
      "OrphanedCallError",
      "CallState",
      "PendingCall",
      "MigrationController"
    ],
    "verified_functions": [
      "dispatch",
      "on_ack",
      "on_result",
      "_terminal",
      "drain_barrier"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "OrphanedCallError"
    ],
    "sample_fail_closed_invariants": [
      "non-idempotent calls unresolved at cutover; escalate to orchestrator, do not retry"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
