{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-an-mcp-resumable-sse-last-event-id-as-unbound-after-an-oauth-2-1-token-rotation",
  "title": "When must an instance treat an MCP resumable SSE `Last-Event-ID` as unbound after an OAuth 2.1 token rotation?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP servers exposed over HTTP-native transport (Streamable HTTP / resumable SSE) that act as OAuth 2.1 resource servers and issue `Last-Event-ID`-resumable event streams to a client instance. Does not apply to stdio transport, to stateless one-shot request/response MCP endpoints, or to stream resumption where the client re-authenticates with the identical token binding.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-resumable-sse-last-event-id-as-unbound-after-an-oauth-2-1-token-rotation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-resumable-sse-last-event-id-as-unbound-after-an-oauth-2-1-token-rotation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-resumable-sse-last-event-id-as-unbound-after-an-oauth-2-1-token-rotation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2174,
    "python_slice_tokens": 387,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the token expired\" and it is not \"the stream dropped.\" It is the collision of two independent continuity mechanisms that each assume they own the identity of the resumed session: - The **SSE resumption layer** treats `Last-Event-ID` as a monotonic cursor into a server-side event log, keyed by a `stream_id` that the server minted at stream...",
    "what_was_observed": "A deployment of an MCP server exposing a `stream_events` tool over Streamable HTTP. Sequence observed in server logs, reproduced three times: 1. Client opens `GET /mcp` with `Authorization: Bearer A`, `Accept: text/event-stream`. Server mints `stream_id=s_7f3`, records `binding = hash(sub_A, client_id_A, aud, s_7f3)`, and emits events `id: 100 … id: 142`. Each event payload is scoped to `sub_A`'s tenant. 2. Network p...",
    "condition_of_validity": "The invariant that must hold for resumption to be safe: > A `Last-Event-ID` cursor is resumable under a presented bearer token **iff** the tuple `(issuer, sub, client_id, aud, granted_scope_set)` of the presented token is a superset-compatible match of the tuple recorded at stream open, *and* the `stream_id` was minted for that exact tuple. Formally, let `B_...",
    "decision_boundary": "The server must make an explicit, logged decision at every resume. The boundary is: - **Resume** if `B_now` binding-equals `B_open` and `S_open ⊆ S_now`. Replay from the cursor within the caller's partition. - **Reject with `409 Conflict` + `WWW-Authenticate: Bearer error=\"invalid_token\", error_description=\"binding_changed\"`** if the binding tuple differs. D...",
    "operational_effect": "Without this boundary, three failure classes appear in production: 1. **Cross-principal event replay** (the `sub` change case). Silent, high-severity, and invisible to both the client and the server's happy-path logs because every individual check passed. 2. **Scope-downgrade over-replay** (the `S_open ⊄ S_now` case). The resource server violates its own aut..."
  },
  "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": "45c0e0f369bf00589025cb81ed10c2157f27b7fa04ab29b773d1c470058437f0",
    "verified_classes": [
      "BindingResumptionError",
      "TokenBinding",
      "StreamRecord",
      "ResumableStreamRegistry"
    ],
    "verified_functions": [
      "_partition_key",
      "resume_or_fail",
      "identity",
      "__init__",
      "open",
      "resume"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "BindingResumptionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
