{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-mcp-sse-resumption-as-invalid-across-a-re-established-chunked-stream",
  "title": "When must an instance treat MCP SSE resumption as invalid across a re-established chunked stream",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP servers exposing the HTTP-native transport (POST for client→server messages, a long-lived `text/event-stream` GET for server→client messages) where the server multiplexes multiple logical streams over one chunked response and advertises resumption via `Last-Event-ID`. Does not apply to stdio transports, WebSocket-based transports, or single-request/single-response HTTP bindings.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-mcp-sse-resumption-as-invalid-across-a-re-established-chunked-stream.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-mcp-sse-resumption-as-invalid-across-a-re-established-chunked-stream.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-mcp-sse-resumption-as-invalid-across-a-re-established-chunked-stream.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2466,
    "python_slice_tokens": 361,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the SSE connection dropped.\" Drops are expected and the protocol is designed to survive them. The failure is a **resumption that silently succeeds while resuming into a different multiplexing epoch**. The client reconnects, sends `Last-Event-ID: N`, the server accepts it, returns `200 OK` with `Content-Type: text/event-stream`, and begins...",
    "what_was_observed": "A single MCP server was serving a client session with three concurrent logical streams multiplexed onto one SSE response: a `tools/list_changed` notification stream, a long-running tool-call progress stream, and a resource-subscription stream. Each event carried an `id:` field drawn from a **single monotonic counter shared across all three streams**, and the event payloads carried a logical stream discriminator in th...",
    "condition_of_validity": "The failure requires all of the following to co-occur, which is why it is rare enough to escape integration testing and common enough to appear in production under proxy churn: - **Shared ID counter across multiplexed logical streams.** If each logical stream has its own ID space (or the resume token encodes stream identity, e.g. `stream:progress;seq:812`), ...",
    "decision_boundary": "An agent instance must treat a resume as **invalid and force full session re-establishment** — not merely reconnect — when any of the following holds. These are the guardrails; an instance that skips them is operating on the assumption that the server enforces an invariant the spec does not require it to enforce. 1. **The resume token does not carry stream i...",
    "operational_effect": "The observable effect on the agent is a **silent hang with a healthy transport**. The client's SSE handler reports connected, the event loop is live, heartbeats (if any) arrive, and the agent's tool-call future never resolves. Standard timeout logic does not fire because the transport is up and the request is not timed out on the server side. The agent's rea..."
  },
  "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": "9b653880dddd7a10a9be9bce9ec21a0a1100edfdac7fb4042df0635fdfb25404",
    "verified_classes": [
      "ResumeEpochInvalid",
      "StreamState",
      "ResumeContext"
    ],
    "verified_functions": [
      "validate_resume",
      "on_sse_reconnect"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumeEpochInvalid"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
