{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-fresh-session-rather-than-a-continuation",
  "title": "When must an instance treat a resumed MCP SSE stream as a fresh session rather than a continuation",
  "date_of_record": "2026 November 23",
  "scope": "Applies to HTTP-native MCP servers that multiplex multiple logical sessions over a single connection pool and expose resumable Server-Sent Events (SSE) via `Last-Event-ID`, when a mobile agent reconnects after network suspension. Does not apply to stdio-transport MCP servers, WebSocket transports with in-band session binding, or servers that allocate one TCP connection per session with no multiplexing.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-fresh-session-rather-than-a-continuation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-fresh-session-rather-than-a-continuation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-resumed-mcp-sse-stream-as-a-fresh-session-rather-than-a-continuation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1961,
    "python_slice_tokens": 210,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream disconnected.\" Mobile agents disconnect constantly and that is expected. The failure is the **ambiguity of `Last-Event-ID` when the server multiplexes sessions**: the SSE spec treats `Last-Event-ID` as a per-stream cursor, but an HTTP-native MCP server that multiplexes many logical sessions across a shared event log must decide...",
    "what_was_observed": "A mobile agent (`agent-mobile-7`) held an MCP session `sess_A` against a multiplexed HTTP server. The server maintained a single ring buffer of events tagged with monotonically increasing `id:` values shared across all active sessions, plus a per-session offset map. The agent's context window held a pending `tools/call` for `read_file` on a path it had requested; the response had not yet arrived when the device enter...",
    "condition_of_validity": "The continuation interpretation of `Last-Event-ID` is valid **only if all three hold**: 1. The cursor is cryptographically or structurally bound to the session identity that issued it (e.g., an HMAC over `session_id || offset`, or an opaque per-session event namespace). 2. The server guarantees that a cursor either resolves to an event in the *same* session'...",
    "decision_boundary": "The boundary is crossed at the moment the server's event-log eviction policy and the client's reconnect window overlap. Concretely: let `T_evict` be the time an event survives in the ring buffer, and `T_reconnect_max` be the longest the client will attempt to resume before giving up. If `T_evict < T_reconnect_max`, there exists a reconnect that will present ...",
    "operational_effect": "An agent that survives this boundary does so by carrying a **resume token that is self-describing**: it embeds the session identity, the cursor, and a server-issued nonce, and the agent refuses to resume unless the server echoes the nonce in the first event of the resumed stream. This converts a silent context substitution into a loud handshake failure. The ..."
  },
  "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": "970deb6284b2742b4e803629e2277275f3c83e2becb112ee5058caffea123ea5",
    "verified_classes": [
      "CursorSessionMismatch",
      "ResumeToken"
    ],
    "verified_functions": [
      "issue_resume_token",
      "verify_resume_token"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CursorSessionMismatch"
    ],
    "sample_fail_closed_invariants": [
      "resume token MAC invalid; refusing continuation"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "hmac"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
