# Why does an instance fail A2A task negotiation when its Agent Card advertises skills the runtime cannot actually execute? **Date of Record:** 2026 November 25 **Scope:** Applies to A2A v1.0 client agents performing capability-based routing against `AgentCard.skills[]` and then negotiating `tasks/send` / `tasks/sendSubscribe` lifecycle with a remote agent whose card was generated from a declarative manifest rather than introspected from the live runtime. Does not cover transport-level TLS/auth failures or pure MCP tool-schema negotiation, which are separate layers. ## Core Distinction An Agent Card is a *declaration of intent*, not a *probe of capability*. The A2A v1.0 spec defines `AgentCard.skills[]` as a static JSON document served at `/.well-known/agent.json`, and clients are expected to route work by matching `skill.id` and `skill.tags` against the task. The failure mode here is not "the card is missing" or "the card is stale by version" — those are detectable. The dangerous boundary is when the card is *syntactically valid, semantically plausible, and operationally false*: the skill is listed, the input/output modes match the client's payload, but the remote agent runtime behind the card has no executor bound to that skill, or has one whose preconditions (model availability, tool grants, memory budget) are not satisfiable at negotiation time. The invariant that breaks: **card capability ⊇ runtime capability is assumed by the client's router but not guaranteed by the protocol.** A2A v1.0 has no mandatory handshake that forces the remote to re-attest each skill at task-open time. The card is cached, the router trusts it, and negotiation proceeds until the task state machine hits a terminal `failed` state *after* the client has already committed tokens, side effects, or downstream agent handoffs. ## What Was Observed A client orchestrator (runtime A) discovers a remote agent (runtime B) via a card advertising four skills, including `skill.id: "summarize-with-citations"` with `inputModes: ["text/plain"]`, `outputModes: ["application/json"]`, and `tags: ["summarization", "citation"]`. The router selects B for a task. The `tasks/send` request is accepted — B returns `TaskStatus.state: "submitted"` then `"working"` with a valid `status.timestamp`. No schema error. No 4xx. The client commits a downstream handoff: it opens a parallel `tasks/send` to runtime C to fetch source documents, assuming B will consume them. Then B transitions to `"failed"` with `status.message.parts[0].text: "skill executor unavailable"`. The root cause on B: the card's `skills[]` array was generated from a declarative `agent.yaml` at deploy time; the runtime's executor registry is populated lazily from a plugin loader that failed silently for the `summarize-with-citations` plugin (its model backend returned a 503 on health check during boot). B's card was never regenerated because card generation and executor registration are on different lifecycle paths — card on startup, executors on first-use. The card is a *contract written before the runtime knew it couldn't honor it.* The client's failure compound: because B accepted the task and reported `"working"`, the client's timeout budget for the whole multi-agent job was consumed waiting for a failure that arrived as a *terminal state*, not as a *rejection*. The negotiation had no `"rejected-before-work"` fast path. C had already returned documents into A's context window; A now holds stale retrieval state it cannot attribute to a failed branch, and its retry logic re-sends to B (card still cached, still advertises the skill), producing a retry storm bounded only by the client's own backoff. ## Condition of Validity This boundary is *not* a problem when any of the following holds, and the guardrail below should be scoped accordingly: - The remote card is generated by live introspection at request time (card endpoint re-reads executor registry). Then card ≡ runtime and the invariant holds trivially. - The client treats `"working"` as *unverified* and requires an explicit `TaskStatus.state: "accepted"` with a `status.message` echoing the resolved executor identity before committing side effects. A2A v1.0 permits this but does not require it. - The skill is idempotent and cheap, so a late `failed` costs nothing but a retry. - The remote runtime is single-tenant and its executors are statically registered at boot with boot-time health gating that *blocks card publication* on failure. The boundary is live precisely when: card generation and executor registration are decoupled, the client commits irreversible work on `"working"`, and the card is cached across the runtime's executor lifecycle. All three must hold; remove any one and the failure is either impossible or cheap. ## Decision Boundary The architectural guardrail is a **capability attestation at task-open**, layered on top of the card, that the client enforces before it commits: 1. **Two-phase negotiation.** Client sends `tasks/send` with an `acceptedOutputModes` and a client-side `metadata.requireExecutorAttestation: true`. A compliant remote must respond with `state: "accepted"` and a `status.message` containing the *resolved executor id and its version*, or respond `state: "rejected"` with a `reason`. The client MUST NOT commit downstream handoffs until it sees `"accepted"` with a matching executor id. `"working"` without prior `"accepted"` is treated as a protocol violation, not progress. 2. **Card freshness bound.** Client caches the card with a TTL and a `card.etag`; on any `"failed"` terminal state attributed to `skill_executor_unavailable`, the client invalidates the cached card for that agent and forces a re-fetch before the next route. This breaks the retry storm at its source. 3. **Attribution on failure.** The remote's `failed` status MUST carry `metadata.failedSkillId` and `metadata.failureClass ∈ {executor_unavailable, precondition_unsatisfied, budget_exhausted}`. Without this, the client cannot distinguish "B is broken" from "the task was malformed," and its retry policy is blind. 4. **Rollback of speculative state.** Any documents fetched from C on the assumption B would consume them are tagged with the `taskId` of the B negotiation and evicted from context on B's failure. This is the memory-continuity half of the guardrail: a failed negotiation must not leave orphaned retrieval state in the orchestrator's window. The decision boundary is: **commit side effects only after attested acceptance; treat `working`-without-`accepted` as failure.** This converts a late, expensive terminal failure into an early, cheap rejection. ## Operational Effect With the guardrail, the failure trace changes shape. B still cannot execute the skill — the plugin is still broken — but the client learns this at `"accepted"` time (B's attestation layer checks the registry and returns `rejected` with `failureClass: executor_unavailable`) rather than after consuming the job's timeout budget. The client's router re-fetches B's card, sees the skill still advertised (card generation is still decoupled on B's side — that's B's bug, not the client's), and *demotes B for that skill* in its local routing table via the etag-invalidation path. C is never called; no orphaned retrieval state enters A's context. Total cost of the failed negotiation: one round-trip, one cache invalidation, zero committed tokens. The residual risk is the *asymmetric fix*: the client can bound its own exposure, but it cannot force B to regenerate its card. A client that only implements the client-side half still pays one round-trip per route to a broken agent until its own demotion table catches up — which is why the demotion table must be keyed on `(agentId, skillId, etag)` and not on `agentId` alone. A single broken skill must not poison routing for the agent's other three healthy skills. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class CapabilityAttestationError(RuntimeError): """Raised when a remote agent's runtime cannot attest a skill its card advertised.""" @dataclass class AgentCard: agent_id: str skills: list[str] etag: str @dataclass class TaskOpenResult: state: str # "accepted" | "rejected" | "working" | "failed" executor_id: Optional[str] = None failed_skill_id: Optional[str] = None failure_class: Optional[str] = None @dataclass class Router: card_cache: dict[str, AgentCard] = field(default_factory=dict) demoted: set[tuple[str, str, str]] = field(default_factory=set) def route(self, agent_id: str, skill_id: str) -> AgentCard: card = self.card_cache.get(agent_id) if card is None: raise CapabilityAttestationError(f"no cached card for {agent_id}") if (agent_id, skill_id, card.etag) in self.demoted: raise CapabilityAttestationError( f"skill {skill_id} demoted for {agent_id}@{card.etag}" ) if skill_id not in card.skills: raise CapabilityAttestationError( f"skill {skill_id} not advertised by {agent_id}" ) return card def negotiate(self, agent_id: str, skill_id: str, send_fn) -> TaskOpenResult: card = self.route(agent_id, skill_id) result: TaskOpenResult = send_fn( agent_id=agent_id, skill_id=skill_id, require_executor_attestation=True, ) # Guardrail 1: "working" without prior "accepted" is a protocol violation. if result.state == "working" and result.executor_id is None: raise CapabilityAttestationError( f"{agent_id} entered 'working' for {skill_id} without " f"executor attestation (card etag {card.etag})" ) # Guardrail 2 + 3: terminal failure with attribution invalidates the card # for that specific skill and demotes the (agent, skill, etag) triple. if result.state in ("rejected", "failed"): if result.failure_class == "executor_unavailable": self.demoted.add((agent_id, skill_id, card.etag)) self.card_cache.pop(agent_id, None) # force re-fetch next route raise CapabilityAttestationError( f"{agent_id} advertised {skill_id} but runtime cannot " f"execute it (failure_class={result.failure_class}); " f"card {card.etag} invalidated, skill demoted" ) raise CapabilityAttestationError( f"{agent_id} rejected {skill_id}: {result.failure_class}" ) if result.state != "accepted" or result.executor_id is None: raise CapabilityAttestationError( f"unexpected negotiation state {result.state!r} from {agent_id}" ) return result def etag_for(card_body: bytes) -> str: return hashlib.sha256(card_body).hexdigest()[:16] ```