{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-mcp-streamable-http-session-reattachment-as-a-new-logical-stream-rather-than-a-continuation",
  "title": "Under what conditions must an instance treat MCP Streamable HTTP session reattachment as a new logical stream rather than a continuation",
  "date_of_record": "2026 November 12",
  "scope": "Applies to MCP servers and clients speaking the Streamable HTTP transport (single POST endpoint, optional GET for server-initiated streams, `Mcp-Session-Id` header, `Last-Event-ID` resumption). Does not apply to the legacy HTTP+SSE two-endpoint transport, nor to stdio transport, nor to sessions that never emitted an event ID.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-streamable-http-session-reattachment-as-a-new-logical-stream-rather-than-a-continuation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-streamable-http-session-reattachment-as-a-new-logical-stream-rather-than-a-continuation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-streamable-http-session-reattachment-as-a-new-logical-stream-rather-than-a-continuation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2251,
    "python_slice_tokens": 330,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The Streamable HTTP transport conflates two independent lifecycles under one identifier. The `Mcp-Session-Id` identifies a *logical session* — the negotiated capability set, the initialized handshake state, the set of live tool registrations. The `Last-Event-ID` identifies a *position within a specific event stream* — a monotonic cursor into the byte sequenc...",
    "what_was_observed": "A server implementing the transport kept a per-session ring buffer of the last N events with their IDs, keyed by `(session_id, stream_id)`. The stream ID was derived from the POST request that opened it. On client reconnect with `Last-Event-ID`, the server looked up the event ID in the session's buffer, found the stream ID, and replayed from that cursor. The observed failure: a client opened a POST for a long-running...",
    "condition_of_validity": "Resumption via `Last-Event-ID` is a valid continuation **only** when all of the following hold: 1. The previous stream terminated without the server emitting a terminal event for the request (i.e., the stream did not reach its natural end — no final result, no error, no explicit close frame). 2. The server's event buffer still contains the referenced event I...",
    "decision_boundary": "The decision procedure for an agent operating this transport: - On reconnect, if the client has **not** observed a terminal event for the in-flight request, attempt resumption with `Last-Event-ID`. Treat the response as a continuation of the same logical stream; deduplicate by event ID within the stream. - On reconnect, if the client **has** observed a termi...",
    "operational_effect": "Systems that violate this boundary exhibit a characteristic signature: duplicate terminal events delivered under distinct stream identities, followed by a client-side reconnect storm that terminates only when the server's event buffer evicts the cursor. The storm is self-limiting but the duplicates are not — they are delivered exactly once per reconnect cycl..."
  },
  "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": "aec9e5a5aa8fc56c0b59584d912ee2b651d916d2393edf4f818715e45bc5f8ba",
    "verified_classes": [
      "InvalidResumptionError",
      "StreamResumptionGuard"
    ],
    "verified_functions": [
      "__init__",
      "observe_event",
      "build_resume_headers",
      "interpret_resume_response"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "InvalidResumptionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
