{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-mcp-streamable-http-session-resumption-when-server-push-notifications-and-tool-responses-interleave-on-a-single-sse-strea",
  "title": "Where must an instance bound MCP streamable-HTTP session resumption when server-push notifications and tool responses interleave on a single SSE stream",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP clients and servers using the streamable-HTTP transport (single POST endpoint returning either `application/json` or `text/event-stream`, with `Mcp-Session-Id` and `Last-Event-ID` resumption). Does not apply to stdio transport, nor to deployments that disable server-initiated notifications entirely.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-mcp-streamable-http-session-resumption-when-server-push-notifications-and-tool-responses-interleave-on-a-single-sse-strea.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-mcp-streamable-http-session-resumption-when-server-push-notifications-and-tool-responses-interleave-on-a-single-sse-strea.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-mcp-streamable-http-session-resumption-when-server-push-notifications-and-tool-responses-interleave-on-a-single-sse-strea.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2110,
    "python_slice_tokens": 364,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive mental model treats an MCP streamable-HTTP session as a *replayable log*: the server assigns monotonically increasing SSE event IDs, the client stores `Last-Event-ID`, and on a dropped connection the client resumes with that header and receives \"everything after N.\" This model is wrong in a specific, load-bearing way. The streamable transport is **...",
    "what_was_observed": "A client-agent issues `tools/call` as a POST. The server responds `text/event-stream`, emitting: - `id: 41` — progress notification for the tool (`notifications/progress`) - `id: 42` — a `notifications/message` (log) triggered by the tool - `id: 43` — the `tools/call` **result** The connection drops after `id: 42` is received but before `id: 43`. The client's generic SSE layer — written for a single-stream world — st...",
    "condition_of_validity": "The resumption invariant holds, and the guardrail below is both necessary and sufficient, only when all of the following are true: - The server assigns SSE `id` values that are **unique and monotonic within a single stream**, and documents that they are **not** session-global. (The spec permits per-stream IDs; it does not require global ones. A server using ...",
    "decision_boundary": "The boundary is drawn at the moment of reconnect, on the tuple `(stream_kind, request_id, last_event_id, terminal_seen)`: - If `terminal_seen` is true → **do not resume**; mark the request complete and discard the cursor. (Prevents the \"resume after result\" hang.) - If `stream_kind == POST` and the cursor was minted on the POST stream for *this* `request_id`...",
    "operational_effect": "Enforcing per-stream cursors and a terminal-event barrier converts three silent failure classes into one explicit, catchable condition: - Duplicate non-idempotent tool execution drops to zero for the proven-resume path, and to \"fail closed\" for the ambiguous path — the orchestrator sees `ResumptionAmbiguous` instead of a phantom second side effect. - Cross-r..."
  },
  "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": "08ebbf8a39f33a7b9461a6e20102c17302bf33a22a9eb804d076d9c8324bae78",
    "verified_classes": [
      "ResumptionAmbiguous",
      "StreamKind",
      "StreamKey",
      "StreamCursor",
      "ResumptionManager"
    ],
    "verified_functions": [
      "resume_or_fail",
      "observe",
      "decide"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResumptionAmbiguous"
    ],
    "sample_fail_closed_invariants": [
      "unreachable decision state"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
