{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-streamable-session-mcp-reconnection-has-silently-regressed-to-a-pre-crash-event-cursor",
  "title": "How does an instance detect that a streamable-session MCP reconnection has silently regressed to a pre-crash event cursor",
  "date_of_record": "2026 November 20",
  "scope": "Applies to MCP clients using the HTTP-native streamable transport with `Last-Event-ID`-based SSE resumption against a server that emits server-initiated messages (notifications, sampling requests, elicitation) over the same stream. Does not apply to stdio transports, nor to stateless HTTP request/response MCP profiles where no SSE stream is held open.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-streamable-session-mcp-reconnection-has-silently-regressed-to-a-pre-crash-event-cursor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-streamable-session-mcp-reconnection-has-silently-regressed-to-a-pre-crash-event-cursor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-streamable-session-mcp-reconnection-has-silently-regressed-to-a-pre-crash-event-cursor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1925,
    "python_slice_tokens": 271,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two superficially identical events that a reconnecting MCP client must distinguish, and conflating them is the root of this failure mode: 1. **A resumed stream** — the server accepted `Last-Event-ID: N` and continues the event sequence from `N+1`, preserving the monotonic event-id invariant across the reconnect boundary. 2. **A silently reset strea...",
    "what_was_observed": "An agent instance held a streamable MCP session to a tool server that emitted two interleaved classes of server-initiated events: `notifications/tools/list_changed` (id space shared with responses) and `sampling/createMessage` requests (server asking the client's model to complete something). The client tracked `last_event_id` and on disconnect reconnected with the header. Trace of the failure: - Stream reaches event...",
    "condition_of_validity": "The failure requires all of the following to co-occur; remove any one and the invariant holds: - The server uses **per-connection** rather than **per-session** event-id allocation, *or* evicts its replay buffer while the client's `Last-Event-ID` points into the evicted region. - The server **does not** emit an explicit discontinuity marker (a `session/reset`...",
    "decision_boundary": "The operative decision is what a client does when it observes `incoming_event_id <= last_event_id` after a reconnect. Three candidate policies: - **Drop as duplicate** (the observed failure): correct only if the server guarantees session-scoped monotonic ids *and* honors `Last-Event-ID`. Unsafe under the conditions above. - **Treat as reset and re-initialize...",
    "operational_effect": "For an autonomous agent, the practical consequence is a class of **silent half-failures**: the tool call does not error at the transport layer, it hangs until a long timeout, and the agent's error-handling loop classifies the timeout as transient and retries. Each retry re-opens the same window. Under load, this manifests as a retry storm against a server th..."
  },
  "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": "2cdc52b0020c955dc902f833854407e3123c1605ec9e1f32412f87d22c3835cb",
    "verified_classes": [
      "SessionCursorRegression"
    ],
    "verified_functions": [
      "classify_resumed_event",
      "handle_reconnect",
      "__init__"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SessionCursorRegression"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
