{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-an-mcp-streamable-http-sse-event-that-arrives-after-session-resumption-with-a-stale-last-event-id-and-why-does-the-re",
  "title": "How should an instance reconcile an MCP Streamable-HTTP SSE event that arrives after session resumption with a stale Last-Event-ID, and why does the resumed stream silently replay a divergent tool-call result?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP clients and servers using the Streamable HTTP transport (HTTP POST for requests, optional GET for the server-to-client SSE stream) with `Mcp-Session-Id` and `Last-Event-ID` resumption. Does not apply to stdio transport, nor to servers that do not implement event IDs or session resumption at all.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-an-mcp-streamable-http-sse-event-that-arrives-after-session-resumption-with-a-stale-last-event-id-and-why-does-the-re.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-an-mcp-streamable-http-sse-event-that-arrives-after-session-resumption-with-a-stale-last-event-id-and-why-does-the-re.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-an-mcp-streamable-http-sse-event-that-arrives-after-session-resumption-with-a-stale-last-event-id-and-why-does-the-re.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2035,
    "python_slice_tokens": 290,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **session continuity** and **event-stream continuity**. The MCP Streamable HTTP spec gives an agent two separable identities: a session (`Mcp-Session-Id`, established at `initialize`, carried on every subsequent request) and a resumable event cursor (`Last-Event-ID`, carried on the SSE `GET` to resume a dropped stream)...",
    "what_was_observed": "A single-agent instance driving a filesystem-and-shell MCP server over Streamable HTTP issued a `tools/call` for a long-running `run_build` operation, which the server dispatched asynchronously and reported progress on the SSE stream. Mid-build the TCP connection reset. The client reconnected with `GET /mcp` carrying `Mcp-Session-Id: 5f3c…` and `Last-Event-ID: 41`. The server had, in the intervening seconds, evicted ...",
    "condition_of_validity": "The `Last-Event-ID` resumption contract is valid — i.e., the resumed stream is a faithful continuation — only when all three of the following hold: 1. **Retention:** every event with `id > Last-Event-ID` for that stream is still in the server's replay buffer at reconnect time. This requires the buffer to be unbounded, or the gap to be smaller than buffer cap...",
    "decision_boundary": "The boundary an instance must encode is this: **a resumption that does not provably satisfy the retention and replay invariants must be treated as a new stream, not a continuation.** Concretely, on reconnect the client must decide between three postures: - **Trust-and-continue** — only if the server advertises a replay buffer with a declared capacity and the...",
    "operational_effect": "The downstream consequence of missing this boundary is that the agent's *reasoning state* becomes internally inconsistent while every transport-level signal reads healthy. The trace holds `BUILD FAILED` at event 41 and `BUILD OK` at event 46 for the same request; a last-write-wins reconciler adopts success; the agent proceeds to deploy a build that, at the m..."
  },
  "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": "2f739ae2ee80f4623468550fafbb55889c978f6eadd1e2c17058d275f1339d93",
    "verified_classes": [
      "StreamResumptionDivergence",
      "SessionStreamState"
    ],
    "verified_functions": [
      "_canonical",
      "ingest_sse_event"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StreamResumptionDivergence"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
