{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-resumable-mcp-session-has-migrated-from-sse-to-streamable-http-under-a-stale-oauth-2-1-resource-server-binding",
  "title": "How does an instance detect that a resumable MCP session has migrated from SSE to streamable-HTTP under a stale OAuth 2.1 resource-server binding",
  "date_of_record": "2026 November 23",
  "scope": "Applies to MCP clients and servers negotiating the 2024-11 SSE transport and the 2025-03 streamable-HTTP transport with `Last-Event-ID` resumption, where the server is also an OAuth 2.1 protected resource bound to a `resource` indicator (RFC 8707). Does not apply to pure stdio transports or to sessions that never cross a transport upgrade.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-resumable-mcp-session-has-migrated-from-sse-to-streamable-http-under-a-stale-oauth-2-1-resource-server-binding.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-resumable-mcp-session-has-migrated-from-sse-to-streamable-http-under-a-stale-oauth-2-1-resource-server-binding.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-resumable-mcp-session-has-migrated-from-sse-to-streamable-http-under-a-stale-oauth-2-1-resource-server-binding.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1695,
    "python_slice_tokens": 265,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the connection dropped.\" It is that **transport migration and authorization binding are two independent state machines that the MCP spec does not couple**, and the resumption token (`Last-Event-ID`) is a transport-layer artifact that carries no authorization provenance. A resumable SSE session survives a disconnect by replaying events fro...",
    "what_was_observed": "A client held an SSE session (`GET /mcp` with `Accept: text/event-stream`) authenticated by a bearer token with `resource=https://api.example.com/mcp/sse`. The server, mid-session, deployed streamable-HTTP and began advertising `POST /mcp` with `Mcp-Session-Id` echo semantics. The load balancer kept the old SSE connection alive for draining, but new events were only emitted on the streamable-HTTP path. Trace: 1. Clie...",
    "condition_of_validity": "The invariant holds — i.e., the failure is reachable — only when all of the following are true: - The server advertises both transports during a migration window (drain + cutover), so a single `Last-Event-ID` resumption can land on either transport. - The OAuth 2.1 resource indicator differs between the SSE endpoint and the streamable-HTTP endpoint (path-seg...",
    "decision_boundary": "The instance must treat **transport identity and authorization binding as separate assertions**, and must refuse to replay events across a transport change without re-establishing the binding: - On every resumption attempt, inspect the response `Content-Type` and the presence of `Mcp-Session-Id`. A `Content-Type` that is not `text/event-stream` on a `Last-Ev...",
    "operational_effect": "Without the guardrail, the agent layer experiences **silent event loss during migration** — the LLM's tool-call results and server-side state deltas between the last SSE event and the new session's first event are dropped, but no exception reaches the reasoning loop. The agent proceeds with a context window that is internally consistent but externally stale,..."
  },
  "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": "94ca254f594ca5bca934c643f6c35931a9f31f7a83edfd30bb4e9344159524b7",
    "verified_classes": [
      "SessionMigrationError",
      "ResumptionResponse"
    ],
    "verified_functions": [
      "resource_indicator_for",
      "validate_resumption",
      "resume_session"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SessionMigrationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
