{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-replayed-sse-event-identity-when-an-mcp-streamable-http-session-resumes-across-an-sse-to-post-fallback",
  "title": "Where must an instance bound replayed SSE event identity when an MCP streamable-HTTP session resumes across an SSE-to-POST fallback?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP clients and servers using the streamable-HTTP transport where a server may downgrade an SSE stream to per-request POST responses and the client attempts session resumption via `Last-Event-ID`. Does not cover stdio transport, WebSocket transports, or stateless per-call HTTP without session identity.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-replayed-sse-event-identity-when-an-mcp-streamable-http-session-resumes-across-an-sse-to-post-fallback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-replayed-sse-event-identity-when-an-mcp-streamable-http-session-resumes-across-an-sse-to-post-fallback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-replayed-sse-event-identity-when-an-mcp-streamable-http-session-resumes-across-an-sse-to-post-fallback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1759,
    "python_slice_tokens": 305,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the connection dropped.\" A dropped SSE stream is a recoverable transport event; the MCP streamable-HTTP spec anticipates it by requiring the server to attach monotonic `id:` fields to SSE events so a client can resume with `Last-Event-ID` and receive only events after that cursor. The non-obvious boundary is this: **SSE event IDs are stre...",
    "what_was_observed": "A client opened a streamable-HTTP session with `POST /mcp` carrying `Accept: text/event-stream`. The server responded with an SSE stream and assigned IDs `1..47` as the agent's tool-call progress events flowed. At event 47 the network path flapped; the client reconnected with `Last-Event-ID: 47`. The server, now under a concurrency cap, negotiated the fallback: it answered the reconnect with a `200` and `Content-Type...",
    "condition_of_validity": "The `Last-Event-ID` resume contract is *valid only when the server can prove, and the client can verify, that the new stream is a continuation of the same event log.* Two conditions must both hold: 1. **Server-side continuity attestation.** The server must either continue the same monotonic counter across the fallback, or explicitly signal a new incarnation ...",
    "decision_boundary": "The architect must decide, at the moment fallback is negotiated, whether the session is **resumable-by-cursor** or **resumable-by-identity**. The decision rule: - If the server can guarantee a single monotonic event-ID space across all incarnations of a session (including fallback), the client may prune by cursor. This is cheap and is the common case. - If t...",
    "operational_effect": "Concretely, the guardrail is a resume gate that runs before the agent consumes any event after a fallback boundary: 1. On reconnect, inspect the response `Content-Type`. If it is not `text/event-stream`, a fallback has occurred; set `resume_mode = identity`. 2. In `identity` mode, maintain a set of delivered message IDs (payload-derived, not stream-derived)...."
  },
  "matched_failure_symptoms": [
    "HTTP_502_503_504_CASCADE"
  ],
  "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": "f191c426416c5584bc14f831669d72dcde346ee15339fb22803b45077e311ed5",
    "verified_classes": [
      "ResumeBoundaryError",
      "Event",
      "SessionResumer"
    ],
    "verified_functions": [
      "message_id",
      "on_reconnect",
      "accept",
      "require_attestation_or_identity"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResumeBoundaryError"
    ],
    "sample_fail_closed_invariants": [
      "fallback negotiated without shared-ID attestation; refusing cursor-based pruning to avoid silent event loss"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
