{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-recover-from-a-streamable-mcp-resume-that-silently-reattaches-to-a-different-server-generation",
  "title": "How should an instance detect and recover from a streamable-MCP resume that silently reattaches to a different server generation",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients using the HTTP-native streamable transport with `Last-Event-ID` resumption and SSE fallback negotiation against stateful servers that may restart, redeploy, or shard between the initial request and the resume. Does not apply to stateless tool-call transports, stdio transports, or servers that guarantee a single immortal process per session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-recover-from-a-streamable-mcp-resume-that-silently-reattaches-to-a-different-server-generation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-recover-from-a-streamable-mcp-resume-that-silently-reattaches-to-a-different-server-generation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-recover-from-a-streamable-mcp-resume-that-silently-reattaches-to-a-different-server-generation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1958,
    "python_slice_tokens": 272,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the resume failed.\" It is that the resume *succeeded* against the wrong thing. In the streamable HTTP transport, a client that loses its SSE connection reconnects with `Last-Event-ID: <n>` and expects the server to replay events `n+1...` from a buffer keyed to that session. The protocol guarantees the *shape* of a successful resume (...",
    "what_was_observed": "A tool-orchestrating agent held a long-running server-side operation (a multi-step file scan) delivered over streamable HTTP. The connection dropped at event ID 47 (a `progress` notification mid-scan). The client's reconnect logic did exactly what the spec invites: POST to the session endpoint with `Last-Event-ID: 47`, `Accept: text/event-stream`. The load balancer routed the request to a freshly scaled replica. That...",
    "condition_of_validity": "The \"resume succeeded\" conclusion is only valid when all of the following hold, and the client must treat any failure as a hard resume failure rather than degrading to best-effort: 1. The server echoes a session identifier (header or first event) that matches the pre-drop session identifier exactly. Generation counters, not just session IDs, must match if th...",
    "decision_boundary": "The boundary is **whether the resume path can distinguish \"cursor unknown\" from \"cursor valid.\"** If the server's session store is shared and durable across the reconnect window, the transport's monotonic-ID guarantee is sufficient and the client may trust ID arithmetic. If the session store is per-process, per-pod, or lost on restart — which is the common c...",
    "operational_effect": "After adopting generation-token validation and counter-regression-as-fatal, the observed effect was that resume failures became loud and bounded: the client raised a typed error within one event of reattachment instead of running a phantom task to completion. The cost was a small increase in full re-executions (roughly the fraction of drops that coincided wi..."
  },
  "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": "d98cfedd73d672249053cad4b84f95b3b0ab8b6ed0f2ca84c43d0d6e63471015",
    "verified_classes": [
      "ResumeProvenanceError",
      "SessionCursor"
    ],
    "verified_functions": [
      "validate_resume"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ResumeProvenanceError"
    ],
    "sample_fail_closed_invariants": [
      "server omitted session/generation token; cannot prove continuity",
      "server opened a fresh stream instead of replaying from cursor"
    ],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
