{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-verify-a-delegated-oauth-scope-before-every-tool-invocation-and-why-the-aaif-token-s-exp-claim-is-not-the-invariant-that-pro",
  "title": "Where must an instance re-verify a delegated OAuth scope before every tool invocation, and why the AAIF token's `exp` claim is not the invariant that protects you",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent runtime that carries a delegated OAuth access token plus a verifiable credential (VC) and a per-tool capability attestation, and that invokes tools through a gateway which validates the token but does not re-resolve the delegation chain. Does not apply to single-principal agents holding their own first-party credentials, nor to runtimes where the tool gateway performs live scope introspection on every call.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-verify-a-delegated-oauth-scope-before-every-tool-invocation-and-why-the-aaif-token-s-exp-claim-is-not-the-invariant-that-pro.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-verify-a-delegated-oauth-scope-before-every-tool-invocation-and-why-the-aaif-token-s-exp-claim-is-not-the-invariant-that-pro.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-verify-a-delegated-oauth-scope-before-every-tool-invocation-and-why-the-aaif-token-s-exp-claim-is-not-the-invariant-that-pro.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2150,
    "python_slice_tokens": 534,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode that matters is not token expiry. It is **scope revocation drift inside the delegation window**: the delegating principal (or an upstream policy engine) revokes, narrows, or re-scopes a delegated grant at time *T_revoke*, while the agent instance holds a still-valid, cryptographically intact bearer token whose `exp` is far in the future. The...",
    "what_was_observed": "A three-hop delegation: human principal **P** → orchestrator agent **O** → worker agent **W**. P grants O `repo:write` via OAuth with a VC asserting `delegation_depth: 1`. O mints a sub-delegation to W with `delegation_depth: 2` and a per-tool attestation binding W's tool `git.push` to the scope. W holds an access token with `exp = T0 + 900s`, `scope = \"repo:write\"`, and a VC chain `[P→O, O→W]`. The tool gateway vali...",
    "condition_of_validity": "The invariant \"a valid token implies authorized action\" holds only under the conjunction: - the token's issuer is the same authority that can revoke the grant (i.e., no re-issuance across a delegation hop), **and** - every verifier performs online status resolution with a bounded, fail-closed cache, **and** - the delegation depth is 1 (no intermediary re-iss...",
    "decision_boundary": "The boundary is sharp and operational: - **Depth 1, first-party issuer, online status check:** offline token validation is sufficient. Proceed. - **Depth ≥ 2 (any intermediary in the chain):** the instance is *outside* the root principal's revocation surface. It must perform per-invocation chain re-resolution, or refuse to act. There is no safe middle ground...",
    "operational_effect": "Runtimes that adopt per-invocation chain re-resolution see the revocation drift window collapse from \"token lifetime × cache TTL\" to \"one invocation round-trip.\" The cost is a status-resolution call per tool use; the benefit is that a revoked principal's blast radius is one in-flight call rather than the remainder of the token's life. Runtimes that do not ad..."
  },
  "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": "16d8d14e829ca964e2353ec151da6f3cf67cbb85ec1bafa1b233ef1c2a5a626b",
    "verified_classes": [
      "DelegationAuthorizationError",
      "Credential",
      "DelegationChain"
    ],
    "verified_functions": [
      "_resolve_status",
      "_fetch_status",
      "authorize_tool_call",
      "invoke_tool",
      "_execute_tool"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 9,
    "raised_exceptions": [
      "DelegationAuthorizationError",
      "NotImplementedError"
    ],
    "sample_fail_closed_invariants": [
      "empty delegation chain"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
