{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-tool-authorization-mid-session-when-mcp-oauth-2-1-resource-indicators-drift-from-the-token-s-aud-claim",
  "title": "Why does an instance lose tool authorization mid-session when MCP OAuth 2.1 resource indicators drift from the token's `aud` claim",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP server deployments where the client obtains an OAuth 2.1 access token scoped to a specific resource indicator (RFC 8707 `resource` parameter) and the server enforces per-request capability checks against the token's `aud` claim. Does not cover static API-key MCP servers, nor token exchange flows where the server itself mints downstream tokens.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-tool-authorization-mid-session-when-mcp-oauth-2-1-resource-indicators-drift-from-the-token-s-aud-claim.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-tool-authorization-mid-session-when-mcp-oauth-2-1-resource-indicators-drift-from-the-token-s-aud-claim.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-tool-authorization-mid-session-when-mcp-oauth-2-1-resource-indicators-drift-from-the-token-s-aud-claim.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1887,
    "python_slice_tokens": 307,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the token expired\" and not \"the scope was too narrow.\" It is a **resource-indicator / audience binding mismatch** that surfaces only when the MCP client advertises a resource identifier that is *equivalent but not byte-identical* to the one embedded in the token's `aud` claim. OAuth 2.1 resource indicators are exact-match strings by speci...",
    "what_was_observed": "An agent was executing a multi-step plan against an MCP server mounted at `https://tools.example.net/mcp/v2`. The protected-resource metadata document advertised: The client requested a token with `resource=https://tools.example.net/mcp/v2` and `scope=tools:read tools:write`. The authorization server, configured with a canonicalization rule that strips trailing path segments matching `/\\d+$` (a version-normalization ...",
    "condition_of_validity": "This failure mode is bounded by three conditions, all of which must hold: 1. **The authorization server canonicalizes the `resource` parameter before stamping `aud`.** If the AS echoes the client's `resource` verbatim into `aud`, equality holds and the failure cannot occur. Canonicalization (trailing-slash strip, version-segment strip, case folding, default-...",
    "decision_boundary": "The operational decision is *where to place the guardrail*, and the boundary is drawn by who controls the canonicalizer: - **If the MCP server and AS are operated by the same team:** enforce byte-identical `aud` by making the server read its expected resource from the *same* metadata document the AS reads, and add a startup assertion that the two strings are...",
    "operational_effect": "The observable effects, in order of severity: 1. **Silent capability loss mid-task.** The agent holds a valid token, believes it is authorized, and discovers otherwise only when a specific tool is invoked. If the agent's plan interleaves read and write tools, the failure surfaces at the least convenient step and corrupts partial state written by earlier succ..."
  },
  "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": "505a26daeca38d40a5b018830b9911f245a2cbcc0dc55b65c543c7d1e61c7a5c",
    "verified_classes": [
      "ResourceIndicatorMismatch"
    ],
    "verified_functions": [
      "preflight_capability_probe",
      "execute_tool_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResourceIndicatorMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
