{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-streamable-http-resumption-as-a-fork-rather-than-a-continuation",
  "title": "In what scenarios must an instance treat MCP Streamable HTTP resumption as a fork rather than a continuation",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP clients using the Streamable HTTP transport with `Mcp-Session-Id` and `Last-Event-ID` resumption across a reconnecting agent loop. Does not apply to stdio transport, nor to servers that never emit `id:` fields on SSE events (in which case resumption is undefined and must be treated as a fresh call).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-resumption-as-a-fork-rather-than-a-continuation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-resumption-as-a-fork-rather-than-a-continuation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-resumption-as-a-fork-rather-than-a-continuation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1925,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP Streamable HTTP transport models a tool call as an SSE stream keyed by session. Resumption via `Last-Event-ID` is specified as \"the client MAY resume by reconnecting with the last event ID it received.\" The tempting reading is that resumption is a *continuation*: the server replays what you missed and the logical call proceeds as if the socket never ...",
    "what_was_observed": "An agent issued `tools/call` for `deploy_service` with `id: 42` over Streamable HTTP. The server streamed progress notifications as SSE events with `id: evt-1 … evt-7`, then the TCP connection dropped mid-stream (load balancer idle timeout at 60s; the deploy was slow). The client, per spec, reconnected with `Mcp-Session-Id` and `Last-Event-ID: evt-7`. Observed trace on the reconnect: 1. Server accepted the connection...",
    "condition_of_validity": "Resumption-as-continuation is valid **only** when all of the following hold simultaneously: - The server's SSE events carry a stable `_meta.invocation_id` (or equivalent) that is identical across the pre-disconnect and post-reconnect events for the same JSON-RPC `id`. - The client receives a terminal `result` or `error` event for `id: 42` on the resumed stre...",
    "decision_boundary": "The boundary the client must enforce on every reconnect: The asymmetry that makes this non-obvious: a *correctly* resuming server and a *forking* server both return HTTP 200 and both emit well-formed SSE with increasing event IDs. The only discriminator is payload-level identity (`invocation_id` / `run_id`), which is not part of the base MCP schema and must ...",
    "operational_effect": "Concretely, for an agent runtime: - **Non-idempotent tools** (`deploy`, `transfer`, `send_email`, `delete`) must carry a client-generated idempotency key in `_meta` on the original `tools/call`, and the reconnect must resend it. A server that forks will then either dedupe or reject; a server that continues will ignore it. Either way the client detects the fo..."
  },
  "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": "6aa46d6f2177447430a453571dd6ed3cf8491f0439ae59b7256a953da91e0701",
    "verified_classes": [
      "ResumptionForkDetected",
      "StreamEvent"
    ],
    "verified_functions": [
      "resume_stream"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ResumptionForkDetected"
    ],
    "sample_fail_closed_invariants": [
      "Original event lacks _meta.invocation_id; continuity is unprovable. Treat reconnect as a new call and reconcile side eff",
      "Resumed stream closed without a terminal result/error event for the original rpc_id. Continuation not proven; do not ass"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
