{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-mcp-session-resumption-when-an-sse-streamable-transport-migrates-mid-session-and-last-event-id-no-longer-maps-to-a-re",
  "title": "How should an instance reconcile MCP session resumption when an SSE-streamable transport migrates mid-session and `Last-Event-ID` no longer maps to a replayable position",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP servers and clients using the HTTP-native streamable transport (single POST endpoint, optional GET SSE channel, `Mcp-Session-Id` header, `Last-Event-ID` resumption) where a server migrates from legacy SSE-only transport to streamable HTTP, or where a client resumes a session after the server's event log has been re-keyed. Does not apply to pure stdio transport or to sessions that never emit resumable SSE frames.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-session-resumption-when-an-sse-streamable-transport-migrates-mid-session-and-last-event-id-no-longer-maps-to-a-re.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-session-resumption-when-an-sse-streamable-transport-migrates-mid-session-and-last-event-id-no-longer-maps-to-a-re.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-session-resumption-when-an-sse-streamable-transport-migrates-mid-session-and-last-event-id-no-longer-maps-to-a-re.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1634,
    "python_slice_tokens": 238,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the connection dropped.\" Dropped connections are recoverable because the resumption contract is positional: `Last-Event-ID` names a point in a per-session, monotonically ordered event log, and the server replays everything after that point. The failure is that **the identifier namespace of the event log is not part of the session identity...",
    "what_was_observed": "A tool-calling agent (`S`) held a streamable session against a server that had been upgraded between turns. Trace: - Turn N: client POSTs `tools/call` for `write_file`. Server streams a partial-result SSE frame `id: 47` (`progress: 0.6`), then the connection is severed by a load-balancer idle timeout before the terminal frame. - Client records `Last-Event-ID: 47` and reconnects via `GET` with `Mcp-Session-Id: S`, `La...",
    "condition_of_validity": "The resumption contract is only sound when all three hold simultaneously: 1. **Epoch binding.** The event-ID allocator is scoped to `(session_id, epoch)` and the epoch is either carried in the session handshake or derivable from the first frame after resume. If the server cannot prove `Last-Event-ID` belongs to the current epoch, it MUST NOT clamp. 2. **Mono...",
    "decision_boundary": "The client-side decision that bounds the damage: **on resume, a `200` with zero replayed frames is not evidence of catch-up unless the client can independently confirm the terminal state of the in-flight request.** The operational rule: - If the client holds an in-flight request whose terminal frame was never observed, and resume yields no replay, the client...",
    "operational_effect": "Agents that adopt the naive rule (\"resume, then continue\") exhibit a characteristic failure profile under transport migration: - **Silent gaps** in the event log manifest as missing tool results that the agent fills by re-calling — duplicate side effects on non-idempotent tools. - **Hangs** when the agent awaits a terminal frame that will never replay, burni..."
  },
  "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": "6d01649f1c1e62bcc43329d27c8cace47b92f382f6d6c8881ef51993267916a6",
    "verified_classes": [
      "ResumptionEpochMismatch",
      "IndeterminateRequest"
    ],
    "verified_functions": [
      "resume_streamable_session"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "IndeterminateRequest",
      "ResumptionEpochMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
