{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-an-mcp-stream-after-sse-to-streamable-http-migration-and-the-event-id-namespace-silently-resets",
  "title": "What happens when an instance resumes an MCP stream after SSE-to-streamable-HTTP migration and the event-ID namespace silently resets",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients that persist a `Last-Event-ID` cursor for stream resumption and connect to a server that has migrated its transport from legacy HTTP+SSE (two-endpoint: `GET /sse` + `POST /messages`) to streamable HTTP (single-endpoint, per-request streams with `Mcp-Session-Id`). Does not apply to pure stdio transports or to servers that never emit resumable event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-stream-after-sse-to-streamable-http-migration-and-the-event-id-namespace-silently-resets.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-stream-after-sse-to-streamable-http-migration-and-the-event-id-namespace-silently-resets.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-stream-after-sse-to-streamable-http-migration-and-the-event-id-namespace-silently-resets.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1472,
    "python_slice_tokens": 252,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **session identity** and **event-cursor identity**. In the legacy SSE transport, resumption was scoped implicitly: the `GET /sse` connection carried a single monotonically increasing event stream, and `Last-Event-ID` was meaningful only within that one connection's lifetime. In streamable HTTP, the server may issue *mu...",
    "what_was_observed": "An agent holding a long tool-execution task (a multi-step file-tree scan issued as one `tools/call`) had persisted `Last-Event-ID: 41` from the legacy SSE stream. The server was upgraded mid-task to streamable HTTP. On reconnect the client sent `Last-Event-ID: 41` against `POST /mcp` with the same `Mcp-Session-Id`. The new server's per-request stream had only emitted 12 events, so event 41 did not exist. Two divergen...",
    "condition_of_validity": "The invariant that makes `Last-Event-ID` resumption sound is: **the tuple `(Mcp-Session-Id, stream-scope, event-id)` must be globally unique and stable for the duration of the session.** Legacy SSE satisfied this because stream-scope was the whole session. Streamable HTTP violates it whenever the server scopes event IDs per-request or per-process without enc...",
    "decision_boundary": "The boundary is: **resume vs. restart-from-scratch.** A client should resume only when it can establish cursor validity; otherwise it must fall back to a clean re-issue of the in-flight request. Concretely, the decision hinges on three checks the client must perform on the first event after reconnect: - **Monotonicity check:** the first received event ID mus...",
    "operational_effect": "The operational consequence is that **mid-task checkpoint/resume is only as durable as the cursor's namespace**. An agent that persists `Last-Event-ID` as a scalar resume token — the natural reading of the legacy spec — will, across a transport migration, either stall (waiting for events that will never arrive under the old numbering) or mis-attribute events..."
  },
  "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": "21537b677b74b1d1ca6efd35c47f0082a3fbe1436f43b76bd81bc0c162bff6d0",
    "verified_classes": [
      "CursorNamespaceError",
      "ResumeCursor"
    ],
    "verified_functions": [
      "validate_resume",
      "resume_or_restart"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CursorNamespaceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
