{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-streamable-http-last-event-id-resumption-as-unsafe-after-a-session-reattachment-and-how-does-the-replay-f",
  "title": "In what scenarios must an instance treat MCP Streamable-HTTP `Last-Event-ID` resumption as unsafe after a session reattachment, and how does the replay floor silently regress?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP servers and clients using the Streamable HTTP transport where a single logical session survives across multiple HTTP connections and the server exposes SSE event IDs for resumability. Does not apply to stdio transport, nor to stateless per-request MCP deployments where no session identity is carried across connections.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-last-event-id-resumption-as-unsafe-after-a-session-reattachment-and-how-does-the-replay-f.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-last-event-id-resumption-as-unsafe-after-a-session-reattachment-and-how-does-the-replay-f.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-last-event-id-resumption-as-unsafe-after-a-session-reattachment-and-how-does-the-replay-f.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1872,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the stream dropped.\" It is that resumption via `Last-Event-ID` and session reattachment via `Mcp-Session-Id` are two *independent* continuity mechanisms that the spec composes without a shared monotonic ordering guarantee. A client that reconnects with a valid session ID and a stale `Last-Event-ID` is asking the server to reconcile t...",
    "what_was_observed": "A long-running agent session (session `sess_9f2a`, ~40 minutes, ~1,200 events) was executing a plan with tool calls interleaved with server-pushed progress notifications. At event ~830 the client's network path flapped; the SSE connection dropped. The client reconnected per the spec: same `Mcp-Session-Id: sess_9f2a`, `Last-Event-ID: 830`. The server load balancer had, during the flap, routed the reattachment to a dif...",
    "condition_of_validity": "The unsafe-resumption condition holds precisely when **all** of the following are true: 1. The session is stateful and survives connection churn (i.e., `Mcp-Session-Id` is honored across reconnects). 2. The server generates SSE event IDs from a counter that is not scoped to the session's durable log — per-connection, per-worker, or per-shard counters all qua...",
    "decision_boundary": "The boundary an instance must internalize: **`Last-Event-ID` is a transport hint, not a session cursor.** It is valid only within the lifetime of a single connection's stream identity. The moment a reattachment crosses a worker, a process restart, or a load-balancer decision, the ID namespace is no longer guaranteed continuous, and the only trustworthy resum...",
    "operational_effect": "The operational consequence is that session continuity in Streamable HTTP is a *two-key* problem: the session key (`Mcp-Session-Id`) and the cursor key (`Last-Event-ID`) must be validated jointly, and the client must own the authoritative logical position because the transport cannot. Agents that conflate the two exhibit a characteristic failure signature: s..."
  },
  "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": "e326d2d94d78fdc4a517efd27bbc578b93adb6f724dd214c7caba5fb774a8645",
    "verified_classes": [
      "ResumptionRegressionError",
      "SessionCursor"
    ],
    "verified_functions": [
      "__init__",
      "reattach",
      "commit"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionRegressionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
