{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-resuming-an-mcp-streamable-http-session-silently-diverge-from-the-server-s-sse-event-log",
  "title": "Why does an instance resuming an MCP streamable HTTP session silently diverge from the server's SSE event log",
  "date_of_record": "2026 December 4",
  "scope": "Applies to MCP clients (agent runtimes) that reconnect to a streamable-HTTP MCP server after a transport interruption and rely on `Last-Event-ID` replay to reconstruct in-flight tool-call state. Does not apply to stdio transports, nor to stateless HTTP servers that do not emit SSE `id:` fields on the event stream.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-resuming-an-mcp-streamable-http-session-silently-diverge-from-the-server-s-sse-event-log.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resuming-an-mcp-streamable-http-session-silently-diverge-from-the-server-s-sse-event-log.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resuming-an-mcp-streamable-http-session-silently-diverge-from-the-server-s-sse-event-log.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1642,
    "python_slice_tokens": 303,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two legally distinct meanings of \"resume\" in the MCP streamable-HTTP transport, and they are routinely conflated by client implementations: 1. **Transport resumption** — the client reconnects the HTTP connection and asks the server, via `Last-Event-ID`, to replay SSE events it missed. This restores the *byte stream*, not the *semantic session*. 2. ...",
    "what_was_observed": "An agent issued three concurrent JSON-RPC requests over one streamable-HTTP session: a long-running `tools/call` (call A, ~40 s), a fast `tools/call` (call B, ~200 ms), and a `sampling/createMessage` (call C, ~8 s). The event stream carried monotonically increasing `id:` values. At t≈2 s the TCP connection was severed by an intermediate proxy (idle-read timeout on the client's read half). Call B had already completed...",
    "condition_of_validity": "The divergence requires all three of the following to hold simultaneously: - **Concurrent in-flight requests share one SSE stream.** With serialized request/response, the replay buffer's oldest event always corresponds to the oldest unacknowledged request, so a replay-window rebuild is complete. Concurrency breaks the ordering assumption. - **The last acknow...",
    "decision_boundary": "The invariant that must be enforced: > **Replay completeness is bounded by the replay window, not by session history. Absence of an event in a replay is not evidence that the event did not occur.** Operationally, this yields a hard rule: a resumed client MUST treat its pre-disconnect pending-request ledger as authoritative and MUST NOT prune entries merely b...",
    "operational_effect": "When the invariant is violated, the failure surfaces as *duplicate side effects and stale reasoning premises*, not as a protocol error. The agent's context now contains a false belief (\"B completed once with content X\") that no subsequent tool result will contradict until it re-reads the affected resource. This is the dangerous class: the divergence is consi..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "02088b3590de5f0a2cf3067d460f255c591ff25f30d07254bee21e6485aa303d",
    "verified_classes": [
      "ReplayDivergenceError",
      "RequestState",
      "PendingRequest",
      "ResumeLedger"
    ],
    "verified_functions": [
      "resume_session",
      "on_disconnect",
      "apply_replay",
      "assert_resumable"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ReplayDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
