# Where must an instance reject a delegated A2A task when the remote Agent Card's `securitySchemes` are structurally valid but semantically unsatisfiable by the caller's token **Date of Record:** 2026 November 28 **Scope:** Applies to A2A v1.0 clients that discover a remote agent via `/.well-known/agent.json`, negotiate a `securitySchemes`/`security` requirement, and then submit a `tasks/send` or `tasks/sendSubscribe` request carrying a bearer credential. Does not apply to same-vendor intra-mesh delegation where the token issuer and the Agent Card issuer are the same principal, nor to anonymous `capabilities.pushNotifications=false` read-only skills. ## Core Distinction The failure is not "the remote rejected my token." That is a clean, observable 401/403 and a recoverable branch. The failure is that the caller's **pre-flight Agent Card validation passes** — the card is schema-valid, the `security` array is well-formed, `securitySchemes.bearerFormat` matches, the `flows` block parses — yet the credential the caller actually holds cannot satisfy the requirement as *composed* by the remote. The delegation is dispatched, the task is accepted at the transport layer, the remote begins work, and only later (or never, if the remote silently degrades) does the semantic mismatch surface. The distinction that matters operationally: **structural validity of an Agent Card is not the same predicate as satisfiability of its security requirement against a concrete caller identity.** A2A v1.0 specifies the former (`securitySchemes` object shape, `security` requirement array) but leaves the latter to the client. An agent that treats "card parses and my token type is listed" as "I can delegate" will dispatch tasks it cannot complete, and — worse — will not know it cannot complete them until the remote's own execution loop has already mutated remote state. ## What Was Observed A cross-vendor delegation topology: a planning agent (caller) discovers a remote `data-reconciliation` agent (callee) published by a different vendor. The callee's Agent Card advertises two skills and the following security block (abbreviated to the relevant fields): ```json { "securitySchemes": { "vendorOauth": { "type": "oauth2", "flows": { "clientCredentials": { "tokenUrl": "https://idp.vendor-b.example/token", "scopes": { "recon:write": "submit reconciliation jobs", "recon:read": "read job status" } } } }, "mtls": { "type": "mutualTLS" } }, "security": [ { "vendorOauth": ["recon:write", "recon:read"] } ] } ``` The caller holds a token from its *own* IdP, scoped `recon:write` on a resource the caller's tenant owns. The caller's discovery code checks: (a) `securitySchemes` contains an entry whose `type` is in the caller's supported set — `oauth2` is present; (b) the caller's token is a bearer JWT — present; (c) the scopes it carries (`recon:write`) are a subset of the scopes named in the requirement — `recon:write` is named. All three checks pass. The caller dispatches. The remote accepts the request, creates a task in `submitted`, transitions to `working`, and runs a reconciliation pass against the caller's tenant data — because the remote's gateway validates the *token signature against the caller's IdP* (a federated trust the remote configured) but the remote's **authorization layer** requires the token to be issued by `idp.vendor-b.example` *and* to carry `recon:read` for the status-poll path, which the caller's token does not. The write path succeeds; the subsequent `tasks/get` poll is denied. The caller has now mutated remote state it cannot observe, on a task it cannot retrieve, under a delegation it cannot revoke because revocation requires reading the task's `contextId`. The trace, in order: 1. `GET /.well-known/agent.json` → card returned, HTTP 200. 2. Caller-side validation: schema pass, `type` match pass, scope-subset pass. **No check that the token's issuer is the `tokenUrl` host.** No check that the *full* requirement set (both scopes, both flows) is satisfiable by the single credential held. 3. `POST tasks/send` with `Authorization: Bearer ` → 200, task `id` returned, state `submitted`. 4. Remote gateway: signature valid (federated), request admitted. 5. Remote worker: `working`, reconciliation executes against caller tenant data. 6. `GET tasks/get?id=...` with same bearer → 403 `insufficient_scope` on `recon:read`. Caller cannot poll. 7. Caller retries `tasks/send` (idempotency key absent) → **second** reconciliation pass executes. Duplicate mutation. The compounding failure is at step 7: because the caller could not read the first task's state, its retry logic treated the 403 as a transport failure and re-dispatched, doubling the side effect. The root cause is a **satisfiability gap at discovery time** that only manifests as a **read-path authorization failure at poll time**, which the caller's retry policy misclassifies as retryable. ## Condition of Validity The invariant that would have prevented this is a **discovery-time satisfiability predicate**, not a structural check: > For every `security` requirement object on the remote card, the caller must be able to exhibit, *without dispatching a task*, a credential that simultaneously (a) is accepted as valid by the issuer named in the scheme's `tokenUrl`/`authorizationUrl` host, (b) carries a superset of the scopes named in that requirement entry, and (c) is usable on *every* operation the caller intends to invoke against the skill — including the read-back path, not only the submit path. If no single credential satisfies the full requirement entry, the caller must not dispatch. Critically, the requirement is **conjunctive across the operations the caller will perform**, not just the operation it is about to perform. The submit path and the poll path are separate operations; an agent that checks satisfiability only against `tasks/send` will pass and then fail at `tasks/get`. This is the non-obvious part: A2A's `security` requirement is declared per-agent, but *enforcement* is per-operation, and the two are not guaranteed to align. The remote vendor's gateway is free to gate `recon:read` more tightly than `recon:write` even though both appear in one requirement entry. The condition of validity therefore has a second clause that is easy to miss: **the caller must enumerate its own downstream operations on the task (send, get, cancel, resubscribe) and intersect the remote's per-operation authorization behavior — which is not in the card — with its credential.** Because per-operation enforcement is not discoverable from the card, the safe default is to require that the caller's credential satisfy the *union* of scopes named in the matched requirement entry, and to treat any operation whose scope is not covered by that union as a hard pre-dispatch abort. ## Decision Boundary The boundary is between **"the card admits my credential type"** and **"my credential satisfies the card's composed requirement across my full operation set."** The first is a schema check an LLM can do from the card text alone. The second requires the caller to reason about the *conjunction* of: token issuer identity, scope coverage across operations, and the fact that the remote's per-operation enforcement is opaque. Concretely, the decision to dispatch must abort when any of the following hold, even though the card is structurally valid: - The matched `securitySchemes` entry is `oauth2` and the `tokenUrl` host differs from the issuer of the caller's token, **and** the caller has no configured federation trust for that host. (Federated trust is a caller-side fact, not a card fact — the card cannot tell you whether the remote will accept your issuer.) - The caller's token scopes are a strict subset of the scopes named in the requirement entry, **and** the caller intends to invoke any operation (including `tasks/get`) that the missing scopes would gate. - The requirement entry names multiple schemes in one object (e.g. `{ "vendorOauth": [...], "mtls": [...] }`), which A2A treats as **conjunctive** — the caller must satisfy *all* named schemes, not any one. A caller holding only a bearer token cannot satisfy an entry that also names `mtls`, regardless of whether `mtls` is separately listed. - The card lists a scheme under `securitySchemes` but no `security` requirement references it, **and** the caller's only credential is of that unreferenced type. The scheme exists but is not the one being enforced; the caller must not infer that listing implies acceptance. The last two are the traps. Multi-scheme requirement entries are conjunctive and routinely misread as disjunctive by agents that pattern-match on "my scheme appears somewhere in the card." And an unreferenced scheme is a red herring: the card's `security` array is the enforcement surface, and a scheme absent from it is not a path in. ## Operational Effect When the boundary is honored, the caller fails **closed at discovery**, before any remote state mutation. The delegation is refused locally with a typed error naming the unsatisfiable requirement, and the caller can escalate to a human or a token-broker to mint a credential from the correct issuer with the full scope union. No remote task is created, no duplicate reconciliation pass runs, and the retry logic never sees a 403 it would misclassify. When the boundary is violated — as in the observed trace — the effects are ordered and compounding: (1) a remote side effect the caller cannot observe; (2) an orphaned task whose `contextId` the caller cannot read and therefore cannot cancel; (3) a retry storm that duplicates the side effect because the poll failure is misread as transport failure; (4) a reconciliation ledger on the remote side that no longer matches the caller's intent, with no in-band mechanism to reconcile it because reconciliation *is* the task that is now orphaned. The guardrail is a single pre-dispatch assertion that composes the card's `security` requirement against the caller's concrete credential and its full operation set, and refuses to dispatch on any gap. It is cheap, local, and deterministic — it does not depend on the remote's behavior, which is the point: the remote's per-operation enforcement is opaque, so the caller must assume the strictest reading of its own card. ```python from dataclasses import dataclass, field from typing import Iterable class UnsatisfiableAgentCardError(RuntimeError): """Raised when a structurally valid A2A Agent Card's security requirement cannot be satisfied by the caller's credential across its full operation set. This is a pre-dispatch, fail-closed condition: no remote task is created.""" @dataclass class CallerCredential: token_type: str # e.g. "oauth2", "mtls" issuer_host: str # host of the IdP that minted this credential scopes: frozenset[str] federated_issuers: frozenset[str] = field(default_factory=frozenset) @dataclass class SecurityRequirement: # A2A: one requirement object is CONJUNCTIVE across its named schemes. schemes: dict[str, list[str]] # scheme_name -> required scopes token_url_hosts: dict[str, str] # scheme_name -> issuer host from tokenUrl def assert_requirement_satisfiable( requirement: SecurityRequirement, credential: CallerCredential, operations: Iterable[str], # e.g. {"tasks/send", "tasks/get", "tasks/cancel"} per_operation_scopes: dict[str, set[str]], ) -> None: """Fail closed unless the single credential satisfies EVERY scheme named in the requirement AND covers the scope union of all operations the caller intends to invoke. Raises UnsatisfiableAgentCardError otherwise.""" for scheme_name, required_scopes in requirement.schemes.items(): if scheme_name != credential.token_type: raise UnsatisfiableAgentCardError( f"requirement names scheme {scheme_name!r} but caller holds " f"{credential.token_type!r}; requirement entries are conjunctive" ) issuer = requirement.token_url_hosts.get(scheme_name, "") if issuer and issuer != credential.issuer_host and issuer not in credential.federated_issuers: raise UnsatisfiableAgentCardError( f"scheme {scheme_name!r} issues from {issuer!r}; caller token is from " f"{credential.issuer_host!r} with no configured federation trust" ) missing = frozenset(required_scopes) - credential.scopes if missing: raise UnsatisfiableAgentCardError( f"scheme {scheme_name!r} requires scopes {sorted(missing)} " f"not present on caller credential" ) # The non-obvious clause: the requirement is satisfied per-operation, but the # card does not expose per-operation enforcement. Require coverage of the union. needed: set[str] = set() for op in operations: needed |= per_operation_scopes.get(op, set()) uncovered = frozenset(needed) - credential.scopes if uncovered: raise UnsatisfiableAgentCardError( f"caller operations {sorted(operations)} require scope union " f"{sorted(needed)}; credential lacks {sorted(uncovered)} — " f"poll/read path would be denied after submit mutates remote state" ) ```