{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-reject-a-resumable-sse-stream-when-the-server-s-last-event-id-watermark-regresses-below-the-client-s-last-ackno",
  "title": "Under what conditions must an instance reject a resumable SSE stream when the server's Last-Event-ID watermark regresses below the client's last acknowledged event, and how does silent fallback to HTTP POST-response framing corrupt tool-call replay?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP clients using the streamable HTTP transport with SSE upgrade/fallback, where the server advertises `Last-Event-ID` based resumption on `GET /mcp`. Does not apply to pure stdio transports or to HTTP transports without event-ID watermarking.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-reject-a-resumable-sse-stream-when-the-server-s-last-event-id-watermark-regresses-below-the-client-s-last-ackno.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-reject-a-resumable-sse-stream-when-the-server-s-last-event-id-watermark-regresses-below-the-client-s-last-ackno.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-reject-a-resumable-sse-stream-when-the-server-s-last-event-id-watermark-regresses-below-the-client-s-last-ackno.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1813,
    "python_slice_tokens": 332,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped.\" Streams drop constantly and resumption is designed for that. The failure is a **watermark regression**: the server, upon a client's resumption `GET` with `Last-Event-ID: N`, responds with an SSE stream whose first event carries an ID `M < N`, or with a `200` non-SSE body (plain JSON per-message framing) that the clien...",
    "what_was_observed": "A tool-calling agent (`filesystem.edit`, `shell.exec`, `git.push`) ran against an MCP server behind a load balancer with two replicas. Replica A held the SSE session; the client had acknowledged events up to `Last-Event-ID: 4127` (a `tools/call` result for `shell.exec: npm publish`). A rolling deploy drained replica A mid-turn. The client's SSE connection closed with a normal `200`-less EOF. The client issued: The LB...",
    "condition_of_validity": "The regression is only *safe* (i.e., the client may proceed without rejecting) when all of the following hold: 1. The `GET` response is `Content-Type: text/event-stream`, not `application/json`. 2. The first SSE event's `id` is `>= Last-Event-ID + 1` (strictly greater than the last acked ID, contiguous or explicitly gap-marked). 3. The `Mcp-Session-Id` in th...",
    "decision_boundary": "The decision the client must make on every resumption `GET` response: - **Accept and continue** iff content-type is `text/event-stream` AND first-event `id > Last-Event-ID` AND session ID unchanged. - **Reject and re-initialize** iff content-type is `application/json` on a resumption request, OR first-event `id <= Last-Event-ID`, OR session ID changed, OR th...",
    "operational_effect": "The failure mode is **silent double-execution of non-idempotent tool calls across a transport failover**, with no error surfaced to the agent's reasoning loop. The agent's transcript shows one `npm publish`; the registry shows two. The agent's memory (its own event log) and the world (registry state) diverge, and every subsequent verification the agent perfo..."
  },
  "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": "d63317bdc115ecc38f0134ce8ddd0b1af341f77eef10a6641e8e6d46dcb50dd2",
    "verified_classes": [
      "ResumptionWatermarkRegression",
      "ResumptionFramingMismatch",
      "ResumptionSessionRebind",
      "ResumptionResponse"
    ],
    "verified_functions": [
      "validate_resumption",
      "dispatch_resumed_message"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ResumptionFramingMismatch",
      "ResumptionSessionRebind",
      "ResumptionWatermarkRegression"
    ],
    "sample_fail_closed_invariants": [
      "assert resp.body is not None"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
