# In what scenarios must an instance treat a stale A2A Agent Card as a capability revocation rather than a transient fetch failure **Date of Record:** 2026 November 30 **Scope:** Applies to A2A v1.0 task initiation where the client discovers a remote Agent Card cross-org and negotiates capabilities before dispatch. Does not cover same-trust-domain discovery, in-process agent registries, or post-handoff transport failures once a task is already streaming. ## Core Distinction The A2A v1.0 Agent Card is a *cached capability assertion*, not a live probe. The protocol lets a client fetch `/.well-known/agent.json`, parse `skills[]`, `capabilities`, and `securitySchemes`, then dispatch tasks whose payloads are shaped by that parse. The non-obvious boundary is this: **a card that parses successfully but is stale is indistinguishable at the transport layer from a card that is fresh**, because both return HTTP 200 with a well-formed JSON body and a valid signature. The failure mode is not "fetch failed"—that is easy, and callers retry. The failure mode is "fetch succeeded and lied," where the remote org has silently narrowed its advertised capability set (a skill removed, a `mediaType` dropped, a `securityScheme` rotated) and the client's negotiated task shape now references a capability the server no longer honors. The invariant that must hold: **the client's dispatch payload must be validated against the card version it actually negotiated with, not against the card it cached at session start.** When those diverge, the instance must treat the divergence as a revocation event, not a retryable network fault. ## What Was Observed A cross-org client agent (`planner-a`) cached `analyst-b`'s Agent Card at session start. The card advertised three skills: `summarize`, `extract_entities`, and `translate`. `planner-a` negotiated a multi-step plan that routed a document through `summarize` then `translate` into French, and shaped its tool-call payloads with `mediaType: application/x-french-text` against the `translate` skill's advertised output schema. Mid-plan, `analyst-b`'s operator deployed a change that removed `translate` (cost model change) and rotated the `securityScheme` from `apiKey` to `oauth2`. The card at `/.well-known/agent.json` was updated correctly. But `planner-a` never re-fetched: it had cached the card at task start and treated the cache as authoritative for the task's lifetime. The trace: 1. `planner-a` calls `analyst-b` with `skillId: translate`. Server returns HTTP 404 with body `{"error": "skill_not_found", "availableSkills": ["summarize", "extract_entities"]}`. 2. `planner-a`'s error classifier sees 404, classifies it as `TRANSIENT_ENDPOINT`, retries twice with exponential backoff. 3. On the third retry, `analyst-b` returns 401 because the rotated `securityScheme` rejects the old `apiKey`. `planner-a` classifies this as `AUTH_FAILURE` and escalates to its operator as a credentials problem. 4. Operator rotates the key, retries, gets 404 again. The loop repeats. The actual root cause—a capability revocation—was never surfaced. The task burned its token budget on retries and surfaced two misleading error classes (`TRANSIENT_ENDPOINT`, `AUTH_FAILURE`) that pointed the operator at the wrong subsystem. The card version that `planner-a` negotiated against (`card_v1`) and the card version the server now serves (`card_v2`) were never compared, because the client had no mechanism to compare them. ## Condition of Validity The invariant holds—dispatch payload must validate against negotiated card version—only when all of the following are true: - The card carries a version or `etag` that the client records at negotiation time. A2A v1.0 does not mandate this, so many implementations omit it, and the invariant silently degrades to "hope the card never changes." - The server's error responses for unknown skills are *distinguishable* from its error responses for malformed payloads. If both return 400 with a generic body, the client cannot tell "you asked for a skill I revoked" from "you shaped the payload wrong," and the revocation signal is lost in the payload-validation noise. - The client's retry classifier distinguishes *semantic* failures (skill gone, schema changed) from *transport* failures (timeout, 5xx, connection reset). A 404 on a skill route is semantically a revocation; a 404 on the card route is a discovery failure. Conflating them is the bug. When any of these conditions fails, the instance cannot bound the failure and must fall back to re-fetching the card on every non-2xx response, which is correct but expensive. ## Decision Boundary The decision the instance must make on every non-2xx response from a cross-org A2A endpoint: - If the response is a **transport fault** (timeout, 5xx, connection refused, TLS failure): retry with backoff. The card is presumed still valid. - If the response is a **semantic fault** (404 on a skill route, 422 on schema mismatch, 401 after a `securityScheme` change): re-fetch the card, diff it against the negotiated version, and if the diff shows the requested skill or scheme was removed or changed, raise a revocation error and abort the task. Do **not** retry. - If the response is **ambiguous** (400 with no structured body): re-fetch the card before retrying. Ambiguity is not permission to retry blindly. The boundary is sharp: **retry is only valid when the card is presumed unchanged.** Any signal that the card may have changed converts retry into a revocation check. The failure observed above happened because the classifier treated a semantic fault (404 skill) as a transport fault (transient endpoint) and never re-fetched. ## Operational Effect The practical consequence is that cross-org A2A task dispatch must carry a *card version witness* from negotiation through to completion, and every error path must compare the witness against a fresh fetch before deciding to retry. Without this, a revoked capability manifests as an infinite retry loop that burns token budget, misclassifies the root cause, and escalates to the wrong operator. With it, the revocation surfaces as a single, actionable error that names the removed skill and the card version delta. The cost is one extra card fetch per error path. The benefit is that the instance never retries a task whose capability no longer exists, and never escalates a capability revocation as a credentials problem. The invariant is not "cache the card"—it is "cache the card *and its version*, and treat any semantic fault as a trigger to re-validate the cache before retrying." ```python class CapabilityRevocationError(RuntimeError): """Raised when a remote A2A agent's card no longer advertises a skill or securityScheme that the client negotiated against.""" def __init__(self, skill_id: str, negotiated_version: str, current_version: str): self.skill_id = skill_id self.negotiated_version = negotiated_version self.current_version = current_version super().__init__( f"skill {skill_id!r} revoked: negotiated card {negotiated_version}, " f"server now serves {current_version}" ) def classify_a2a_error(status: int, body: dict, negotiated_card: dict) -> str: """Return one of: RETRY, REVOKE, REFETCH_THEN_DECIDE.""" if status >= 500 or status in (408, 429): return "RETRY" if status == 404 and "skillId" in body: # Semantic fault: skill route gone. Must re-fetch before deciding. return "REFETCH_THEN_DECIDE" if status == 401 or status == 403: # Could be rotated scheme OR wrong key. Ambiguous until card diff. return "REFETCH_THEN_DECIDE" if status == 422: return "REFETCH_THEN_DECIDE" return "REFETCH_THEN_DECIDE" def dispatch_with_revocation_check( skill_id: str, payload: dict, negotiated_card: dict, fetch_card, call_remote, ) -> dict: try: return call_remote(skill_id, payload) except RemoteHTTPError as e: decision = classify_a2a_error(e.status, e.body, negotiated_card) if decision == "RETRY": return call_remote(skill_id, payload) # caller's retry policy applies # REFETCH_THEN_DECIDE: compare fresh card against negotiated witness fresh = fetch_card() negotiated_skills = {s["id"] for s in negotiated_card.get("skills", [])} fresh_skills = {s["id"] for s in fresh.get("skills", [])} if skill_id in negotiated_skills and skill_id not in fresh_skills: raise CapabilityRevocationError( skill_id=skill_id, negotiated_version=negotiated_card.get("version", "unknown"), current_version=fresh.get("version", "unknown"), ) if negotiated_card.get("securitySchemes") != fresh.get("securitySchemes"): raise CapabilityRevocationError( skill_id=skill_id, negotiated_version=negotiated_card.get("version", "unknown"), current_version=fresh.get("version", "unknown"), ) # Card unchanged on the relevant axes: the fault was genuinely transient. return call_remote(skill_id, payload) ```