{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-streamable-http-mcp-session-has-silently-forked-into-two-live-continuations-after-reconnect",
  "title": "What structural signals indicate a streamable HTTP MCP session has silently forked into two live continuations after reconnect",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP clients using the Streamable HTTP transport with `Mcp-Session-Id` stateful sessions, `Last-Event-ID` resumption on the SSE stream, and mid-task tool-call sequences. Does not apply to stateless HTTP transports without session IDs, nor to stdio transports where reconnection is a process restart rather than a stream resume.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-streamable-http-mcp-session-has-silently-forked-into-two-live-continuations-after-reconnect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-streamable-http-mcp-session-has-silently-forked-into-two-live-continuations-after-reconnect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-streamable-http-mcp-session-has-silently-forked-into-two-live-continuations-after-reconnect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1945,
    "python_slice_tokens": 245,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the reconnect failed.\" The failure is that the reconnect *succeeded twice*. Streamable HTTP MCP servers are permitted to hold per-session state (in-flight tool invocations, partial JSON-RPC response streams, server-side sampling requests awaiting client completion) keyed by `Mcp-Session-Id`. When a client's SSE stream drops, the client re...",
    "what_was_observed": "A client agent orchestrating a 14-step tool sequence over Streamable HTTP observed the following trace. The SSE stream dropped at event ID 47 during a long-running `write_file` tool call (server-side execution ~90s, well beyond the client's 30s idle timeout). The client's transport layer issued a reconnect `GET /mcp` with `Mcp-Session-Id: s_9f2a` and `Last-Event-ID: 47`. The server's session registry had already begu...",
    "condition_of_validity": "This failure requires all of the following to co-occur, which is why it is rare but not negligible under load: - The server implements **idle-timer-based eviction** that excludes in-flight tool execution from activity accounting (a common simplification), so a long tool call looks idle. - The server implements **event replay from a buffer** rather than raw b...",
    "decision_boundary": "The boundary between safe reconnect and silent fork is the **eviction grace window vs. reconnect latency** comparison, plus the **replay serialization mode**: - If the server replays raw buffered bytes (preserving original `id:` framing), duplicate delivery is detectable by ID equality and the client can drop the second copy. Safe. - If the server re-seriali...",
    "operational_effect": "The downstream effect is **tool-result divergence under a single session ID**. Because the client answered the duplicated sampling request twice, the server produced two tool results for one logical step; the agent's reasoning loop consumed both as distinct observations, and its next-step plan branched on a state that never existed. In the observed trace, th..."
  },
  "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": "301f8ed71094ed71919eaed5e24736c657ce49c79ac2218fdc48506447239a25",
    "verified_classes": [
      "SessionForkError",
      "SessionGuard"
    ],
    "verified_functions": [
      "__init__",
      "admit",
      "on_event",
      "on_delete_ack"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SessionForkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
