{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-tool-authority-when-an-mcp-streamable-http-session-resumes-across-a-re-issued-oauth-2-1-access-token",
  "title": "Why does an instance lose tool authority when an MCP Streamable HTTP session resumes across a re-issued OAuth 2.1 access token",
  "date_of_record": "2026 November 23",
  "scope": "Applies to MCP clients/servers using Streamable HTTP transport with `Mcp-Session-Id` resumption and OAuth 2.1 resource-bound bearer tokens, where the authorization server may rotate access tokens mid-session. Does not apply to stdio transport, nor to sessions whose tokens never expire or rotate within a session lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-tool-authority-when-an-mcp-streamable-http-session-resumes-across-a-re-issued-oauth-2-1-access-token.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-tool-authority-when-an-mcp-streamable-http-session-resumes-across-a-re-issued-oauth-2-1-access-token.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-tool-authority-when-an-mcp-streamable-http-session-resumes-across-a-re-issued-oauth-2-1-access-token.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1968,
    "python_slice_tokens": 409,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not token expiry and it is not session expiry. It is the *decoupling* of two independently-rotating identifiers that the transport assumes are bound but never enforces on resume: - **Session authority**: the `Mcp-Session-Id` header, which the server uses to look up per-session server-side state (subscriptions, in-flight SSE streams, negotiated...",
    "what_was_observed": "A client agent held a session `S` created at T0 with token `A` (aud=`https://mcp.example.com/v1`, scope `tools:read tools:write`). At T+40m the SSE stream for a long-running `execute_sql` tool call dropped (idle proxy timeout). At T+41m the client's token store rotated to token `B` (aud=`https://mcp.example.com`, scope `tools:read` — the AS canonicalized the resource URI by stripping the version path and the write sc...",
    "condition_of_validity": "The invariant that *should* hold: **a session's resource binding is a function of the current request's token, re-validated on every resume, not a property frozen at session creation.** The failure occurs precisely when a server caches `session.resource` and `session.scope` at creation and uses them as the authoritative binding for resumed requests, treating...",
    "decision_boundary": "The architectural guardrail is a **binding-equivalence check at resume time** with a defined divergence policy: 1. On every request carrying `Mcp-Session-Id`, recompute the effective authority tuple `(aud, scope_set, jti)` from the presented token. 2. Compare against the session's stored tuple. Define three outcomes: - **Equal** → proceed, replay buffered ev...",
    "operational_effect": "The observable signature in logs is a **401-free authority loss**: the session stays `active`, the token stays `valid`, and tool calls fail with application-level errors whose rate correlates with token rotation events rather than with token expiry. Agents that key their retry logic on HTTP status codes will loop indefinitely; agents that key on JSON-RPC err..."
  },
  "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": "97e320a20d7e0e6ab6e88251bf2ad003ece303ef49acd5d05c92b25c7d5fa92d",
    "verified_classes": [
      "BindingDivergenceError",
      "Authority",
      "Session",
      "StreamableHTTPSessionRegistry"
    ],
    "verified_functions": [
      "__init__",
      "create",
      "resume",
      "_replay"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "BindingDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
