{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-streamable-session-resumption-against-sse-last-event-id-replay-when-an-mcp-server-behind-an-http-native-transport-has",
  "title": "How should an instance reconcile streamable-session resumption against SSE `Last-Event-ID` replay when an MCP server behind an HTTP-native transport has already advanced its session cursor past the client's last acknowledged event?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP clients using the Streamable HTTP transport with `Mcp-Session-Id` and resumable SSE (`Last-Event-ID`) fallback, where a single logical session spans multiple HTTP requests and the server maintains a monotonic per-session event cursor. Does not apply to stdio transports or to stateless HTTP servers that emit no event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-streamable-session-resumption-against-sse-last-event-id-replay-when-an-mcp-server-behind-an-http-native-transport-has.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-streamable-session-resumption-against-sse-last-event-id-replay-when-an-mcp-server-behind-an-http-native-transport-has.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-streamable-session-resumption-against-sse-last-event-id-replay-when-an-mcp-server-behind-an-http-native-transport-has.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1640,
    "python_slice_tokens": 274,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The Streamable HTTP transport carries two independent continuity mechanisms that are easy to conflate: the **session identity** (`Mcp-Session-Id` header) and the **event cursor** (`Last-Event-ID` header on SSE resumption). Session identity answers \"which conversation is this?\"; the event cursor answers \"from which point in the server's emitted event stream s...",
    "what_was_observed": "An MCP client issued a `tools/call` over Streamable HTTP. The server responded with an SSE stream carrying events `id: 4102` through `id: 4107`, then closed the stream cleanly (normal end of the tool result). The client processed through `id: 4104`, then the connection dropped mid-parse of `4105` due to a proxy idle timeout. The client held `Last-Event-ID: 4104` and a valid `Mcp-Session-Id`. On reconnect, the client ...",
    "condition_of_validity": "The invariant that must hold for safe resumption is: > For a resumption to be *safe*, the server must be able to prove that the requested `Last-Event-ID` is either (a) still replayable from its retained log, or (b) provably the most recent event the client could have acknowledged, with no intervening events lost. If neither holds, the server must signal an e...",
    "decision_boundary": "The decision boundary is the choice between **resume-with-gap-tolerance** and **fail-closed-restart**, and it must be made on the *semantics of the interrupted operation*, not on the transport status code. - If the interrupted operation is **idempotent and read-only** (`resources/read`, `tools/list`), a gap is tolerable: the client may discard local partial ...",
    "operational_effect": "Two concrete failure classes result from mishandling this boundary: 1. **Silent result corruption.** The client concatenates a forward-jumped stream onto its stale local buffer, producing a tool result that is internally inconsistent (missing chunks) yet structurally valid. Downstream reasoning consumes the corrupt result without error. This is the more dang..."
  },
  "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": "1d8802d74160f79bed242bff4dd5e932443e20c5e24f4c34f9ea0d2b6560bf38",
    "verified_classes": [
      "CursorGapError",
      "UnresumableSessionError",
      "ResumptionState"
    ],
    "verified_functions": [
      "validate_resumption",
      "resume_stream"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CursorGapError",
      "UnresumableSessionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
