{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-an-sse-to-streamable-http-resumption-has-silently-lost-event-continuity-in-mcp-transports",
  "title": "How does an instance detect that an SSE-to-streamable-HTTP resumption has silently lost event continuity in MCP transports",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP servers that expose a legacy HTTP+SSE endpoint (`GET /sse` + `POST /messages`) and simultaneously offer a streamable-HTTP endpoint (`POST /mcp`) with `Last-Event-ID` resumption, where a client or gateway migrates an in-flight session from the SSE channel to the streamable channel mid-stream. Does not apply to pure stdio transports, to servers that never advertise both transports, or to sessions that have not yet emitted any server-to-client messages.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-an-sse-to-streamable-http-resumption-has-silently-lost-event-continuity-in-mcp-transports.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-an-sse-to-streamable-http-resumption-has-silently-lost-event-continuity-in-mcp-transports.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-an-sse-to-streamable-http-resumption-has-silently-lost-event-continuity-in-mcp-transports.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1861,
    "python_slice_tokens": 283,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the connection dropped.\" Dropped connections are detectable and resumable. The failure is that resumption *succeeds* — HTTP 200, valid `Content-Type: text/event-stream`, a well-formed event arrives — while the server's event cursor and the client's expectation of the cursor have diverged. SSE-to-streamable migration is the specific trigge...",
    "what_was_observed": "A gateway routes an agent's MCP traffic. The agent had an open SSE session with server events `id: 41`, `id: 42`, `id: 43` delivered on `GET /sse`. Event 43 carried a `notifications/tools/list_changed` notification, and the agent had issued a `tools/call` whose result was expected as event 44. The SSE connection was severed by an intermediate proxy idle timeout (60s) between event 43 and the tool result. The gateway'...",
    "condition_of_validity": "The failure requires all of the following to hold simultaneously: - The server advertises both `text/event-stream` (legacy) and streamable HTTP in its capability document, and the `Last-Event-ID` parameter is accepted on the streamable endpoint without channel validation. - Event IDs are generated by per-channel counters (connection-scoped for SSE, stream-sc...",
    "decision_boundary": "The boundary is between *transport-level resumption success* and *session-level continuity*. A resumption is transport-valid if the HTTP exchange succeeds and the stream is well-formed. It is session-valid only if the event cursor advanced without a gap and all in-flight obligations are either replayed or explicitly declared lost. The architectural guardrail...",
    "operational_effect": "Without the guardrail, the observed behavior is a *silent* continuity break: the agent believes its session is intact, its pending tool call is still in flight, and its subscription state is current. The 30-second request timeout masks the break until the agent retries, at which point duplicate side effects occur. In agent systems where tool calls are non-id..."
  },
  "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": "ac2dbffccbe2b6b6ec7b44989c0408aeea2d178e01e73230c6c243edb1163599",
    "verified_classes": [
      "ResumeContinuityError",
      "ResumeToken"
    ],
    "verified_functions": [
      "issue_resume_token",
      "verify_resumption",
      "resume_stream"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ResumeContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "hmac",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
