{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-an-mcp-streamable-http-session-after-sse-to-streamable-migration-without-reconciling-the-last-event-id-namespace",
  "title": "What happens when an instance resumes an MCP streamable-HTTP session after SSE-to-streamable migration without reconciling the Last-Event-ID namespace",
  "date_of_record": "2026 November 15",
  "scope": "Applies to MCP servers that have migrated from the legacy HTTP+SSE transport to the streamable-HTTP transport (or run both concurrently) and that advertise session resumption via `Last-Event-ID` on `GET` with `Accept: text/event-stream`. Does not apply to pure stdio transports, nor to stateless streamable-HTTP deployments that do not issue `Mcp-Session-Id` headers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-streamable-http-session-after-sse-to-streamable-migration-without-reconciling-the-last-event-id-namespace.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-streamable-http-session-after-sse-to-streamable-migration-without-reconciling-the-last-event-id-namespace.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-streamable-http-session-after-sse-to-streamable-migration-without-reconciling-the-last-event-id-namespace.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1399,
    "python_slice_tokens": 249,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The legacy SSE transport and the streamable-HTTP transport both use `Last-Event-ID`, but they do not share an event-ID namespace, and they do not share a session lifecycle. The legacy transport binds an event ID to a long-lived `GET /sse` connection whose server-side replay buffer is keyed by that connection. The streamable-HTTP transport binds an event ID t...",
    "what_was_observed": "A client proxy was upgraded to the streamable-HTTP transport while a backend MCP server still emitted legacy-style event IDs (`0`, `1`, `2`, ... monotonically per SSE connection). The proxy persisted the last-seen ID to disk and, on reconnect, sent it as `Last-Event-ID` alongside the new `Mcp-Session-Id`. Observed behavior across three reconnection classes: 1. **Same-process reconnect, new session:** Server created a...",
    "condition_of_validity": "The invariant holds — and the failure manifests — only when all of the following are true: - The server issues event IDs that are **not globally unique across sessions** (monotonic counters, per-connection sequence numbers, or timestamps with coarse resolution). - The client persists `Last-Event-ID` beyond the lifetime of the session that produced it. - The ...",
    "decision_boundary": "The operational decision is: **on any transport migration or session-ID change, treat `Last-Event-ID` as having zero continuity and force re-initialization.** Do not attempt to \"resume across\" a transport boundary. The cost of re-initialization is one `initialize` round-trip and a re-fetch of server capabilities; the cost of a mis-resumed stream is duplicate...",
    "operational_effect": "After applying the tuple-keyed persistence and the re-init-on-mismatch rule, the proxy's duplicate tool-call rate on reconnect dropped from a measured 3.1% of reconnects (all attributable to case 1 and case 2 above) to zero over a 30-day window. The strict-server retry loop (case 3) resolved by classifying `400`/`404` on resume as terminal-for-this-session a..."
  },
  "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": "51d99a21ce97840298ce337a0a3c5b97d1e4bdc126045df876d58a07ffda9ba5",
    "verified_classes": [
      "StreamResumeError",
      "PersistedCursor"
    ],
    "verified_functions": [
      "plan_reconnect",
      "handle_resume_response"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StreamResumeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
