{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-that-an-mcp-http-native-sse-session-has-silently-forked-its-event-stream-during-resumption",
  "title": "What structural signals indicate that an MCP HTTP-native SSE session has silently forked its event stream during resumption",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP servers exposing the HTTP-native transport (streamable HTTP with `Mcp-Session-Id` and server-initiated SSE), specifically when a client reconnects after a dropped SSE stream using `Last-Event-ID`. Does not apply to stdio transport, WebSocket transports, or stateless request/response-only MCP configurations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-an-mcp-http-native-sse-session-has-silently-forked-its-event-stream-during-resumption.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-an-mcp-http-native-sse-session-has-silently-forked-its-event-stream-during-resumption.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-an-mcp-http-native-sse-session-has-silently-forked-its-event-stream-during-resumption.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2004,
    "python_slice_tokens": 307,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the SSE connection dropped.\" A dropped stream is a detectable, recoverable condition — the client observes a TCP reset or a missing heartbeat and reconnects with `Last-Event-ID: N`. The dangerous boundary is the **forked stream**: the server accepts the resumption, replays events *after* `N`, but does so on a *new* logical event sequ...",
    "what_was_observed": "A representative trace from a long-running MCP session driving a multi-step reasoning agent with a `filesystem` and a `shell` tool server: 1. Client connects, receives `Mcp-Session-Id: s-7f2a`, opens SSE stream, and begins consuming events `id=1..412` (tool call requests, tool results, server notifications). The agent has applied all 412 events into its working state. 2. At event 412 the network path is interrupted (...",
    "condition_of_validity": "The guardrail that bounds this failure is a **resumption warrant**: on reconnect, the server must return, alongside the resumed stream, a structural attestation that the resumed log is causally continuous with the client's cursor. In HTTP-native MCP this is expressible as a response header or an initial SSE control event carrying: - the `Mcp-Session-Id` (mus...",
    "decision_boundary": "The decision the client must make on every SSE reconnection is binary and must be made *before* applying any resumed event: - **Continue** only if the server's lineage token equals the client's pre-disconnect token AND the first resumed event's causal preconditions are satisfied by the client's applied set (e.g., a `tool_result` for a `tool_call` the client ...",
    "operational_effect": "When the guardrail is absent, the observed effect is **silent duplicate execution with phantom cancellation semantics**: the agent believes a cancelled tool call was never executed (it was), retries it (double side effect), and the server's session state and the client's applied state permanently diverge with no error surfaced at any layer. Downstream, memor..."
  },
  "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": "7d13c9279f65d47beae299f0ea6feeb7c3545708554a801d51816891491cbf56",
    "verified_classes": [
      "ResumptionForkError",
      "StreamCursor"
    ],
    "verified_functions": [
      "_lineage_token",
      "verify_resumption",
      "resume_stream"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ResumptionForkError"
    ],
    "sample_fail_closed_invariants": [
      "lineage token mismatch: resumed stream is a fork of the client's event log; re-initialize session and reconcile against "
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
