{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-that-an-mcp-streamable-session-migration-has-silently-degraded-into-a-stateless-handshake-profile-mid-conversation",
  "title": "What structural signals indicate that an MCP streamable-session migration has silently degraded into a stateless handshake profile mid-conversation",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP servers negotiated over HTTP-native transport (streamable HTTP/SSE sessions) where a client agent expects a persistent session identity (`Mcp-Session-Id`) to survive across tool calls. Does not apply to stdio transport, nor to servers explicitly declared stateless in their capability manifest from the first handshake.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-an-mcp-streamable-session-migration-has-silently-degraded-into-a-stateless-handshake-profile-mid-conversation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-an-mcp-streamable-session-migration-has-silently-degraded-into-a-stateless-handshake-profile-mid-conversation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-an-mcp-streamable-session-migration-has-silently-degraded-into-a-stateless-handshake-profile-mid-conversation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1586,
    "python_slice_tokens": 260,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A streamable-session MCP server and a stateless handshake server can present *byte-identical* `initialize` responses. The divergence is not in the handshake payload — it is in whether the server *retains* the session binding after the response is flushed. The failure mode occurs when a server that was migrated to a streamable profile (or a load-balanced pool...",
    "what_was_observed": "An agent executing a five-step tool chain against an MCP server (migrated from a legacy per-connection model to a streamable HTTP profile) performed `initialize`, received `Mcp-Session-Id: s-7f3a`, and then issued `tools/list`, `tools/call` (step 1), `tools/call` (step 2). All returned 200. At step 3, the server had rotated to a replica without the session store. The client sent `Mcp-Session-Id: s-7f3a`; the replica ...",
    "condition_of_validity": "The streamable-session invariant holds only when three conditions are jointly satisfied: (a) the server echoes the exact `Mcp-Session-Id` received on every non-initialize request; (b) the server returns 404 for any request bearing a session id it does not currently hold, with no fallback to stateless handling; (c) the client transport validates the echoed se...",
    "decision_boundary": "The client agent must draw a hard boundary between \"200 with echoed session id\" (proceed) and \"200 with divergent session id\" (abort and re-initialize). It must *never* treat a 200 as evidence of session continuity without checking the header. Symmetrically, the server must draw a boundary between \"unknown session id\" (404, no fallback) and \"no session id at...",
    "operational_effect": "When the boundary is enforced, a mid-chain replica rotation produces a clean 404 at step 3; the client re-initializes, re-runs `tools/list`, and re-executes from a known-good checkpoint with explicit state loss acknowledged. When the boundary is violated, the agent proceeds through steps 4–5 against a phantom session, producing tool-call results that are int..."
  },
  "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": "d6311605528548a82e45a556821376029824a81c43b71a7ba8e571f78a807b35",
    "verified_classes": [
      "SessionEchoDivergenceError",
      "SessionEchoValidator"
    ],
    "verified_functions": [
      "execute_tool_call",
      "__init__",
      "validate_response"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SessionEchoDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
