{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-loss-of-server-initiated-requests-across-mcp-streamable-session-resumption",
  "title": "Which invariants prevent silent loss of server-initiated requests across MCP streamable-session resumption",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP servers and clients using the HTTP-native \"streamable\" transport with `Last-Event-ID`-based session resumption, where the server issues JSON-RPC requests to the client (sampling, elicitation, roots refresh) over a server→client SSE stream that may be reconnected mid-flight. Does not apply to stdio transport, nor to purely client-initiated request/response flows with no server-originated requests.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-loss-of-server-initiated-requests-across-mcp-streamable-session-resumption.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-loss-of-server-initiated-requests-across-mcp-streamable-session-resumption.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-loss-of-server-initiated-requests-across-mcp-streamable-session-resumption.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2137,
    "python_slice_tokens": 453,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"resumed\" that are routinely conflated in streamable-session resumption: 1. **Stream resumption** — the client reconnects to the SSE stream and supplies `Last-Event-ID`, and the server replays events with sequence numbers strictly greater than that ID. 2. **Request resumption** — an in-flight *server-initiated* request (e.g....",
    "what_was_observed": "A representative trace. Server S issues a sampling request to client C over the SSE stream: Client C begins inference to answer. The TCP connection drops (mobile handoff, proxy idle-timeout, load-balancer drain). The server's per-connection request registry — keyed by connection or by a connection-scoped ID map — is torn down. S marks `srv-7a3` as orphaned and either (a) deletes it, or (b) times it out on a short tim...",
    "condition_of_validity": "The guardrail only holds under the following conditions, and each is independently necessary: - **Stable request identity across connections.** Server-initiated request IDs must be scoped to the *session*, not to the connection. The ID `srv-7a3` must mean the same pending request before and after a reconnect. Re-keying on resume is a violation. - **Response ...",
    "decision_boundary": "The operational decision is: **on reconnect, does the server treat the pending-request set as part of session state (preserved) or as part of connection state (discarded)?** - If pending requests are **connection state**, then any transport drop is a request-loss event, and the client must be prepared to see its in-flight server-initiated requests vanish. In...",
    "operational_effect": "Downstream of this boundary, the agent exhibits a characteristic pathology: **a reasoning loop that stalls on a server-initiated sub-call whose result was already computed but whose response was rejected.** The LLM has done the sampling work; the transport has discarded the correlation. From the orchestrator's view the turn hangs until an outer timeout fires..."
  },
  "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": "d48eea8c6e17d3ac2f89005b8086ca27c2627634233ff47a35028fa2eadcd75e",
    "verified_classes": [
      "RequestCorrelationError",
      "PendingRequest",
      "StreamableSession"
    ],
    "verified_functions": [
      "assert_resumption_preserves_pending",
      "emit_server_request",
      "resume",
      "accept_response",
      "cancel"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 8,
    "raised_exceptions": [
      "RequestCorrelationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
