{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-a-resumed-mcp-sse-stream-against-a-streamable-http-fallback-that-replayed-a-different-event-prefix",
  "title": "Where must an instance reconcile a resumed MCP SSE stream against a Streamable-HTTP fallback that replayed a different event prefix",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP clients that negotiate HTTP-native transports (legacy SSE vs. Streamable HTTP) with per-session resumption via `Last-Event-ID`. Does not cover stdio transport, WebSocket transports, or stateless request/response MCP servers with no session identity.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-resumed-mcp-sse-stream-against-a-streamable-http-fallback-that-replayed-a-different-event-prefix.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-resumed-mcp-sse-stream-against-a-streamable-http-fallback-that-replayed-a-different-event-prefix.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-resumed-mcp-sse-stream-against-a-streamable-http-fallback-that-replayed-a-different-event-prefix.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1958,
    "python_slice_tokens": 286,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A resumption is not a reconnection. When an MCP client reattaches to a session after a transport drop, it is asking the server to *continue* an event stream from a specific cursor, not to *replay* a session. The legacy SSE transport encodes this contract as `Last-Event-ID` on `GET /sse`, and the server is expected to emit events strictly after that ID. Strea...",
    "what_was_observed": "A tool-orchestrating agent held an SSE session with a server exposing three tools (`read_file`, `write_file`, `run_tests`). Mid-call to `run_tests`, the SSE connection dropped after the server had emitted event `id: 41` (the `run_tests` invocation acknowledgment) but before `id: 42` (the result). The client's ledger recorded `41` as *dispatched, pending result*. On reconnect, the client's transport negotiator observe...",
    "condition_of_validity": "The reconciliation invariant holds only when the client can establish all three of the following at fallback time: 1. **Namespace identity.** The fallback transport's event-ID space is the same space as the prior transport's. This is only knowable if the server advertises a stable session-scoped event-ID namespace (e.g., a `Mcp-Session-Id` plus a transport-i...",
    "decision_boundary": "The decision is not \"resume or restart.\" It is \"resume with reconciliation, resume without reconciliation, or refuse.\" The boundary is drawn by whether the fallback transport's first emitted event ID is `>` the client's cursor *and* whether the client's ledger can prove no side-effecting event was applied twice. Concretely, on fallback: - If `first_replayed_...",
    "operational_effect": "The practical consequence is that MCP clients which implement transport fallback must carry a *transport-independent* session ledger, not a transport-scoped one. The ledger must record, per side-effecting tool invocation: the client-generated idempotency key, the `applied_seq` at dispatch, and the `applied_seq` at result-application. On any fallback, the cli..."
  },
  "matched_failure_symptoms": [
    "HTTP_502_503_504_CASCADE"
  ],
  "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": "66d78b488efcedad916a898293c2a09120701005ed5fea9625d0218b76b0708a",
    "verified_classes": [
      "UnreconciledReplayError",
      "SessionLedger"
    ],
    "verified_functions": [
      "apply_fallback_stream",
      "__init__",
      "record_dispatch",
      "reconcile_fallback"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnreconciledReplayError"
    ],
    "sample_fail_closed_invariants": [
      "fallback stream empty; cannot establish cursor continuity"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
