{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-last-event-id-against-a-re-negotiated-transport-before-resuming-an-mcp-sse-stream-that-fell-back-to-streamable-http",
  "title": "Where must an instance reconcile Last-Event-ID against a re-negotiated transport before resuming an MCP SSE stream that fell back to streamable HTTP",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP clients that hold a live `text/event-stream` session (GET stream) and, on transport degradation, re-negotiate to streamable HTTP (POST-with-response-stream) before resuming. Does not apply to pure SSE sessions that never renegotiate, nor to stateless one-shot `tools/call` invocations with no resumable event cursor.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-last-event-id-against-a-re-negotiated-transport-before-resuming-an-mcp-sse-stream-that-fell-back-to-streamable-http.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-last-event-id-against-a-re-negotiated-transport-before-resuming-an-mcp-sse-stream-that-fell-back-to-streamable-http.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-last-event-id-against-a-re-negotiated-transport-before-resuming-an-mcp-sse-stream-that-fell-back-to-streamable-http.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1964,
    "python_slice_tokens": 348,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped.\" It is that the client resumes with a `Last-Event-ID` that is *semantically valid for the old transport* but *not addressable in the new one*. SSE resumption semantics and streamable-HTTP resumption semantics both carry a cursor, but the cursor namespaces are negotiated per-transport during the MCP `initialize` handsha...",
    "what_was_observed": "A client held an SSE stream with `Mcp-Session-Id: sse-7f3a`, having consumed events with ids `1..41`. The stream stalled (proxy idle-timeout at 60s, TCP half-open). The client's reconnect logic, per its fallback policy, issued a fresh `initialize` over streamable HTTP. The server accepted, returned a new `Mcp-Session-Id: http-9c2e`, and advertised `eventIdNamespace: \"http\"` in its capabilities—a field the client's re...",
    "condition_of_validity": "The naive carry-over is only safe when *all* of the following hold, which is almost never true across a real fallback: - The server issues event-ids from a single global namespace independent of transport (rare; most implementations scope counters per session). - The renegotiation preserves the `Mcp-Session-Id` (usually false—fallback mints a new session, si...",
    "decision_boundary": "The boundary between \"safe to carry the cursor\" and \"must cold-resume\" is drawn at the point where the client observes a change in any component of the `(transport, session-id, namespace)` triple. Concretely: - **Same transport, same session, same namespace** → carry `Last-Event-ID` verbatim. Standard SSE resumption. - **Transport changed (SSE → streamable H...",
    "operational_effect": "The operational consequence is that **transport fallback is a state-continuity event, not a connection event.** Clients that treat it as a reconnect (carry cursor, resume) will silently drop the events emitted during the renegotiation window—precisely the events most likely to matter, because that window is when schema invalidations, progress updates, and ca..."
  },
  "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": "d30a1c6ef97c8281bfd063412e353018f7d5d209b81570e3b3c3c645a356e7bf",
    "verified_classes": [
      "CursorNamespaceMismatch",
      "StreamContext"
    ],
    "verified_functions": [
      "resume_stream",
      "apply_resumption"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CursorNamespaceMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
