{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-reject-a-resumed-mcp-sse-session-because-the-last-event-id-cursor-is-sound-but-the-session-s-capability-epoch-has-advanced",
  "title": "When must an instance reject a resumed MCP SSE session because the Last-Event-ID cursor is sound but the session's capability epoch has advanced",
  "date_of_record": "2026 November 23",
  "scope": "Applies to MCP servers exposing the HTTP-native streamable transport with an SSE fallback and `Mcp-Session-Id` / `Last-Event-ID` resumption, where a single session can span capability negotiation, tool registration changes, and server-side restarts. Does not apply to pure stdio transports, nor to sessions whose capability set is frozen for the session's entire lifetime by contract.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-resumed-mcp-sse-session-because-the-last-event-id-cursor-is-sound-but-the-session-s-capability-epoch-has-advanced.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-resumed-mcp-sse-session-because-the-last-event-id-cursor-is-sound-but-the-session-s-capability-epoch-has-advanced.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-resumed-mcp-sse-session-because-the-last-event-id-cursor-is-sound-but-the-session-s-capability-epoch-has-advanced.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1633,
    "python_slice_tokens": 189,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The resumption cursor (`Last-Event-ID`) and the session's negotiated capability epoch are two independent state axes that the transport spec treats as if they were one. `Last-Event-ID` answers *\"which bytes of the event stream has this client already consumed?\"* The capability epoch answers *\"which set of tools, resources, and prompt schemas was this client ...",
    "what_was_observed": "A long-running agent session (`Mcp-Session-Id: 7f3a...`) negotiated capabilities at epoch 0: `search_documents` accepted `{query: str, limit: int}`. The agent issued a `tools/call` for `search_documents`, the server began streaming a large result set as SSE events, and the connection dropped mid-stream at `Last-Event-ID: 42` due to an upstream proxy idle timeout. While the client was disconnected, the server was rede...",
    "condition_of_validity": "Resuming a session with a `Last-Event-ID` cursor is *sound* only when all of the following hold: - The session's capability epoch is unchanged between the disconnect and the resume, **or** - The server, on resume, emits a capability-invalidation event (e.g. `notifications/tools/list_changed`) *at the cursor boundary* before replaying any subsequent tool-resu...",
    "decision_boundary": "The decision the server must make on every `Last-Event-ID` resume is binary and must be made *before* replay: - **Resume in place** if and only if `session.epoch == current_server_epoch` for the session's negotiated capability set. Replay events from the cursor. - **Reject-and-renegotiate** if `session.epoch != current_server_epoch`. Do not replay. Return a ...",
    "operational_effect": "The practical consequence is that **stream contiguity and schema coherence are orthogonal, and only one of them is protected by the resumption token**. Systems that conflate them will pass every transport test—reconnection, gap-free replay, ordering—while failing at the reasoning layer, and the failure will present as the agent's fault (bad tool arguments, 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": "02ea5dcb349fedf4abed730f042b23e5287e4df8f1d421613c0dfad0e4e8ca67",
    "verified_classes": [
      "CapabilityEpochMismatch",
      "SessionRecord"
    ],
    "verified_functions": [
      "resume_stream",
      "__init__"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CapabilityEpochMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
