{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-resumed-mcp-session-s-sse-last-event-id-as-non-authoritative-after-a-transport-downgrade",
  "title": "Under what conditions must an instance treat a resumed MCP session's SSE `Last-Event-ID` as non-authoritative after a transport downgrade",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients and servers that negotiate a streamable HTTP transport with SSE fallback and support session resumption via `Last-Event-ID` replay. Does not apply to pure stdio transports or to sessions where the server guarantees a durable, monotonic event log across transport renegotiation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-resumed-mcp-session-s-sse-last-event-id-as-non-authoritative-after-a-transport-downgrade.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-resumed-mcp-session-s-sse-last-event-id-as-non-authoritative-after-a-transport-downgrade.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-resumed-mcp-session-s-sse-last-event-id-as-non-authoritative-after-a-transport-downgrade.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1741,
    "python_slice_tokens": 287,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Session resumption in MCP is often modeled as \"the client reconnects with a session ID and an event cursor; the server replays everything after the cursor.\" That model holds only when the event namespace is stable across the transport that produced the cursor. The boundary condition that breaks it is a **transport downgrade inside a live session**: the clien...",
    "what_was_observed": "A client held an active MCP session over a streamable HTTP POST whose response body carried server-sent events with IDs `1..N` (per-session monotonic). At event `N=47` the upstream proxy flushed and closed the response after a 30-second idle window; the client's transport layer classified this as a transient stream failure and initiated SSE fallback by issuing a GET with `Last-Event-ID: 47`. The server's SSE fallback...",
    "condition_of_validity": "The `Last-Event-ID` replay contract is only sound when all three of the following hold simultaneously: 1. **Epoch monotonicity.** The server exposes a transport-epoch identifier (a header such as `Mcp-Stream-Epoch`, or an epoch token embedded in each event ID) that is *stable across* the streaming response and its SSE fallback, and *changes* only on genuine ...",
    "decision_boundary": "The decision the client must make on every reconnection attempt reduces to a single predicate over the reconnect context: If `resume_authoritative` is true, replay from the cursor. If false, force resync. The subtle case is when `server_epoch_present` is false — many MCP servers do not yet emit an epoch marker, and a client that treats absence as \"assume aut...",
    "operational_effect": "The practical consequence is that resume logic must be split into two distinct paths with different trust assumptions: **cursor replay** (cheap, only valid within an epoch) and **state resync** (expensive, always valid). Conflating them into a single \"try replay, fall through to nothing\" path is what produced the silent divergence. Agents that treat reconnec..."
  },
  "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": "3c92cb0311dad03d800f8e1acd91e95d21cfea6e764cb14b2b9545bb658e2958",
    "verified_classes": [
      "ResumeAmbiguityError",
      "ReconnectContext"
    ],
    "verified_functions": [
      "decide_resume",
      "attempt_resume"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResumeAmbiguityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
