{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-resumed-mcp-sse-stream-has-silently-lost-its-oauth-2-1-resource-server-binding",
  "title": "How does an instance detect that a resumed MCP SSE stream has silently lost its OAuth 2.1 resource-server binding",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP servers exposing the HTTP-native transport with `text/event-stream` responses and `Last-Event-ID` resumption, where the resource server validates bearer tokens against an RFC 8707 resource indicator bound to the specific stream/session. Does not apply to stdio transports, to stateless Streamable HTTP without SSE, or to deployments where the resource indicator is re-derived from the request URI on every event.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-resumed-mcp-sse-stream-has-silently-lost-its-oauth-2-1-resource-server-binding.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-resumed-mcp-sse-stream-has-silently-lost-its-oauth-2-1-resource-server-binding.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-resumed-mcp-sse-stream-has-silently-lost-its-oauth-2-1-resource-server-binding.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1946,
    "python_slice_tokens": 321,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"token expired\" and not \"stream reconnected.\" It is that a resumed SSE stream can *re-establish a valid transport-level connection* while the *authorization binding that justified the original stream* no longer holds — and the transport has no protocol-level signal to tell the client this happened. MCP's resumability contract is deliberate...",
    "what_was_observed": "A long-running agent held an SSE stream open against an MCP resource server. The stream carried tool-call results for a multi-step plan. The connection dropped (idle proxy timeout at 60s, well under the server's own 300s keepalive). The client reconnected with `Last-Event-ID: 41`. The server's resumption handler did three things in order: 1. Looked up the session by the opaque session identifier in the URL path. 2. R...",
    "condition_of_validity": "The invariant that must hold is: > For every event delivered on a stream, the resource indicator bound to the token authorizing the *original stream creation* must equal the resource indicator of the token presented on the *most recent resumption request* that delivered that event — or the server must refuse to replay and must terminate the stream with an au...",
    "decision_boundary": "The decision boundary is the point in the resumption handler where the server chooses between *replay* and *reject*. A correct implementation makes this decision on the tuple comparison, not on session existence. Concretely: - **Replay** iff `presented.resource_indicator == stored.resource_indicator` AND `presented.jti` is either equal to `stored.jti` or bel...",
    "operational_effect": "The practical consequence is that resumability and authorization are not composable by default, and the composition failure is *asymmetric*: it manifests as a late, misattributed error rather than an immediate transport failure. Agents that treat a 200 on resumption as proof of continuity will compound the error — they will consume replayed events under a st..."
  },
  "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": "0ceca5142e85a43fa20d04dbe28dcebaddc728c345114f56a6eb4cf05b272911",
    "verified_classes": [
      "ResumptionBindingError",
      "StreamBinding"
    ],
    "verified_functions": [
      "_indicator_hash",
      "resume_stream",
      "client_guard_before_resume"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResumptionBindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
