# Why does an instance accept a delegated A2A task it cannot execute: the JWS-signed Agent Card capability/Task-Envelope divergence and the `accepted→failed` silent-drop boundary **Date of Record:** 2026 November 25 **Scope:** Applies to cross-vendor A2A v1.0 task delegation where the remote Agent Card is fetched once, its `capabilities` block is verified via detached JWS (`ES256`/`RS256` over `header.payload`), and the Task object is then submitted against that cached card. Does not apply to same-vendor delegation where card and worker are co-deployed, nor to synchronous RPC transports that re-validate the card per call. ## Core Distinction The failure is not "the signature failed to verify." A broken JWS is loud: `ES256` verification returns false, the card is rejected, and the caller never dispatches. The boundary that bites is subtler: **the JWS authenticates the card as a stable document, but capabilities are asserted at the *card* granularity while task requirements are evaluated at the *task* granularity, and the two are never cross-checked by the A2A v1.0 handshake.** A card can be perfectly signed, unexpired, and enumerate `capabilities.skills = ["summarize", "translate"]` with `capabilities.streaming = true`, while the specific Task's `requiredCapabilities` include `modalities: ["audio"]` or `maxInputTokens: 200000` that the worker cannot satisfy. The remote agent accepts the task (returns `state: "accepted"`), then transitions to `failed` asynchronously *after* the caller has already committed its own execution branch to the assumption of success. The invariant that is violated: **card-level capability advertisement is treated as a superset guarantee for all tasks, but it is only an existential claim ("this agent can do *something* in this skill"), not a universal one ("this agent can do *every* task tagged with this skill").** Cross-vendor delegation has no mechanism to negotiate the delta between the two. ## What Was Observed A three-hop delegation: orchestrator `O` (vendor A) → worker `W` (vendor B) → sub-worker `S` (vendor C). `O` fetched `W`'s Agent Card at cold start, verified the detached JWS with `W`'s published `kid` from `https://b.example/.well-known/jwks.json`, and cached the card with a 24h TTL. The card declared: ``` capabilities: { skills: ["doc-extraction"], streaming: true, pushNotifications: false, extensions: [{"uri": "https://a2a.dev/ext/token-budget/v1", "required": true}] } ``` `O` dispatched a Task with `requiredCapabilities: {skill: "doc-extraction", maxInputTokens: 180000, outputSchema: "invoice-v3"}`. `W` returned `state: "accepted"` with a task ID and a `pushNotifications`-less polling contract. `O` then released its input-context lock, dropped the source document from its working set to conserve context budget, and moved to the next stage of its pipeline. `W`'s actual worker had a **per-task context ceiling of 128000 tokens** — a limit encoded in the worker's runtime config, not in the signed card. `W`'s card-level `skills` claim was true (it *can* do doc-extraction, for smaller docs). At 180000 tokens the task failed inside `W` with `CONTEXT_EXCEEDED`, `W` transitioned the task to `failed`, and wrote a failure artifact. But `O` had already discarded the source document. The failure was observable only via polling, and `O`'s polling interval was 30s while its stage timeout was 20s — so `O` advanced past the delegation believing it had succeeded, and the pipeline emitted a downstream artifact built on a task that never completed. Three compounding conditions: 1. **Card granularity mismatch.** `maxInputTokens` was a *task* field with no corresponding *card* field to validate against. The A2A v1.0 schema defines `capabilities` as booleans and skill URIs; numeric resource ceilings have no canonical home, so vendors put them in `extensions` inconsistently or omit them. 2. **Accept-then-fail is legal.** The protocol permits `submitted → accepted → failed` as a valid transition sequence. Acceptance is a *transport-level* acknowledgment ("I have your Task object"), not a *capability-level* commitment ("I can execute it"). `O` conflated the two. 3. **Signed-card staleness.** The JWS proves the card was authored by `W` at signing time. It says nothing about whether `W`'s *current* worker pool matches the card. Vendors rotate worker configs (downscale GPU pools, tighten token ceilings for cost) without re-signing the card, because the card is a *contract*, not a *heartbeat*. A 24h cached card can describe a fleet that no longer exists. ## Condition of Validity The card-as-superset assumption holds **only** when all of the following are true: - Every field in the Task's `requiredCapabilities` has a **structurally corresponding** field in the signed card's `capabilities` block, and the comparison is a total order (e.g., `task.maxInputTokens <= card.maxInputTokens`). - The card's TTL is shorter than the vendor's worker-reconfiguration interval, **or** the card embeds a `workerPoolVersion` that the Task response echoes and the caller re-validates. - The caller treats `accepted` as **non-terminal** and blocks its own downstream state transition on a subsequent terminal state (`completed`/`failed`/`canceled`), with a polling or push channel whose deadline is strictly less than the caller's stage timeout. When any condition is false — which is the default for cross-vendor delegation, because no vendor publishes its reconfiguration interval and the A2A schema has no mandatory `maxInputTokens` card field — acceptance is a **necessary but insufficient** signal, and the caller must treat it as a speculative commitment. ## Decision Boundary The caller must decide, at dispatch time, whether to **hold** its input context (blocking, safe, expensive) or **release** it on acceptance (fast, lossy). The boundary is a single comparison: ``` hold ⟺ task.maxInputTokens > card.capabilities.maxInputTokens (if present) ∨ card has no maxInputTokens field AND task.maxInputTokens > caller.assumedWorkerCeiling ∨ card.age > vendor.reconfigurationInterval (unknown → assume 0) ∨ task.requiredCapabilities ⊄ card.capabilities.skills ``` If any disjunct is true, the caller **must not** release context on `accepted`; it must block until a terminal state or a capability-confirmation message. If all are false, release is safe *modulo* the polling-deadline invariant. The non-obvious part: the third disjunct is *always* true in cross-vendor settings because `vendor.reconfigurationInterval` is unobservable. The correct default is therefore **hold**, and the optimization to release is a *derived* permission that requires an explicit `workerPoolVersion` echo in the Task response — which A2A v1.0 does not mandate. Absent that, release-on-accept is an unverified bet. ## Operational Effect The observable signature is a **silent-drop**: the caller's pipeline completes, emits artifacts, and reports success, while the delegated task's terminal state is `failed` and its failure artifact is never read. Detection requires reconciling the caller's task ledger against the remote's task ledger — a cross-vendor join that most orchestrators do not perform. Mitigations that actually bound the failure: 1. **Treat `accepted` as `submitted`.** Never transition caller state on acceptance alone. Require a terminal state or an explicit `capabilityConfirmed` message (a non-standard extension; negotiate it in the card). 2. **Echo-validate worker version.** If the card carries a `workerPoolVersion` extension, require the Task response to echo it; mismatch → re-fetch and re-verify the card before trusting acceptance. 3. **Pin the polling deadline below the stage timeout.** `poll_deadline < stage_timeout - safety_margin`. If the remote cannot confirm within that window, the caller treats the task as **indeterminate** and either retries idempotently or fails its own stage loudly. 4. **Hold context until terminal state** for any task whose `maxInputTokens` exceeds the card's declared ceiling or whose ceiling is undeclared. The cost is context retention; the alternative is silent data loss. The invariant to encode: **a signed Agent Card is an authentication artifact, not a capacity guarantee; acceptance is a transport event, not a capability event; and the caller owns the reconciliation between them because the protocol does not.** ```python import time from dataclasses import dataclass from typing import Optional class CapabilityAcceptanceDivergence(RuntimeError): """Raised when a delegated task is accepted but cannot be confirmed executable within the caller's stage deadline, or when the signed card cannot bound the task's required capabilities.""" pass @dataclass class SignedAgentCard: skills: list[str] max_input_tokens: Optional[int] # None == undeclared signed_at: float worker_pool_version: Optional[str] @dataclass class TaskEnvelope: skill: str max_input_tokens: int output_schema: str @dataclass class TaskResponse: state: str # submitted | accepted | completed | failed worker_pool_version: Optional[str] task_id: str def dispatch_or_hold( card: SignedAgentCard, task: TaskEnvelope, response: TaskResponse, stage_timeout_s: float, safety_margin_s: float = 2.0, assumed_worker_ceiling: int = 128_000, max_card_age_s: float = 3600.0, ) -> str: """ Returns 'hold' if the caller must retain input context and block on a terminal state; returns 'release' only when every capability bound is verified. Raises CapabilityAcceptanceDivergence when acceptance cannot be trusted. """ if task.skill not in card.skills: raise CapabilityAcceptanceDivergence( f"task skill {task.skill!r} not in signed card skills {card.skills!r}" ) card_age = time.time() - card.signed_at if card_age > max_card_age_s: # Stale signed card: signature valid, fleet possibly rotated. raise CapabilityAcceptanceDivergence( f"card age {card_age:.0f}s exceeds max {max_card_age_s:.0f}s; " f"cannot bound worker capacity" ) ceiling = card.max_input_tokens if card.max_input_tokens is not None else assumed_worker_ceiling if task.max_input_tokens > ceiling: # Card does not guarantee capacity for this task; hold and block. return "hold" if response.state == "accepted": if card.worker_pool_version is None: # No echo contract: acceptance is transport-only, never release. return "hold" if response.worker_pool_version != card.worker_pool_version: raise CapabilityAcceptanceDivergence( f"worker pool version drift: card={card.worker_pool_version!r} " f"response={response.worker_pool_version!r}; re-fetch and re-verify card" ) if response.state in ("completed", "failed"): return "release" # terminal; context no longer needed for this task # Non-terminal, unconfirmed: caller must own the wait. poll_deadline = stage_timeout_s - safety_margin_s if poll_deadline <= 0: raise CapabilityAcceptanceDivergence( f"stage_timeout {stage_timeout_s}s leaves no polling window after " f"safety margin {safety_margin_s}s" ) return "hold" ```