{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-an-mcp-sse-session-against-a-streamable-http-server-that-has-already-garbage-collected-the-session-id",
  "title": "What happens when an instance resumes an MCP SSE session against a Streamable-HTTP server that has already garbage-collected the session ID",
  "date_of_record": "2026 December 3",
  "scope": "Applies to MCP clients that persist a `Mcp-Session-Id` from an HTTP+SSE transport (`GET /sse`) and later attempt to resume against a server migrated to Streamable HTTP (`POST /mcp`). Does not cover in-process stdio transports or servers that retain session state indefinitely.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-sse-session-against-a-streamable-http-server-that-has-already-garbage-collected-the-session-id.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-sse-session-against-a-streamable-http-server-that-has-already-garbage-collected-the-session-id.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-sse-session-against-a-streamable-http-server-that-has-already-garbage-collected-the-session-id.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2833,
    "python_slice_tokens": 486,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The SSE transport and the Streamable HTTP transport both carry a session identifier, but they disagree on what that identifier *means* at the moment of a resume attempt. In SSE, the session ID is a *subscription handle*: the client holds an open `EventSource` and the ID is bound to that live TCP connection. If the connection drops, the client reconnects with...",
    "what_was_observed": "A remote tool server (call it `toolsvc`) was migrated from `GET /sse` to `POST /mcp` behind a feature flag. A long-running agent instance had been initialized against `toolsvc` over SSE roughly 40 minutes earlier, had received `Mcp-Session-Id: sess-7f3a...` via the SSE `endpoint` event, and had that ID persisted in its checkpoint store alongside its task state. The migration rolled the server. On the next tool call, ...",
    "condition_of_validity": "The failure requires all of the following to co-occur: 1. The client persists `Mcp-Session-Id` in durable state (checkpoint, task store, or process memory that survives a transport adapter swap). 2. The server's session store is *not* durable across process restarts — i.e., sessions live in memory keyed by ID, and a roll or GC evicts them. 3. The client's re...",
    "decision_boundary": "The boundary is not \"should the client retry\" — it is **what the client does with the server's rejection before the reasoning loop sees it.** Two policies are defensible; the failure is picking neither. **Policy A — treat session rejection as a transport-layer re-handshake trigger.** On any `4xx` from `POST /mcp` where the response body or a well-known heade...",
    "operational_effect": "The immediate effect is a **duplicate tool execution** — the agent calls `send_email`, `charge_card`, or `write_file` twice, once under the stale session (which the server may have partially executed before the roll) and once under the fresh session. For read-only tools this is a wasted call; for mutating tools it is a correctness violation that the reasonin..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "0d7f1b64e29e0c8266eefb0bba63dd8a4c5648e2a5c71182505c791c8578ddb9",
    "verified_classes": [
      "StaleSessionError",
      "TransportGenerationMismatch",
      "PersistedSession"
    ],
    "verified_functions": [
      "_build_fingerprint",
      "resume_session",
      "dispatch_tool_call"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StaleSessionError",
      "TransportGenerationMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
