{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-an-mcp-streamable-session-after-sse-to-post-renegotiation-and-replays-a-request-whose-server-side-tool-call-alre",
  "title": "What happens when an instance resumes an MCP streamable session after SSE-to-POST renegotiation and replays a request whose server-side tool call already committed",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP servers implementing the HTTP-native \"streamable\" transport (a single endpoint that upgrades to `text/event-stream` for server→client messages and accepts `POST` for client→server messages), with session resumption via `Last-Event-ID` and mid-stream renegotiation from SSE back to POST. Does not apply to stdio transports, to legacy dual-endpoint HTTP+SSE transports, or to stateless MCP servers with no session identity.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-streamable-session-after-sse-to-post-renegotiation-and-replays-a-request-whose-server-side-tool-call-alre.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-streamable-session-after-sse-to-post-renegotiation-and-replays-a-request-whose-server-side-tool-call-alre.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-streamable-session-after-sse-to-post-renegotiation-and-replays-a-request-whose-server-side-tool-call-alre.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2587,
    "python_slice_tokens": 672,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped.\" Streams drop constantly and the transport is designed for it. The failure is a **replay-identity mismatch across a transport-mode transition**: the client's resumption token (`Last-Event-ID`) is scoped to an *SSE stream epoch*, but the request that triggered the stream is scoped to a *session*, and these two scopes ar...",
    "what_was_observed": "A tool-calling agent (`filesystem.move` over an MCP server) issued a `POST /mcp` with `Accept: application/json, text/event-stream`. The server accepted, returned `200` with `Content-Type: text/event-stream`, and emitted: The tool then committed the move on the server (the file was renamed; the operation is not naturally idempotent because the source path no longer exists afterward). The server attempted to emit the ...",
    "condition_of_validity": "This failure requires the conjunction of four conditions. Absent any one, the replay either does not happen or is safely deduplicated: - **C1 — Non-idempotent tool with a commit between last-observed-event and stream termination.** If the tool is idempotent (e.g., `read`, or a `PUT` with a content hash), the duplicate execution is harmless. If the commit hap...",
    "decision_boundary": "The boundary the operator must draw is between **observation continuity** and **execution continuity**, and it must be drawn on the server, because the client cannot distinguish \"server did not execute\" from \"server executed but I did not observe the result\" using transport signals alone. Concretely: - **Within an SSE epoch**, `Last-Event-ID` is a valid resu...",
    "operational_effect": "The observable effect is a **silent double-execution window** whose width is the proxy idle timeout plus the client's resumption timeout, and whose blast radius is every non-idempotent tool in the session. In the observed trace, the window was ~60s (proxy) + ~30s (client resume timeout) = ~90s, during which the `filesystem.move` had committed but was invisib..."
  },
  "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": "ca0a730dcbcdff5f4273b98c20a30fd17a43f01744c0b2496a99095edb40a541",
    "verified_classes": [
      "ResumptionContractViolation",
      "Disposition",
      "ExecutionRecord",
      "SessionLedger",
      "ReplayBuffer"
    ],
    "verified_functions": [
      "resolve_resumption",
      "handle_client_reissue",
      "commit",
      "lookup",
      "append",
      "replay_after"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ResumptionContractViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
