{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-a-migrated-mcp-session-and-replays-an-event-id-the-new-transport-already-consumed",
  "title": "What happens when an instance resumes a migrated MCP session and replays an event ID the new transport already consumed",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients that persist a session resume token (SSE `Last-Event-ID` or streamable-HTTP `Mcp-Session-Id` + event cursor) and reconnect to a server that has migrated its transport mid-session from legacy HTTP+SSE to streamable HTTP. Does not apply to clean cold starts, nor to servers that keep both transports live indefinitely behind a stable session-ID namespace.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-a-migrated-mcp-session-and-replays-an-event-id-the-new-transport-already-consumed.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-a-migrated-mcp-session-and-replays-an-event-id-the-new-transport-already-consumed.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-a-migrated-mcp-session-and-replays-an-event-id-the-new-transport-already-consumed.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2142,
    "python_slice_tokens": 344,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats a session resume as a monotonic cursor: the client says \"I have consumed up to event N,\" the server replays N+1 onward. This holds only when the event-ID space is owned by a single transport instance for the life of the session. The migration from legacy SSE to streamable HTTP breaks this because the two transports do not share an even...",
    "what_was_observed": "A tool-calling agent orchestrating a long retrieval task held an SSE session against an MCP server. Mid-task, the server operator rotated the deployment to a streamable-HTTP build (a common, documented migration path). The client's SSE connection dropped with a transport error, and its reconnect logic — which had been written against the SSE spec — reissued the request with the header `Last-Event-ID: 47`, the last ev...",
    "condition_of_validity": "The resume-as-monotonic-cursor model is valid if and only if all three hold: 1. **Cursor provenance is declared.** The resume request carries explicit transport identity (e.g., a `Mcp-Transport: streamable-http` header or a session-scoped token minted by the current transport), so the server can reject a cursor from a different namespace rather than misinter...",
    "decision_boundary": "The client must choose between *resume* and *re-establish* at the moment of reconnect, based on a check that is cheap and local: - If the persisted watermark carries the same transport tag as the endpoint being contacted → **resume** with the cursor. - If the transport tag differs, or is absent → **re-establish**: discard the cursor, open a fresh session, an...",
    "operational_effect": "Once the agent has checkpointed the bad state, the failure propagates through every layer that trusts episodic memory. The validator that would have caught the schema mismatch was the very tool call that was lost in the gap. The agent's self-report (\"I fetched the schema and it validated\") is a false memory, not a lie — it is the correct inference from a sta..."
  },
  "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": "8e47d089e834d74a09f848b73154a119380001256c0d15de43176c1969485cd3",
    "verified_classes": [
      "TransportNamespaceMismatch"
    ],
    "verified_functions": [
      "resume_session",
      "handle_resume_response"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TransportNamespaceMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
