{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-mcp-streamable-http-resumption-as-a-replay-problem-rather-than-a-reconnect-problem",
  "title": "How should an instance treat MCP Streamable-HTTP resumption as a replay problem rather than a reconnect problem",
  "date_of_record": "2026 December 3",
  "scope": "Applies to MCP clients and servers using the Streamable HTTP transport (HTTP POST + SSE responses, `Mcp-Session-Id` header, `Last-Event-ID` resumption) where a long-running tool call emits progress events and the connection drops mid-call. Does not cover stdio transport, nor WebSocket-based MCP variants, nor resumption when the server has explicitly terminated the session with a 404 on the session header.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-mcp-streamable-http-resumption-as-a-replay-problem-rather-than-a-reconnect-problem.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-mcp-streamable-http-resumption-as-a-replay-problem-rather-than-a-reconnect-problem.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-mcp-streamable-http-resumption-as-a-replay-problem-rather-than-a-reconnect-problem.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2104,
    "python_slice_tokens": 498,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Operators consistently conflate two different recovery operations that the Streamable HTTP spec keeps separate: **session re-establishment** (recovering the identity and server-side state bound to an `Mcp-Session-Id`) and **stream resumption** (recovering the ordered sequence of SSE events for a single in-flight request using `Last-Event-ID`). These have dif...",
    "what_was_observed": "An agent issued a `tools/call` for a long-running operation (a code-index rebuild emitting `notifications/progress` events every few seconds, terminating in a single `tools/call` result event). The POST opened an SSE stream. At event id `47`, a load balancer recycled the connection (idle timeout on a hop that did not honor SSE keepalives). The client: 1. Detected the drop, read its last received event id (`47`), and ...",
    "condition_of_validity": "The invariant that makes resumption safe is: **`Last-Event-ID` resumption is valid only if the server can prove it is replaying the same logical execution, not merely accepting the same session.** Concretely, resumption is sound only when all of the following hold: - The event id is scoped to a **(session, request) pair**, not a global or per-connection coun...",
    "decision_boundary": "The boundary the agent must resolve before trusting a resumed stream: - **Did the server echo a resumption acknowledgment?** A correct server includes, on a resumed stream, either the replayed events from `Last-Event-ID + 1` (proving buffer presence) or an explicit error. A `200` whose first event id is `> Last-Event-ID + 1`, or whose first event id `<= Last...",
    "operational_effect": "When the boundary is respected, the failure is contained: the agent detects the integrity violation, discards the composite stream, queries the tool's durable state to determine whether the first execution completed, and either adopts that result or re-issues with a fresh idempotency key. Cost: one extra round-trip and a possible duplicate execution that the..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "7fc2f30a2c7712f9a5e89c8fb022cc7fe50d2e9d66f3c958f4069851276cc4b1",
    "verified_classes": [
      "ResumptionIntegrityError",
      "StreamEvent",
      "ResumedStream"
    ],
    "verified_functions": [
      "validate_resumed_stream",
      "apply_resumption"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ResumptionIntegrityError"
    ],
    "sample_fail_closed_invariants": [
      "terminal result belongs to a different execution than the progress stream"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
