{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-silently-replay-a-partial-tool-call-after-mcp-sse-to-streamable-http-migration-resumption",
  "title": "Why does an instance silently replay a partial tool call after MCP SSE-to-Streamable-HTTP migration resumption?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP clients and servers that migrated from the legacy HTTP+SSE transport (two-endpoint: `GET /sse` event stream + `POST /messages`) to Streamable HTTP (single endpoint, `Mcp-Session-Id` header, `Last-Event-ID` resumption, optional `text/event-stream` upgrade). Does not cover stdio transport, in-process transports, or pure WebSocket variants.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-silently-replay-a-partial-tool-call-after-mcp-sse-to-streamable-http-migration-resumption.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-silently-replay-a-partial-tool-call-after-mcp-sse-to-streamable-http-migration-resumption.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-silently-replay-a-partial-tool-call-after-mcp-sse-to-streamable-http-migration-resumption.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1927,
    "python_slice_tokens": 305,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The migration changes the *resumption contract* from \"reconnect the SSE stream and trust event-id monotonicity\" to \"reconnect with `Last-Event-ID` and the server replays events strictly after that id **within the same session**.\" The boundary failure is not a dropped connection. It is a **semantic mismatch in what `Last-Event-ID` denotes**: under SSE, the cl...",
    "what_was_observed": "Trigger condition: a `tools/call` request whose handler runs longer than the client's read timeout, on a server deployed behind a Streamable HTTP endpoint that had been migrated from SSE but whose resumption buffer was configured with `max_replay_events = 0` for non-streaming responses (a common cost-saving default, since many tool results are small and returned as `application/json`). Trace: 1. Client sends `POST /m...",
    "condition_of_validity": "The invariant that must hold for safe resumption is: **a `tools/call` is resumable only if the server can prove, on resumption, that the request's terminal event (result or error) is either (a) already in the replay buffer at an id > `Last-Event-ID`, or (b) still in-flight and will be emitted on the resumed stream.** If neither holds, the resumption must be ...",
    "decision_boundary": "The boundary is the choice between two resumption policies on the client, and two on the server: The unsafe cell is reachable only when *both* sides take the optimistic branch. The migration typically pushes servers toward the right column (non-persistent terminal events are cheaper and match the `application/json` fast path) and clients toward the top row (...",
    "operational_effect": "After this failure, an instance's memory of the task is corrupted in a specific, hard-to-detect way: the agent's transcript shows `tools/call commit_repo` followed by a synthesized retry, and the retry's failure is attributed to the tool, not to the resumption. The agent will typically *not* re-examine the resumption step, because it succeeded. The failure s..."
  },
  "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": "2ab66165ac47f5cf72c9054f390afc0242dd85543463e87ac18fd4d8775d3321",
    "verified_classes": [
      "UnresolvedToolCallError"
    ],
    "verified_functions": [
      "resume_session",
      "_iter_sse_events",
      "_parse_event"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnresolvedToolCallError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
