# When must an instance reject a peer's Agent Card after schema-valid A2A v1.0 discovery: the delegated-capability supersession race **Date of Record:** 2026 November 28 **Scope:** Applies to cross-organization A2A v1.0 task delegation where the remote Agent Card is fetched at discovery time and the delegated task's `capabilities`/`securitySchemes` are re-negotiated mid-lifecycle. Does not apply to single-org intra-mesh A2A where the card is pinned by a trusted registry and never re-fetched. ## Core Distinction There are two distinct notions of "the peer's Agent Card is valid," and conflating them is the root of this failure: 1. **Discovery validity** — the card at `/.well-known/agent.json` parses against the A2A v1.0 schema, has a resolvable `url`, and its `skills[]`/`capabilities` are internally consistent. A schema-valid card is a *static* claim. 2. **Delegation validity** — the card's advertised capability set still *subsumes* the capability the delegated task was accepted under, at the moment each task transition (accept → work → complete/stream) is authorized. A delegation-valid card is a *temporal* claim, and the card is a mutable remote document. An A2A v1.0 client that treats a schema-valid card as a durable delegation warrant will, at some point, continue executing a task whose authorizing capability was silently withdrawn by the remote org. The invariant that must hold is: **every task transition is authorized against a card snapshot whose `version`/`etag` is not older than the snapshot that authorized the task's `submitted` state — or the transition must be refused.** ## What Was Observed Cross-org delegation of a `data.extract` skill. The orchestrator (Org A) discovers Org B's card at t0: ``` { "name": "b-extractor", "version": "7", "etag": "a1b2", "capabilities": { "streaming": true, "pushNotifications": false }, "skills": [ { "id": "data.extract", "inputModes": ["text/plain"] } ], "securitySchemes": { "oauth2": { "scopes": ["extract:write"] } } } ``` Org A submits a task citing `skill=data.extract`, `acceptedScopes=["extract:write"]`. Org B accepts, returns `task.id=T`, state `working`, and begins streaming `TaskStatusUpdateEvent`s. At t1 (mid-stream), Org B rotates its card: `version` → `8`, `etag` → `c3d4`, `skills` drops `data.extract` (deprecated), and `securitySchemes.oauth2.scopes` narrows to `extract:read`. Org B's *runtime* keeps the already-accepted task `T` alive for backward compatibility but stops honoring `extract:write` on any *new* sub-operation the task triggers internally. Org A's client, holding the t0 card in memory, never re-fetches. It continues to: - append `TaskArtifactUpdateEvent`s under the assumption that `extract:write` is live, - issue a follow-up `tasks/send` with `referenceTaskIds=[T]` for a dependent extraction, - and on `T` completion, write results to a sink gated by the stale scope assumption. The failure is not a schema error and not a transport error. Every message is well-formed A2A v1.0. The divergence is that Org A's *delegation warrant* (the t0 card) and Org B's *enforcement surface* (the t1 card) have silently disjointed. The observable symptom is a `403 insufficient_scope` arriving *on a sub-message of an already-accepted task*, which the naive client classifies as a transient error and retries — compounding the divergence. ## Condition of Validity The stale-card acceptance is only sound under a condition that A2A v1.0 does **not** guarantee but that most clients assume: > The remote Agent Card is immutable for the lifetime of any task the remote accepted under it. This is false in general. The spec permits card mutation at any time; `version` and `etag` are advisory. Therefore the *only* sound condition is one the client must enforce itself: - Let `C_submit` be the card snapshot that authorized `task.submitted`. - For every subsequent transition `τ` on task `T`, the client MUST obtain a card snapshot `C_τ` (via conditional GET with `If-None-Match: C_submit.etag`) and verify `C_τ` still subsumes the task's `acceptedScopes` and `skill`. - If the conditional GET returns `304 Not Modified`, the warrant is intact. - If it returns `200` with a changed `etag`, the client MUST re-evaluate subsumption **before** authorizing `τ`. Non-subsumption ⇒ refuse the transition; do not retry. The subtlety: a `304` is the *only* proof of continuity. A `200` with an unchanged body but a new `etag` is still a supersession signal and must be treated as such, because the remote may have changed enforcement without changing the human-readable body. ## Decision Boundary The boundary between "proceed" and "abort-and-renegotiate" is not "did the card change" but "does the *current* card still subsume the *specific* capability the in-flight task was accepted under." Formalize: ``` subsumes(C, skill_id, scopes) := skill_id ∈ C.skills.map(.id) ∧ scopes ⊆ C.securitySchemes.oauth2.scopes ∧ C.capabilities.streaming ≥ task.requiresStreaming ``` A transition `τ` is authorized iff `subsumes(C_τ, T.skill, T.acceptedScopes)`. There are three outcomes: 1. **Subsumed** → proceed. 2. **Not subsumed, card version strictly greater** → the remote *withdrew* the capability. Abort `T` with a terminal `rejected` state citing `capability_superseded`; do **not** retry, do **not** silently downgrade scopes (downgrading would let Org B execute a task under a weaker warrant than Org A's sink expects — a confused-deputy hazard across orgs). 3. **Not subsumed, card version equal or lower** → the remote is serving a *stale or rolled-back* card (split-brain between its discovery endpoint and its task runtime). This is the dangerous case: it looks like a withdrawal but may be a replica lag. The client MUST treat it as a hard failure, not a withdrawal, and quarantine the peer until a consistent card is observed across two consecutive fetches separated by a bounded interval. The non-obvious rule: **a capability withdrawal and a card-replica rollback are indistinguishable from a single fetch**, and they demand opposite responses (abort-task vs. quarantine-peer). Distinguishing them requires the version-monotonicity check plus a second confirming fetch. ## Operational Effect Clients that skip the per-transition re-evaluation exhibit a specific, reproducible pathology: tasks that *complete successfully from the remote's perspective* but whose artifacts Org A refuses to commit because the scope that gated the sink is no longer held. The result is orphaned artifacts — Org B bills for compute, Org A discards output, and neither side's logs show an error, because every A2A message was schema-valid and every HTTP status was 2xx or a retried 403. The divergence lives entirely in the gap between two card snapshots. The guardrail is a **card-snapshot ledger** keyed by `(peer, etag, version)` that the orchestrator consults at every transition, plus a monotonicity assertion that refuses to accept a card whose `version` is lower than the last observed for that peer. This converts the silent orphan into an explicit `CapabilitySupersededError` at the exact transition where the warrant lapsed — which is the earliest point at which the divergence is observable. ```python class CapabilitySupersededError(RuntimeError): """Raised when a peer's current Agent Card no longer subsumes the capability an in-flight A2A task was accepted under.""" class CardRollbackError(RuntimeError): """Raised when a peer serves a card whose version is not monotonic relative to the last observed snapshot (replica lag / split-brain).""" def authorize_transition( task, current_card, last_seen_version, required_scopes, ): # Monotonicity guard: a lower version is a rollback, not a withdrawal. if current_card["version"] < last_seen_version: raise CardRollbackError( f"peer {task.peer} served card version {current_card['version']} " f"< last seen {last_seen_version}; quarantine peer, do not abort task" ) skill_ids = {s["id"] for s in current_card.get("skills", [])} granted = set( current_card.get("securitySchemes", {}) .get("oauth2", {}) .get("scopes", []) ) if task.skill not in skill_ids: raise CapabilitySupersededError( f"task {task.id}: skill {task.skill!r} withdrawn by peer " f"{task.peer} at card version {current_card['version']}" ) missing = set(required_scopes) - granted if missing: raise CapabilitySupersededError( f"task {task.id}: scopes {sorted(missing)} no longer granted by " f"peer {task.peer} at card version {current_card['version']}; " f"refuse transition, do not downgrade" ) if task.requires_streaming and not current_card["capabilities"].get("streaming"): raise CapabilitySupersededError( f"task {task.id}: streaming capability withdrawn mid-lifecycle" ) return True ```