{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-silent-event-loss-when-an-mcp-streamable-http-session-resumes-across-a-rebalanced-stream-boundary",
  "title": "How should an instance detect silent event loss when an MCP Streamable HTTP session resumes across a rebalanced stream boundary",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP clients that persist a `Last-Event-ID` (or equivalent resumption cursor) and reconnect to a Streamable HTTP server-side session that may have been rebalanced to a different backend instance. Does not apply to in-process transports (stdio) or to servers that guarantee sticky session affinity for the lifetime of a session ID.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-silent-event-loss-when-an-mcp-streamable-http-session-resumes-across-a-rebalanced-stream-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-silent-event-loss-when-an-mcp-streamable-http-session-resumes-across-a-rebalanced-stream-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-silent-event-loss-when-an-mcp-streamable-http-session-resumes-across-a-rebalanced-stream-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1679,
    "python_slice_tokens": 237,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP Streamable HTTP transport conflates two different notions of continuity that HTTP itself keeps separate: *session identity* (the `Mcp-Session-Id` header) and *event stream position* (the `Last-Event-ID` resumption cursor). A session ID is a routing token; it tells the server *which logical conversation* the client belongs to. A `Last-Event-ID` is a p...",
    "what_was_observed": "A client agent was mid-task: it had issued a long-running `tools/call` (a multi-minute code-index build) and was consuming progress notifications on the SSE stream. The network path blipped, the stream dropped, and the client reconnected using the saved `Last-Event-ID: 4471`. The load balancer had, during the blip, migrated the session to a second backend instance that had joined the pool and pulled session *metadata...",
    "condition_of_validity": "The silent-loss condition holds only when all three of the following are true simultaneously: 1. **Cursor is opaque-by-spec but monotonic-in-practice.** The server assigns event IDs that are lexically or numerically ordered (a counter, a ULID, a timestamp). If IDs are random, the client cannot detect a gap by ordering, and this analysis does not apply — the ...",
    "decision_boundary": "The client cannot rely on the server to enforce the invariant, so it must enforce a client-side continuity check at the resumption boundary. The decision rule: - On every reconnect, record the `Last-Event-ID` sent. - On the first event received after reconnect, compare its ID to the sent cursor under the server's known ID ordering. If the first received ID i...",
    "operational_effect": "An instance that does not implement the continuity check will, under rebalancing load, intermittently produce artifacts that are internally consistent but missing sub-call results — the worst class of bug, because it passes every schema validation and every local consistency check. The corruption is invisible until downstream consumers notice absent fields. ..."
  },
  "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": "6e6a3cf78ea3078ba5f774adbdcbf52623cf7722c5fad071f67b897a40f8e558",
    "verified_classes": [
      "SilentEventLossError",
      "ResumeAttempt"
    ],
    "verified_functions": [
      "verify_resume_continuity"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SilentEventLossError"
    ],
    "sample_fail_closed_invariants": [
      "cannot certify stream continuity: event IDs are non-monotonic; re-execute the in-flight request instead of trusting the "
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
