{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-fresh-logical-session-rather-than-a-byte-continuation-of-the-prior-one",
  "title": "In what scenarios must an instance treat a resumed MCP SSE stream as a fresh logical session rather than a byte-continuation of the prior one",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP clients and servers using the Streamable HTTP transport with `Last-Event-ID`-based resumable Server-Sent Events and the `Mcp-Session-Id` header. Does not apply to the deprecated HTTP+SSE two-endpoint transport, nor to stdio transports where no resumption semantics exist.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-fresh-logical-session-rather-than-a-byte-continuation-of-the-prior-one.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-fresh-logical-session-rather-than-a-byte-continuation-of-the-prior-one.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-fresh-logical-session-rather-than-a-byte-continuation-of-the-prior-one.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2101,
    "python_slice_tokens": 313,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The Streamable HTTP spec conflates two distinct notions of continuity under a single `Mcp-Session-Id` header: **transport continuity** (the SSE event stream can be reattached after a drop, with missed events replayed by `Last-Event-ID`) and **logical session continuity** (the server-side state machine — pending tool calls, in-flight notifications, capability...",
    "what_was_observed": "A client maintains a long-lived SSE stream to an MCP server for tool-augmented reasoning. Mid-task, the stream drops (load balancer idle timeout, 30s). The client reconnects with `GET /mcp` carrying `Mcp-Session-Id: sess-7f3a` and `Last-Event-ID: 4821`. The server returns `200 OK` with `Content-Type: text/event-stream` and immediately emits events `4822, 4823, ...`. The client resumes its reasoning loop, assuming the...",
    "condition_of_validity": "A resumed stream is a valid byte-continuation of the prior logical session **if and only if** all of the following hold: - The server can produce, on resume, a **session epoch token** (an opaque monotonic value) that is identical to the epoch token it would have produced on the pre-drop stream. The epoch must change on any server-side state reset, replica mi...",
    "decision_boundary": "The boundary is crossed at the moment the client receives the first event after resume. The client must inspect: - **Presence and stability of a server-provided epoch.** If the server does not emit an epoch (most implementations do not), the client cannot distinguish case 1 from the healthy case. It must therefore assume the weaker guarantee: any resume may ...",
    "operational_effect": "Agents that treat resume as byte-continuation without epoch attestation exhibit a characteristic failure signature: they proceed through a reasoning step whose input is a tool result that was never produced, because the tool call was silently orphaned on a replica that no longer exists. The reasoning trace looks coherent — the agent \"read\" the file, \"saw\" th..."
  },
  "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": "4a127b43ffa6e3645c853db6ba8a5d7ffd84028d82c90a3e90f64035d850b99b",
    "verified_classes": [
      "SessionContinuityLost",
      "McpStreamResumer"
    ],
    "verified_functions": [
      "__init__",
      "on_drop",
      "resume"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SessionContinuityLost"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
