{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-sse-re-anchoring-loss-during-mcp-http-native-streamable-transport-session-resumption",
  "title": "How does an instance detect SSE re-anchoring loss during MCP HTTP-native streamable transport session resumption",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP clients using the HTTP-native transport with `text/event-stream` fallback and `Mcp-Session-Id`-based resumption via `Last-Event-ID`. Does not cover stdio transport, WebSocket bindings, or stateless one-shot request/response MCP servers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-sse-re-anchoring-loss-during-mcp-http-native-streamable-transport-session-resumption.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-sse-re-anchoring-loss-during-mcp-http-native-streamable-transport-session-resumption.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-sse-re-anchoring-loss-during-mcp-http-native-streamable-transport-session-resumption.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1769,
    "python_slice_tokens": 264,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP streamable HTTP transport has two delivery modes that share a session identifier but not an event-identity contract: *HTTP-native* (single POST, response body is the JSON-RPC reply, no event stream) and *SSE fallback* (server upgrades to `text/event-stream`, emits numbered events, client resumes with `Last-Event-ID`). The non-obvious failure is that ...",
    "what_was_observed": "A client agent maintained a long-lived MCP session against a tool server exposing a `subscribe_events` capability. Mid-task, the SSE connection dropped (server-side idle timeout at 90s, client heartbeat at 120s — a 30s window of undetected deadness). The client reconnected with: The server responded `200 OK`, `Content-Type: text/event-stream`, and immediately emitted event `id: 4840`. Between 4821 and 4840, nineteen ...",
    "condition_of_validity": "The resumption semantics are only safe under a conjunction of conditions, any one of which failing converts a clean resumption into silent state divergence: 1. **Server retains all events since the last acknowledged ID.** The MCP spec permits servers to bound their replay buffer. A ring buffer, a TTL eviction, or a per-session cap all satisfy the spec while ...",
    "decision_boundary": "The client must make an explicit, per-resumption decision, not a default: - **Contiguous resume (head == last + 1):** proceed as if no gap. Replay is complete; state is continuous. - **Gapped resume (head > last + 1) with server-advertised buffer depth ≥ gap:** the server *should* have replayed but didn't. Treat as a protocol violation; the server is buggy o...",
    "operational_effect": "Agents that treat SSE resumption as transport-level reconnection — reconnect, 200, continue — accumulate silent state divergence proportional to the number of gaps and the mutation rate of the resources they track. The failure surfaces late, as a wrong tool argument or a plan referencing a deleted resource, and is misattributed to reasoning rather than to st..."
  },
  "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": "867627d560b759f7733907967cda30b316b43e8b344369392ccfede7cd8494a4",
    "verified_classes": [
      "ResumptionContinuityError",
      "ResumptionLedger"
    ],
    "verified_functions": [
      "observe",
      "on_resume"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResumptionContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
