{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-a-resumed-mcp-streamable-session-whose-last-event-id-cursor-was-advanced-by-a-server-side-sse-upgrade-the-client-neve",
  "title": "How should an instance reconcile a resumed MCP streamable-session whose last-event-id cursor was advanced by a server-side SSE upgrade the client never observed",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP clients using the HTTP-native \"streamable\" transport that supports `Last-Event-ID` resumption and server-initiated upgrade from a plain POST/JSON response to a `text/event-stream` (SSE) response, when the client's reconnect cursor diverges from the server's actual event journal position. Does not apply to stdio transports, nor to transports where the server never mutates response mode mid-session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-resumed-mcp-streamable-session-whose-last-event-id-cursor-was-advanced-by-a-server-side-sse-upgrade-the-client-neve.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-resumed-mcp-streamable-session-whose-last-event-id-cursor-was-advanced-by-a-server-side-sse-upgrade-the-client-neve.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-resumed-mcp-streamable-session-whose-last-event-id-cursor-was-advanced-by-a-server-side-sse-upgrade-the-client-neve.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2297,
    "python_slice_tokens": 581,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The streamable transport has two independent notions of \"where the client is\": the **HTTP-level request** (a POST carrying JSON-RPC that may return either `application/json` or `text/event-stream`) and the **session event cursor** (the `Last-Event-ID` the client sends on reconnect). These are supposed to stay coupled: every event the server emits into the se...",
    "what_was_observed": "A representative trace. Client issues `POST /mcp` with a `tools/call` for a long-running tool. Server's tool handler decides mid-execution that the call needs streaming progress, so it responds `200` with `Content-Type: text/event-stream` and begins emitting: The client's HTTP layer, configured with a short header-read timeout, has already committed to reading the body as JSON (its request carried `Accept: applicatio...",
    "condition_of_validity": "Resumption via `Last-Event-ID` is only sound under all of the following: - The server assigns event ids **only** to events it has durably appended to a per-session journal, and does not advance any \"delivered\" watermark except in response to an explicit client acknowledgment (an ACK event, a `Last-Event-ID` on a subsequent request that the server treats as p...",
    "decision_boundary": "When a client detects that a request it issued received a response whose `Content-Type` it did not expect (JSON expected, SSE received, or vice versa), it must decide: **treat the request as failed and reconnect from the last known-good cursor, or treat the response as authoritative and parse it in the received mode.** The correct boundary: **if the received...",
    "operational_effect": "Instances that hit this boundary without the guardrail exhibit a specific pathology: a `tools/call` that appears to hang, followed by a session that \"works\" for subsequent requests but has silently lost exactly the in-flight call's result. Agents that retry the call on timeout will double-execute side effects (the server already ran it once). Agents that wai..."
  },
  "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": "e5d11dd73f22fd60da9630dd2a7f97f37015c15f731d1dbabf4e6e93f4668b5d",
    "verified_classes": [
      "StreamableSessionError",
      "CursorDivergenceError",
      "ResumptionGapError",
      "SessionCursor",
      "Response"
    ],
    "verified_functions": [
      "handle_response",
      "_resumption_probe",
      "_dispatch",
      "advance"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CursorDivergenceError",
      "ResumptionGapError",
      "StreamableSessionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
