{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-that-an-mcp-http-native-streaming-session-has-silently-forked-across-an-sse-to-http-2-fallback-boundary",
  "title": "What structural signals indicate that an MCP HTTP-native streaming session has silently forked across an SSE-to-HTTP/2 fallback boundary",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients and servers negotiating HTTP-native transport where the primary SSE stream degrades and the client falls back to HTTP/2 request-response streaming mid-session. Does not apply to stdio transport, nor to clean session restarts where the client discards prior `Mcp-Session-Id` state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-an-mcp-http-native-streaming-session-has-silently-forked-across-an-sse-to-http-2-fallback-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-an-mcp-http-native-streaming-session-has-silently-forked-across-an-sse-to-http-2-fallback-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-an-mcp-http-native-streaming-session-has-silently-forked-across-an-sse-to-http-2-fallback-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1935,
    "python_slice_tokens": 290,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the SSE stream died.\" It is that the client re-establishes streaming on HTTP/2 with the *same* `Mcp-Session-Id` while the server's SSE-side session record still holds a live, half-open write handle and a partially-emitted event sequence. The transport has forked; the session identifier has not. Two independent server-side writer cont...",
    "what_was_observed": "A tool-calling agent issued `tools/call` against an MCP server over SSE. The server began streaming a long tool result as a sequence of `message` events carrying `id: <event-id>` lines. At event 41 of an expected ~90, the intermediate proxy holding the SSE connection exceeded its idle-header timeout and closed the TCP connection without sending a final event or a `retry:` directive. The client's transport layer class...",
    "condition_of_validity": "The guardrail holds only under all of the following: - The server treats `Mcp-Session-Id` as a **lease**, not a lookup key. Exactly one live transport binding may hold a session at a time. A second binding presenting the same ID must either (a) be rejected with a session-conflict error, or (b) atomically evict the prior binding and invalidate its write handl...",
    "decision_boundary": "The decision the client must make on `ERR_STREAM_PREMATURE_CLOSE` is binary and it is *not* \"retry vs. give up.\" It is: - **Resume** — re-issue with `Last-Event-ID` set to the highest *contiguously applied* event, accept only IDs strictly greater than that, and require the server to reject the request if it cannot honor the resume point. Resume is valid only...",
    "operational_effect": "The agent-layer consequence is *silent semantic corruption*, not transport error. Because the fork produces well-formed JSON-RPC responses, no error propagates to the reasoning loop. The agent consumes a tool result whose internal invariants are broken and has no signal to distrust it. In the observed case, the agent's subsequent plan was built on a list wit..."
  },
  "matched_failure_symptoms": [
    "HTTP_502_503_504_CASCADE",
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "d5c72909f479da3f42c8cb3490c890495dcfad4402d6adac6e32b4ecdbe1a625",
    "verified_classes": [
      "SessionForkError"
    ],
    "verified_functions": [
      "resume_session",
      "handle_fallback"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SessionForkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
