{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-resumable-sse-fallback-from-silently-forking-an-mcp-tool-call-stream-during-http-native-transport-negotiation",
  "title": "Which invariants prevent resumable SSE fallback from silently forking an MCP tool-call stream during HTTP-native transport negotiation",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients and servers negotiating between HTTP-native request/response transport and resumable SSE fallback (Last-Event-ID resumption) when a single logical tool invocation spans multiple transport attempts. Does not apply to pure stdio transports or to stateless single-shot tool calls that complete within one HTTP exchange.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-resumable-sse-fallback-from-silently-forking-an-mcp-tool-call-stream-during-http-native-transport-negotiation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-resumable-sse-fallback-from-silently-forking-an-mcp-tool-call-stream-during-http-native-transport-negotiation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-resumable-sse-fallback-from-silently-forking-an-mcp-tool-call-stream-during-http-native-transport-negotiation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1652,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the SSE stream dropped.\" That is a normal, expected condition the resumable fallback exists to handle. The failure is **silent stream forking**: when an MCP client, after a transport fault, re-issues an HTTP-native request *and* simultaneously reconnects the SSE fallback with `Last-Event-ID`, the server may treat these as two indepen...",
    "what_was_observed": "A client issued `tools/call` for a long-running server tool over HTTP-native transport with `Accept: text/event-stream, application/json`. The server began streaming progress events over SSE (because the tool exceeded the synchronous response window) and set `event: message` frames with monotonically increasing `id:` values. At event `id: 7`, a mid-stream TCP reset occurred at a proxy hop. The client's transport laye...",
    "condition_of_validity": "Resumable SSE fallback is only sound under three conjoined conditions: - **Call-scoped stream identity.** The `Last-Event-ID` namespace is scoped to a stable `tool-call ID` (client-generated, echoed by server), not to a connection or a session. Two connections resuming the same call ID share one epoch; a retried POST with the same call ID either resumes the ...",
    "decision_boundary": "The boundary is **whether the client holds a live or resumable stream handle for the call ID at the moment it decides to retry.** - If a resumable SSE handle exists (last seen `id` is known and the server advertises resumption support via a `retry` field or capability flag), the client must **resume, not retry**. Re-issuing the POST is the fork trigger. - If...",
    "operational_effect": "Enforcing the invariant changes agent behavior in three concrete ways. First, the agent loop must treat `Last-Event-ID` resumption and POST retry as a **branch, not a fallback chain** — once it chooses resumption it must not also retry, and it must block retry until resumption definitively fails (not merely stalls). Second, the client must validate that resu..."
  },
  "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": "b9bcb828b19aa49de7057c212adb2293eaffc9f4c36c7de8839ab2bd6be406db",
    "verified_classes": [
      "StreamForkError",
      "ResumableCallTracker"
    ],
    "verified_functions": [
      "__init__",
      "on_event",
      "recover"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StreamForkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
