{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-renegotiate-an-mcp-sse-session-after-a-last-event-id-resume-and-why-silent-event-id-reuse-corrupts-tool-call-st",
  "title": "Under what conditions must an instance renegotiate an MCP SSE session after a `Last-Event-ID` resume, and why silent event-ID reuse corrupts tool-call state",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP servers and clients using HTTP-native streaming (SSE) transport with resumable sessions keyed by `Last-Event-ID`, where a single logical tool invocation spans multiple events. Does not apply to stdio transports, single-shot request/response HTTP, or stateless SSE streams where each event is independently idempotent.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-renegotiate-an-mcp-sse-session-after-a-last-event-id-resume-and-why-silent-event-id-reuse-corrupts-tool-call-st.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-renegotiate-an-mcp-sse-session-after-a-last-event-id-resume-and-why-silent-event-id-reuse-corrupts-tool-call-st.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-renegotiate-an-mcp-sse-session-after-a-last-event-id-resume-and-why-silent-event-id-reuse-corrupts-tool-call-st.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2322,
    "python_slice_tokens": 346,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"resume\" in MCP streaming transport, and conflating them is the root of the failure mode described here. - **Transport resume:** the client reconnects with `Last-Event-ID: N` and the server replays events `N+1, N+2, ...` from a per-session ring buffer. This is a *delivery* guarantee — the byte stream continues. - **Session r...",
    "what_was_observed": "A client agent issued `tools/call` for a `search_and_summarize` tool whose server implementation streamed its output as a sequence of SSE events: an initial `tool_call_start` (carrying the call's `id`), N `tool_call_delta` events (partial JSON of the arguments and partial text of the result), and a terminal `tool_call_end`. The call was long-running (a paginated upstream API). At event 41 of an expected ~90, the clie...",
    "condition_of_validity": "The transport-resume-equals-session-resume equivalence is valid **only** under the following conjunction: - The server's event ring buffer and its event-ID counter are persisted atomically with the session's semantic state (tool-call buffers, pagination cursors, capability negotiation results). If any one is lost on respawn, the others must be invalidated. -...",
    "decision_boundary": "The boundary is crossed at the moment the server accepts a `Last-Event-ID` for a session whose incarnation token differs from the token embedded in the client's last-received event. Operationally: - If `event.incarnation == session.current_incarnation` → transport resume is safe; replay from `Last-Event-ID + 1`. - If `event.incarnation != session.current_inc...",
    "operational_effect": "Agents that adopt incarnation-token checking and fail-closed resume observe three concrete effects: 1. **Corrupted tool-call results drop to zero at the cost of occasional full re-issues.** The re-issue rate is bounded by the respawn rate of the MCP server, which is an observable, tunable quantity. In the observed deployment, incarnation mismatches occurred ..."
  },
  "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": "7c8b0c0398c042882324b587086fbaf34bf15ee2d696bd5e7a977d3acc287d2d",
    "verified_classes": [
      "IncarnationMismatchError",
      "SessionIncarnation",
      "ClientStreamState"
    ],
    "verified_functions": [
      "resume_stream",
      "apply_resumed_event"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "IncarnationMismatchError"
    ],
    "sample_fail_closed_invariants": [
      "client has no incarnation token; cannot prove session continuity"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing",
      "uuid"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
