{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-re-derive-delegated-authority-after-a-per-tool-scope-downgrade-in-a2a-oauth-2-1-token-exchange",
  "title": "When must an instance re-derive delegated authority after a per-tool scope downgrade in A2A OAuth 2.1 token exchange",
  "date_of_record": "2026 November 27",
  "scope": "Applies to multi-agent systems where an orchestrator agent obtains a delegated token via RFC 8693 token exchange (OAuth 2.1) and mints per-tool scoped capability grants downstream. Does *not* apply to single-agent deployments where the agent holds a first-party credential, nor to opaque session tokens that are re-validated against an authorization server on every tool call.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-delegated-authority-after-a-per-tool-scope-downgrade-in-a2a-oauth-2-1-token-exchange.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-delegated-authority-after-a-per-tool-scope-downgrade-in-a2a-oauth-2-1-token-exchange.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-delegated-authority-after-a-per-tool-scope-downgrade-in-a2a-oauth-2-1-token-exchange.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1852,
    "python_slice_tokens": 422,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"token expired\" and not \"scope was insufficient.\" It is a **scope-downgrade continuity break**: an agent holds a delegated token whose `scope` claim was narrowed by a downstream exchange, but its *internal capability model* — the local map of \"which tools am I allowed to call\" — was computed against the **pre-downgrade** scope set and...",
    "what_was_observed": "An orchestrator (`planner-01`) decomposed a task into a five-step plan requiring tools `read_repo`, `run_tests`, `write_patch`, `open_pr`, `post_comment`. It held a delegated token with all five scopes. At step 3, a policy service performed a mid-task token exchange on behalf of the orchestrator to call a *sub-agent* (`test-runner`) that was only authorized for `run_tests`. The exchange returned a token with `scope=\"...",
    "condition_of_validity": "The guardrail holds only under these conditions, and fails outside them: 1. **Token identity includes scope.** Cache key must be `(task_id, agent_id, frozenset(scope))`. Two tokens with different scopes are distinct objects even with the same subject and audience. 2. **Downgrade is detectable.** The exchange response must carry the granted `scope` explicitly...",
    "decision_boundary": "The decision the runtime must make at every tool dispatch is: - **If** the token's recorded scope set ⊇ the tool's required scope **and** the token's `(task, agent, scope)` key matches the dispatch context → dispatch. - **If** the token's scope set ⊂ the tool's required scope → **do not dispatch**. Raise `AuthorityReducedError`, re-derive the plan's executab...",
    "operational_effect": "After the fix — scope-inclusive cache keys plus authority-aware error classification — the same task under the same downgrade: The downgrade for `test-runner` no longer contaminates the orchestrator's own authority. Cost of the guardrail: one `frozenset` per cache entry and a scope-diff on every exchange response. Cost of the failure: two full task re-execut..."
  },
  "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": "4ab23197158d9e145e5a186e92dbe642c21aec6556e00b7b4f67cb2b62f4357b",
    "verified_classes": [
      "AuthorityReducedError",
      "DelegatedToken",
      "ScopeAwareTokenCache"
    ],
    "verified_functions": [
      "dispatch_tool",
      "exchange_and_cache",
      "covers",
      "__init__",
      "put",
      "lookup_covering"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "AuthorityReducedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
