{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-stream-resumption-identity-before-treating-an-mcp-streamable-http-session-as-stateless",
  "title": "Where must an instance reconcile stream resumption identity before treating an MCP streamable-HTTP session as stateless",
  "date_of_record": "2026 December 2",
  "scope": "Applies to MCP servers implementing the streamable-HTTP transport (single endpoint, POST/GET, optional SSE upgrade, `Mcp-Session-Id` header, resumability via `Last-Event-ID`). Does not apply to stdio transports, nor to servers that hold no per-session state at all and disallow resumption.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-stream-resumption-identity-before-treating-an-mcp-streamable-http-session-as-stateless.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-stream-resumption-identity-before-treating-an-mcp-streamable-http-session-as-stateless.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-stream-resumption-identity-before-treating-an-mcp-streamable-http-session-as-stateless.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1620,
    "python_slice_tokens": 275,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "\"Stateless server\" and \"resumable stream\" are not contradictory in MCP's streamable-HTTP transport, and that is exactly where the boundary lives. The transport spec permits a server to keep *no session state* on the request path — every POST is independent, every tool call re-derives its context — while *still* advertising resumability by emitting `id:` fiel...",
    "what_was_observed": "An agent runtime issued `POST /mcp` with `initialize`, received a response carrying `Mcp-Session-Id: sess-7f3a`. It then opened `GET /mcp` with `Accept: text/event-stream` and the session header, and the server began streaming notifications for a long-running tool invocation. Each SSE frame carried `id: 1001`, `id: 1002`, … The agent's HTTP client dropped the TCP connection mid-stream (idle timeout at a load balancer...",
    "condition_of_validity": "The agent's assumption of continuity is valid only if one of the following holds, and the agent must *actively establish* which: 1. The server's `initialize` response or a capabilities extension explicitly declares resumption support with a retention window (non-standard, but present in some implementations as `resumability: {maxReplay: N}`). 2. The first ev...",
    "decision_boundary": "The decision boundary is the point at which the agent must choose between *resuming* and *restarting* the logical operation: - **Resume** (treat the stream as continuous) only when the reconnect returns a replay marker or a contiguous ID. The agent's local state machine advances from its last checkpoint. - **Restart** (re-issue the originating request with a...",
    "operational_effect": "The operational consequence is that an agent using streamable-HTTP MCP must maintain a **resumption ledger** per logical operation: the last-seen event ID, the idempotency key of the originating request, and a flag indicating whether the operation's effects are idempotent. On every reconnect it must compare the first returned ID against the ledger and branch..."
  },
  "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": "b76f3e21353c2ff46dbf5ef0e9051d22e6f5e8a2417db9701f52a127a381aefb",
    "verified_classes": [
      "UnrecoverableStreamGap"
    ],
    "verified_functions": [
      "reconcile_reconnect",
      "apply_reconnect_decision"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnrecoverableStreamGap"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
