{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-its-server-initiated-sse-backchannel-when-an-mcp-streamable-session-resumes-after-transport-level-reconnect",
  "title": "Why does an instance lose its server-initiated SSE backchannel when an MCP streamable-session resumes after transport-level reconnect",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP clients and servers using the HTTP-native \"streamable\" transport with `Mcp-Session-Id` resumption, where the server pushes notifications (resource updates, sampling requests, progress, logging) over a long-lived SSE backchannel. Does not apply to stdio transports or to pure request/response polling without a server-initiated channel.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-server-initiated-sse-backchannel-when-an-mcp-streamable-session-resumes-after-transport-level-reconnect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-server-initiated-sse-backchannel-when-an-mcp-streamable-session-resumes-after-transport-level-reconnect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-server-initiated-sse-backchannel-when-an-mcp-streamable-session-resumes-after-transport-level-reconnect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2187,
    "python_slice_tokens": 523,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **session identity** and **stream binding**. In the MCP streamable HTTP transport, a session is identified by the `Mcp-Session-Id` header and is logically durable across HTTP connections. The SSE backchannel, however, is a *physical* binding: a specific HTTP response body held open on a specific TCP connection, tied to...",
    "what_was_observed": "A tool-using agent held an MCP session against a server that emits `notifications/resources/updated` when a watched file changes, and `sampling/createMessage` when it needs the agent's model to summarize a diff. The client used streamable HTTP with automatic reconnect on socket close (idle timeout at a load balancer, 60s). Trace of the failure: 1. Agent opens session `S`, receives `Mcp-Session-Id: S`. Server register...",
    "condition_of_validity": "The invariant that must hold for streamable-session resumption to be correct is: > **After any successful resume, the session's dispatch target for server-initiated messages must be the writer bound to the most recent accepted response stream, and every prior writer for that session must be marked terminal.** This invariant is *not* implied by the spec's res...",
    "decision_boundary": "The boundary an operator must decide on is **whether to treat the backchannel as resumable state or as disposable transport**. Two coherent policies, and the failure lives in the incoherent middle: - **Disposable backchannel (recommended for most deployments):** On resume, the server *tears down* the old writer unconditionally, rebinds the session to the new...",
    "operational_effect": "Concretely, on the agent side, the guardrail is a **post-resume reconciliation barrier**: after any reconnect that returns a new stream, the agent must (1) invalidate any cache populated by server-initiated notifications, (2) issue an explicit read/probe for each resource it depends on, and (3) start a watchdog timer for expected `sampling/createMessage` res..."
  },
  "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": "6de5cd626553dc221028c71d0e91d88ceafd19d0588c786cbfd054ca94a4af48",
    "verified_classes": [
      "BackchannelOrphanedError",
      "StaleCacheError",
      "SSEWriter",
      "Session"
    ],
    "verified_functions": [
      "reconcile",
      "sampling_watchdog",
      "demo",
      "write",
      "attach",
      "emit",
      "resume"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "BackchannelOrphanedError",
      "StaleCacheError"
    ],
    "sample_fail_closed_invariants": [
      "assert s.cache['file:///watched'] == 'fresh-content'"
    ],
    "stdlib_dependencies": [
      "asyncio",
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
