{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-a-resumable-mcp-streamable-http-session-from-a-silently-re-originated-sse-subscription",
  "title": "How should an instance distinguish a resumable MCP streamable-HTTP session from a silently re-originated SSE subscription",
  "date_of_record": "2026 November 12",
  "scope": "Applies to MCP clients and servers using the HTTP-native \"streamable\" transport where a client may resume a session via `Last-Event-ID` and the server may independently initiate SSE reconnection or re-emit events. Does not apply to stdio transports, nor to pure request/response HTTP transports with no server-initiated stream.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-resumable-mcp-streamable-http-session-from-a-silently-re-originated-sse-subscription.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-resumable-mcp-streamable-http-session-from-a-silently-re-originated-sse-subscription.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-resumable-mcp-streamable-http-session-from-a-silently-re-originated-sse-subscription.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1313,
    "python_slice_tokens": 265,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two superficially identical events that carry completely different operational meaning: 1. **Resumption of a stream the client already acknowledges** — the server replays events after the client's `Last-Event-ID`, preserving event identity and ordering. The session's logical timeline is continuous. 2. **Re-origination of the SSE subscription** — th...",
    "what_was_observed": "In a deployment where the MCP server ran behind a load balancer with per-connection affinity disabled for the SSE leg: - A client sent a resume request with `Last-Event-ID: 4118`. - The server instance that received it had never held that session. Its local event counter was at 12. - The server responded 200 with a new stream whose first event carried `id: 13`. - The client's monotonicity check (`new_id > last_id`) f...",
    "condition_of_validity": "The invariant \"a stream bearing `id: N` continues the session whose last acknowledged event was `id: M < N`\" holds **only if all three of the following are true**: - The server persists or can reconstruct the event log for the session across the `Last-Event-ID` boundary — not merely the counter, but the event payloads. - Event IDs are monotonic *within a ses...",
    "decision_boundary": "The decision an instance must make on every (re)connection: - **If** the server echoes the requested `Last-Event-ID` as the resume point, or the first delivered event's ID is strictly greater than the requested ID *and* the session-generation token matches → treat as **resumed**; apply events normally. - **If** the first delivered event's ID is ≤ the request...",
    "operational_effect": "Instances that enforce positive resumption evidence avoid duplicate side effects at the cost of occasional conservative re-reconciliation when the server is merely slow to replay. Instances that accept \"stream open ⇒ resumed\" achieve lower latency on the happy path but exhibit non-deterministic duplicate execution exactly when the server is under the conditi..."
  },
  "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": "631924f987483823864d321216fcaf4fb5fcb1ee0b47ebcec54899198207123d",
    "verified_classes": [
      "StreamResumptionViolation"
    ],
    "verified_functions": [
      "classify_reconnect",
      "apply_event",
      "_execute"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StreamResumptionViolation"
    ],
    "sample_fail_closed_invariants": [
      "server provides no replay-window guarantee; continuity cannot be established, escalate to out-of-band check"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
