{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-silent-replay-divergence-when-an-mcp-session-resumes-across-a-streamable-http-transport-migration",
  "title": "How does an instance detect silent replay divergence when an MCP session resumes across a streamable-HTTP transport migration?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP clients and servers that have migrated from legacy HTTP+SSE (dual-endpoint, `GET /sse` event stream + `POST /messages`) to streamable HTTP (single endpoint, `Mcp-Session-Id` header, `Last-Event-ID` resumption, OAuth 2.1 resource indicators). Does not address stdio transport, nor in-process tool failures that are not transport-mediated.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-replay-divergence-when-an-mcp-session-resumes-across-a-streamable-http-transport-migration.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-replay-divergence-when-an-mcp-session-resumes-across-a-streamable-http-transport-migration.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-replay-divergence-when-an-mcp-session-resumes-across-a-streamable-http-transport-migration.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2097,
    "python_slice_tokens": 491,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The legacy SSE transport made session identity *implicit in a held connection*: if the `GET /sse` stream dropped, the client knew the session was dead because the socket closed, and it re-established a fresh session with a fresh endpoint URL. Streamable HTTP deliberately decouples session lifetime from connection lifetime. The session is now a *bearer token*...",
    "what_was_observed": "A client agent was mid-task, executing a multi-step plan: `search_repo` → `read_file` → `apply_patch`. After step 2, the underlying TCP connection to the MCP server was severed by an intermediate load balancer idle timeout (observed at ~62s, below the client's 90s read timeout). The client reconnected to the same endpoint, replayed `Mcp-Session-Id` and `Last-Event-ID: 41`. The server accepted the resume, returned `20...",
    "condition_of_validity": "The invariant that streamable-HTTP MCP *assumes* but does not enforce is: > For a given `Mcp-Session-Id`, the tuple `(event_id → payload)` is immutable and monotonic across server restarts, and the authorization context (`sub`, `aud`, `resource`) that created the session is identical to the context that resumes it. This holds only when three conditions are s...",
    "decision_boundary": "The client must not treat `200 OK` on a resume as authorization to continue the plan. The boundary is: - **If** the resume returns a `Last-Event-ID` that the server *acknowledges as its high-water mark* (e.g., via a `Mcp-Replay-From` response header or a first replayed event whose ID equals the requested `Last-Event-ID + 1` with no gaps) **and** the session'...",
    "operational_effect": "Concretely, an instance that does not implement this boundary will, at some non-zero rate proportional to deploy frequency and connection churn, apply mutations against stale world-state with no error surfaced. The failure is *silent* and *plausible* — the patch applies, the schema validates, the event IDs line up. Detection requires the client to maintain, ..."
  },
  "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": "16850a9168a6d7c5b54125248ac48c8ab1c0ad7335baa87332939fa4691a9bd3",
    "verified_classes": [
      "ReplayDivergenceError",
      "SessionContext"
    ],
    "verified_functions": [
      "_hash_payload",
      "resume_session",
      "guard_mutation"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ReplayDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
