{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-of-the-mcp-http-native-transport-draw-the-boundary-between-streamable-sse-resumability-and-session-resumption-tokens",
  "title": "Where must an instance of the MCP HTTP-native transport draw the boundary between streamable SSE resumability and session resumption tokens?",
  "date_of_record": "2026 November 16",
  "scope": "Applies to MCP servers and clients using the HTTP-native transport with `text/event-stream` responses and `Mcp-Session-Id` / `Last-Event-ID` resumption semantics. Does not apply to stdio transports, nor to stateless HTTP servers that never emit SSE event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-of-the-mcp-http-native-transport-draw-the-boundary-between-streamable-sse-resumability-and-session-resumption-tokens.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-the-mcp-http-native-transport-draw-the-boundary-between-streamable-sse-resumability-and-session-resumption-tokens.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-the-mcp-http-native-transport-draw-the-boundary-between-streamable-sse-resumability-and-session-resumption-tokens.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1019,
    "python_slice_tokens": 176,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Two independent resumption mechanisms are conflated in practice: 1. **Stream resumption** — reconnecting a broken SSE response stream and replaying events after the last acknowledged `Last-Event-ID`. This is a property of a *single HTTP response*. 2. **Session resumption** — continuing a logical MCP session (capability negotiation, subscriptions, in-flight r...",
    "what_was_observed": "A deployed MCP server held per-session event logs keyed by `(session_id, event_id)`. On reconnect, the client sent `Mcp-Session-Id: S1` with `Last-Event-ID: 42`. The server's lookup was keyed only on `event_id` in a global monotonic counter. Because event IDs were globally unique, the lookup succeeded and replayed events 43..N — but those events belonged to session `S2`, which had been created after `S1` was torn dow...",
    "condition_of_validity": "Stream resumption is valid only when all of the following hold: - The `Last-Event-ID` is validated **within the namespace of the presented `Mcp-Session-Id`**, not globally. - The session's event log has not been evicted; eviction must convert a resume attempt into a hard failure, never a silent fall-through to another session's log. - Event IDs are monotonic...",
    "decision_boundary": "The boundary is the **session-scoped event log**. An instance must answer, per request: *does this `Last-Event-ID` exist in the log owned by this `Mcp-Session-Id`?* - **Yes** → stream resume within the session. - **No, but session exists** → stream gap; return `409`-style \"cannot resume stream,\" client must re-issue the request without `Last-Event-ID`. - **N...",
    "operational_effect": "Clients that trust `Last-Event-ID` alone will observe intermittent, non-deterministic tool-result mismatches under session churn — the classic signature being correct results delivered to the wrong outstanding request, with no transport error. The fix is structural: scope the event log by session, make eviction explicit, and never let a resume succeed across..."
  },
  "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": "fa7984976628a3da7b8a2694b213916951ccc37faaa47f94440e84a5446c664e",
    "verified_classes": [
      "SessionResumptionError",
      "SessionEventLog"
    ],
    "verified_functions": [
      "handle_resume",
      "__init__",
      "append",
      "resume_after"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SessionResumptionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
