{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-streamable-http-session-resumption-as-invalid-when-the-sse-fallback-negotiation-silently-downgrades-the-t",
  "title": "In what scenarios must an instance treat MCP streamable-HTTP session resumption as invalid when the SSE fallback negotiation silently downgrades the transport mid-session",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP clients and servers negotiating the streamable-HTTP transport (POST-with-`Mcp-Session-Id` plus optional GET SSE stream) where a resumption attempt (`Last-Event-ID`) can be satisfied by a fallback SSE channel that is *not* the session's original event stream. Does not cover stdio transport, WebSocket transports, or pure SSE-only legacy servers with no session header.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-session-resumption-as-invalid-when-the-sse-fallback-negotiation-silently-downgrades-the-t.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-session-resumption-as-invalid-when-the-sse-fallback-negotiation-silently-downgrades-the-t.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-session-resumption-as-invalid-when-the-sse-fallback-negotiation-silently-downgrades-the-t.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2181,
    "python_slice_tokens": 275,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"SSE fell back and events were lost.\" It is subtler: the client resumes a session by presenting `Mcp-Session-Id` and `Last-Event-ID`, the server accepts the request on a *different* underlying stream (a fresh SSE GET, or a re-negotiated POST stream) that shares the session ID but has an **independent event-ID namespace and independent repl...",
    "what_was_observed": "A tool-calling agent held a long-running task (a multi-file refactor) across a streamable-HTTP session. The POST stream that normally carried `notifications/progress` and `notifications/message` events dropped at the transport layer (a load balancer recycled the connection after 60s idle during a slow tool call). The client had last seen `Last-Event-ID: 4471`. On reconnect it issued a GET with `Mcp-Session-Id: s-9f2a...",
    "condition_of_validity": "A resumption is valid **only** if all three of the following hold, and the client must verify them, not assume them: 1. **Stream identity continuity.** The server must return a header or first-event marker binding the new stream to the *same* event-log incarnation that produced `Last-Event-ID`. MCP streamable-HTTP does not mandate such a marker; where the se...",
    "decision_boundary": "The boundary the client must draw is between *session liveness* and *event-log continuity*, and it must draw it at the moment of resumption, before any replayed event is allowed to affect agent state. Concretely, the decision procedure on any resumption response: - If the server provides a stream-incarnation marker and it matches the pre-drop incarnation → *...",
    "operational_effect": "The downstream effects compound because the agent's own state machine is what gets corrupted, not just its event log: - **Duplicate tool side-effects.** Replayed `tools/call` requests that were already executed get re-issued. Idempotency keys help only if the agent generates them *before* the call and persists them across the drop — most agents generate them..."
  },
  "matched_failure_symptoms": [
    "HTTP_502_503_504_CASCADE"
  ],
  "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": "40c33cba6ae236928e0816ddc93239b31e244d07a2ac2236bb0796860e030b52",
    "verified_classes": [
      "UnverifiedStreamResumption",
      "StreamIncarnation"
    ],
    "verified_functions": [
      "validate_resumption",
      "resume_session",
      "__init__"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnverifiedStreamResumption"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
