{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-an-mcp-streamable-sse-session-after-the-oauth-2-1-access-token-that-bound-the-session-has-been-rotated",
  "title": "What happens when an instance resumes an MCP streamable-SSE session after the OAuth 2.1 access token that bound the session has been rotated",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP servers using the HTTP-native \"streamable HTTP\" transport with SSE resumption (`Last-Event-ID` replay) where the session is authorized under an OAuth 2.1 resource-server binding (RFC 8707 audience-bound tokens). Does not apply to stdio transports, nor to sessionless stateless MCP deployments that re-authenticate per request.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-streamable-sse-session-after-the-oauth-2-1-access-token-that-bound-the-session-has-been-rotated.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-streamable-sse-session-after-the-oauth-2-1-access-token-that-bound-the-session-has-been-rotated.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-streamable-sse-session-after-the-oauth-2-1-access-token-that-bound-the-session-has-been-rotated.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2073,
    "python_slice_tokens": 403,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"token expired, request rejected.\" That is the easy, observable case. The failure is that the **session identity and the token identity are decoupled by design**, and resumption replay is keyed on `Last-Event-ID` (a session-scoped cursor) while authorization is keyed on the access token (a bearer credential with its own lifetime and audien...",
    "what_was_observed": "A streamable-HTTP MCP server issued a session on `POST /mcp` with `Mcp-Session-Id: s-7f3a`. The client opened an SSE stream (`GET /mcp` with `Accept: text/event-stream`, `Mcp-Session-Id: s-7f3a`) and received events `e-1 … e-40`, with the server buffering them for replay. The stream dropped at `e-40`. The client's access token `T1` (audience `https://mcp.example.com`, `sub=agent-A`, `scope=tools:read tools:write`) ex...",
    "condition_of_validity": "This boundary is reachable only when all of the following hold simultaneously, which is why it hides: 1. The transport is streamable HTTP with a server-side replay buffer (not a live-only SSE stream). Without a buffer, `Last-Event-ID` has nothing to replay. 2. The OAuth 2.1 resource-server binding uses audience-restricted tokens (RFC 8707) but the session st...",
    "decision_boundary": "The server must choose, on every resume request, between two policies: - **Strict binding:** replay is permitted only if the presenting token's `(sub, aud, scope)` is a *superset* of the tuple recorded at session creation, and the session record stores that tuple. A downgraded or re-scoped token triggers a `403` with `WWW-Authenticate` indicating step-up, an...",
    "operational_effect": "Without the guardrail, the observable effect is **silent authorization regression across a resume**: an agent that rotated to a narrower token re-ingests broader-scoped historical tool results, and its subsequent reasoning is conditioned on state it is no longer entitled to act on. This manifests not as an error but as *plausible-but-unauthorized* behavior —..."
  },
  "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": "6adec9ff2276aea93c21a886cd5ea63ab182c6d559b6e89ac1e2d346e771350c",
    "verified_classes": [
      "SessionAuthorizationMismatch",
      "TokenContext",
      "SessionRecord"
    ],
    "verified_functions": [
      "resume_session"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SessionAuthorizationMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
