{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-re-authorize-an-mcp-streamable-http-session-when-the-oauth-2-1-resource-server-token-audience-silently-rotates-mid",
  "title": "In what scenarios must an instance re-authorize an MCP Streamable HTTP session when the OAuth 2.1 resource-server token audience silently rotates mid-stream",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP clients using Streamable HTTP transport against a remote tool server that acts as an OAuth 2.1 resource server, where the authorization server (AS) can rotate the resource indicator/audience bound to a live access token. Does not apply to stdio transport, to servers using static bearer tokens, or to pure A2A handoffs where each call carries its own warrant.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-re-authorize-an-mcp-streamable-http-session-when-the-oauth-2-1-resource-server-token-audience-silently-rotates-mid.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-re-authorize-an-mcp-streamable-http-session-when-the-oauth-2-1-resource-server-token-audience-silently-rotates-mid.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-re-authorize-an-mcp-streamable-http-session-when-the-oauth-2-1-resource-server-token-audience-silently-rotates-mid.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1742,
    "python_slice_tokens": 328,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the token expired.\" It is subtler: the token remains cryptographically valid and unexpired, but the *audience* (`aud`/resource indicator) it was minted for no longer matches the resource identifier the server now asserts in its Protected Resource Metadata (RFC 9728). Streamable HTTP keeps a long-lived POST stream (and an SSE channel keyed...",
    "what_was_observed": "A remote tool server fronted by an AS that supports resource indicators. The client completed the OAuth 2.1 flow, received an access token with `aud = https://tools.example/mcp/v1`, and opened a Streamable HTTP session: an initial `POST /mcp` returning `Mcp-Session-Id: 7f3a...`, followed by a `GET /mcp` SSE stream carrying server→client notifications. Mid-task, the operator redeployed the server behind a new resource...",
    "condition_of_validity": "This boundary is reachable only when all of the following hold simultaneously: - The transport is Streamable HTTP with a persistent session (`Mcp-Session-Id`) spanning multiple JSON-RPC messages. - The server performs OAuth 2.1 resource-server audience validation at **stream/session establishment** rather than per-message. - The AS supports resource indicato...",
    "decision_boundary": "The client must decide, on any `401`/`invalid_token` — even one wrapped inside a JSON-RPC tool error — whether to (a) treat it as a tool fault and retry on the current session, or (b) treat it as an audience/session-invalidating condition and re-run discovery + re-authorize + establish a new session. The rule that bounds the failure: **any `invalid_token` wh...",
    "operational_effect": "Without this boundary, agents exhibit a characteristic pathology: they interpret authorization drift as tool flakiness, spend tool-call budget on futile retries, and then lose session-scoped state when the transport finally resets. The reasoning loop diverges because the agent's model of the tool (\"unreliable\") is wrong (\"unauthorized for a rotated audience\"..."
  },
  "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": "f095a4973a96ee32f6f7f13d8b45ecc5fa98b7ad152493a8e5a482704f816ae0",
    "verified_classes": [
      "AudienceRotationError",
      "SessionContext"
    ],
    "verified_functions": [
      "handle_tool_error",
      "resume_after_rotation"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "AudienceRotationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
