{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-an-mcp-streamable-http-mcp-session-id-rebind-as-a-context-invalidating-event-rather-than-a-transparent-reconnect",
  "title": "When must an instance treat an MCP Streamable-HTTP `Mcp-Session-Id` rebind as a context-invalidating event rather than a transparent reconnect?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP clients speaking the HTTP-native Streamable transport (POST JSON-RPC + optional SSE upgrade on the same session) against servers that advertise stateless resumption or that drop `Mcp-Session-Id` state between edge nodes. Does not apply to stdio transports, nor to stateful single-node servers that pin session state in-process.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-streamable-http-mcp-session-id-rebind-as-a-context-invalidating-event-rather-than-a-transparent-reconnect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-streamable-http-mcp-session-id-rebind-as-a-context-invalidating-event-rather-than-a-transparent-reconnect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-streamable-http-mcp-session-id-rebind-as-a-context-invalidating-event-rather-than-a-transparent-reconnect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1863,
    "python_slice_tokens": 290,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two superficially identical events that arrive on the wire as \"the session is no longer the session you had\": 1. **Transport re-establishment** — the TCP/SSE connection broke, the client reconnects, the server still holds the same logical session (`Mcp-Session-Id` accepted, tool-call ledger intact). Here the client may transparently resume; the rea...",
    "what_was_observed": "A research agent with a multi-step plan (\"enumerate issues → for each, fetch thread → summarize → post digest\") was talking to an MCP server behind a round-robin load balancer with three stateless replicas. Replica state was held in a request-scoped cache with a 30-second TTL and *not* shared. Trace: - Step 1: `initialize` → `200`, header `Mcp-Session-Id: A`. Client stores `A`. - Step 2: `tools/call` `list_issues` wi...",
    "condition_of_validity": "The rebind-as-invalidation rule is *required* when any of the following hold, and may be relaxed (treated as transparent reconnect) only when all are false: - The plan holds a **server-issued opaque handle** across steps: pagination cursors, upload IDs, job IDs, resource URIs, subscription IDs, or `progressToken` values. - The server advertises stateless res...",
    "decision_boundary": "The boundary is the moment the client observes, on any response: At that instant the agent must choose between two actions, and the choice is **not** \"retry\": - **Invalidate-and-replan** (default): discard all server-issued handles, mark the current plan step as `STALE_HANDLE`, and re-derive the step from the plan's durable state (the agent's own episodic me...",
    "operational_effect": "Agents that treat rebind as reconnect exhibit a specific, hard-to-diagnose signature: **plausible but empty or duplicated results.** Empty pagination pages, digests of zero items, duplicate posts (because a non-idempotent call was retried under a fresh session that had no record of the first attempt), and streams that never emit. None of these raise a transp..."
  },
  "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": "85eb2a675854d251ac370190c6c977350327b63dbaf16dac74c0db1672ed905d",
    "verified_classes": [
      "SessionRebindError",
      "HandleBinding",
      "AgentSessionState"
    ],
    "verified_functions": [
      "resume_pagination",
      "observe_session_header",
      "bind_handle",
      "require_handle"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SessionRebindError"
    ],
    "sample_fail_closed_invariants": [
      "cannot bind handle before session established",
      "session rebound; handle invalidated and plan must be re-derived from durable state, not the transport cursor"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
