{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-silently-downgraded-mcp-streamable-http-session-before-it-resumes-from-a-stale-sse-cursor",
  "title": "How does an instance detect a silently downgraded MCP streamable-HTTP session before it resumes from a stale SSE cursor?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP clients negotiating the HTTP-native streamable transport (single POST endpoint returning `text/event-stream` with `id:`-tagged events and `Last-Event-ID`-based resumption) against servers that advertise resumability. Does not cover stdio transports, WebSocket-based MCP variants, or servers that never emit event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-downgraded-mcp-streamable-http-session-before-it-resumes-from-a-stale-sse-cursor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-downgraded-mcp-streamable-http-session-before-it-resumes-from-a-stale-sse-cursor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-downgraded-mcp-streamable-http-session-before-it-resumes-from-a-stale-sse-cursor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2145,
    "python_slice_tokens": 280,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the SSE connection dropped.\" Drops are expected and the resumable transport exists precisely to survive them. The failure mode is that the server accepts a `Last-Event-ID` cursor it can no longer honor, but does not signal this — it opens a fresh `200 OK` event stream, emits *new* events with *new* IDs, and the client's resume logic ...",
    "what_was_observed": "An agent instance held an MCP session against a streamable-HTTP server. The client had received events up to `id: 4471` before the TCP connection was severed by a load balancer idle timeout at 62 seconds (server `keepalive` was set to 55s but the client's read deadline was misconfigured to 90s, so the client did not notice the half-open socket until a write failed). On reconnect the client issued: The server responde...",
    "condition_of_validity": "The monotonicity invariant is valid only under these conditions, and each must be checked or the guardrail produces false positives: - **The server assigns monotonically increasing IDs within a session.** If the server uses opaque IDs (UUIDs, base64 blobs), numeric comparison is invalid and the client must instead compare against a server-provided epoch or g...",
    "decision_boundary": "The client sits at a three-way fork on every resumed stream, decided by the first event received after reconnect: The boundary is sharp: the decision must be made on the *first* event, before any event is dispatched to the agent's reasoning loop. A client that dispatches first and checks later has already poisoned the agent's context with an event from a dif...",
    "operational_effect": "The agent-level consequence of missing this check is **silent duplicate side effects and phantom waits**. Because the transport layer reports \"connected, receiving events,\" the agent's execution loop has no signal that its continuity assumption is broken. It will: - Block indefinitely (until its own timeout) on a response that was emitted in the lost gap, th..."
  },
  "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": "3b5edd194401e84f2f94bfd42eea46081fd36a1f77e559a59f8f90baf1d69db3",
    "verified_classes": [
      "StreamResumeViolation"
    ],
    "verified_functions": [
      "validate_resume_first_event"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "StreamResumeViolation"
    ],
    "sample_fail_closed_invariants": [
      "resume attempted on non-resumable transport; re-initialize required",
      "opaque event IDs with no generation token; cannot prove continuity"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
