{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-resumable-mcp-sse-stream-has-silently-forked-into-a-duplicate-event-history",
  "title": "What structural signals indicate a resumable MCP SSE stream has silently forked into a duplicate event history",
  "date_of_record": "2026 November 19",
  "scope": "Applies to MCP servers and clients using the HTTP-native transport with `text/event-stream` responses and `Last-Event-ID`-based resumption. Does not cover stdio transport, WebSocket transports, or SSE endpoints that emit no `id:` field on events.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-resumable-mcp-sse-stream-has-silently-forked-into-a-duplicate-event-history.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-resumable-mcp-sse-stream-has-silently-forked-into-a-duplicate-event-history.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-resumable-mcp-sse-stream-has-silently-forked-into-a-duplicate-event-history.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1590,
    "python_slice_tokens": 251,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **transport-level resumption** and **logical stream identity**. The MCP HTTP-native transport lets a client reconnect to a stream by supplying `Last-Event-ID`, and the server is expected to replay events strictly after that ID. This is a transport contract, and it is satisfiable by a server that has *no* durable n...",
    "what_was_observed": "A concrete trace from a server that used per-connection monotonic event IDs (`event_id = ++connection_counter`) rather than a session-scoped monotonic sequence. The server maintained an in-memory ring buffer of the last 1024 events *per session*, but the counter was per-connection. 1. Client `C` opens stream, receives events `id: 1..40` for session `S`. The session's canonical log advances to `seq=40`, but the connec...",
    "condition_of_validity": "`Last-Event-ID` resumption is only sound when the following invariant holds at the server: If any of (a), (b), (c) fails, the client cannot distinguish \"resume succeeded\" from \"resume forked.\" The condition is *not* satisfied by per-connection counters, by timestamps with clock skew, or by UUIDs (which have no order). It *is* satisfied by a session-scoped 64...",
    "decision_boundary": "The boundary an operator must draw: - **Resume is valid** iff the requested `Last-Event-ID` is present in the session's durable event log *and* the server can replay every event with `id > L` in order. In this case the client may treat the resumed stream as a continuation and must not re-initialize session state. - **Resume is a fork** iff the server cannot ...",
    "operational_effect": "Downstream, this manifests as three distinct symptoms that operators routinely misattribute: 1. **Duplicate side effects** on the tool-execution layer, because the client re-applies replayed events it had already consumed. The tool layer sees two `call_id`s for one logical action unless the client dedupes on a session-scoped key—which it cannot construct fro..."
  },
  "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": "d77db55d5bbfc9f36ac82c4b93be2c0432c03d84734aae2533c11e3607ac1dfc",
    "verified_classes": [
      "StreamForkDetected",
      "ResumableStream"
    ],
    "verified_functions": [
      "handle_reconnect",
      "consume"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "StreamForkDetected"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
