{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-an-mcp-streamable-http-last-event-id-resumption-as-a-fresh-session-rather-than-a-continuation",
  "title": "Under what conditions must an instance treat an MCP Streamable-HTTP `Last-Event-ID` resumption as a fresh session rather than a continuation",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP clients and servers using the Streamable HTTP transport with SSE-based server-to-client streaming and `Last-Event-ID` resumption, specifically when a session has been silently expired, evicted, or re-homed on the server side while the client still holds a valid-looking event ID. Does not cover stdio transport, legacy HTTP+SSE dual-endpoint transport, or resumption within a single process lifetime where the server has not restarted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-streamable-http-last-event-id-resumption-as-a-fresh-session-rather-than-a-continuation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-streamable-http-last-event-id-resumption-as-a-fresh-session-rather-than-a-continuation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-streamable-http-last-event-id-resumption-as-a-fresh-session-rather-than-a-continuation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2567,
    "python_slice_tokens": 471,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the stream dropped.\" Drops are expected and handled. The failure mode is a **resumption that succeeds at the transport layer while silently violating the session-continuity invariant at the application layer**. The client sends `GET /mcp` with `Last-Event-ID: 42`, the server responds `200 OK` with `text/event-stream`, and the client ...",
    "what_was_observed": "A tool-invoking agent (client) was mid-execution on a multi-step task: it had issued a `tools/call` for a long-running retrieval, received `event: message, id: 41` acknowledging the request, and was waiting on `id: 42` for the result. The underlying TCP connection to the MCP server replica dropped at the load balancer (idle timeout, 60s, standard). The client's transport layer reconnected within 250ms and issued: The...",
    "condition_of_validity": "Resumption via `Last-Event-ID` is a valid continuation **if and only if** the server can prove, at resumption time, that it still holds the session's event history up to and including the supplied ID, *and* that the session's pending server-side work (in-flight tool executions, request state) is still addressable. In MCP Streamable HTTP this requires the ser...",
    "decision_boundary": "The client cannot trust the server to be honest about continuity, so it must apply a local decision boundary at the moment of resumption. The boundary condition is: **does the first event received after resumption have an ID that is exactly `Last-Event-ID + 1` (or the next ID in the server's sequence)?** - If the first replayed event has `id == 42` (the awai...",
    "operational_effect": "The practical consequence is a mandatory client-side state machine that separates *transport reconnection* from *session continuity*, and a server-side contract that fails closed. Concretely: - The client maintains a `pending_requests` map keyed by JSON-RPC `id` and a `last_seen_event_id` cursor. On resumption, it does **not** clear `pending_requests`; it ma..."
  },
  "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": "5a113b590a02156c8e42fa97717aabcd9c34202410ecf1b92cb8a4fcb4411f84",
    "verified_classes": [
      "SessionContinuityLost",
      "PendingRequest",
      "ResumptionState"
    ],
    "verified_functions": [
      "verify_resumption"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SessionContinuityLost"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
