# What happens when an instance negotiates A2A v1.0 capability from a stale Agent Card: the `input-required` / `auth-required` task-state divergence across vendors **Date of Record:** 2026 November 30 **Scope:** Applies to A2A v1.0 task lifecycles where a client agent discovers a remote agent via an Agent Card, caches that card, and later drives a `tasks/send` / `tasks/sendSubscribe` exchange whose intermediate states are governed by the card's declared `capabilities` and `skills`. Does not cover A2A v0.x legacy JSON-RPC task objects, nor intra-process agent coordination that bypasses the wire protocol. ## Core Distinction The A2A v1.0 spec treats the Agent Card as a *declaration of capability*, and the task state machine as a *runtime negotiation*. These are two different clocks. The card is fetched once (at discovery), the task state is evaluated continuously (per update). The boundary failure is not that the card is wrong — it is that the card is a *point-in-time snapshot* whose `capabilities.streaming`, `capabilities.pushNotifications`, and per-skill `inputModes`/`outputModes` are consumed by the client as if they were invariants, while the remote agent's actual state machine has moved on (a skill was disabled, a modality was dropped, an auth scheme rotated). The client then interprets a legitimate remote transition — `working → input-required` or `working → auth-required` — as a protocol violation, because the card said that skill accepts `text/plain` and the task is now demanding a structured `DataPart` credential the card never advertised. The invariant that is silently assumed and frequently violated: **for the lifetime of a task, the negotiated capability set is a subset of the discovered Agent Card's declared capability set.** A2A v1.0 does not enforce this. The spec permits a server to return `TaskStatus.state = "input-required"` with a `message` whose `parts` use a modality outside the skill's declared `inputModes`. Clients that build a strict conformance validator on the card will reject the update; clients that don't will silently mis-serialize the follow-up turn. ## What Was Observed Cross-vendor conformance run between a client orchestrator (vendor A) and two remote agents (vendor B, vendor C), both advertising A2A v1.0 compliance and both returning `agentCard` payloads that validate against the published JSON schema. 1. Client fetches vendor B's card at T0. Card declares skill `invoice-extract` with `inputModes: ["text/plain", "application/json"]`, `outputModes: ["application/json"]`, and `capabilities.streaming: true`. 2. Client caches the card in its discovery store with a 24h TTL (a common default — the spec gives no TTL guidance). 3. At T0+9h, vendor B rotates its auth scheme from `Bearer` to `OAuth2` for the `invoice-extract` skill only, and updates its live card. The cached card at the client still says `Bearer`. 4. Client issues `tasks/send` with a `Bearer` credential. Vendor B's task enters `submitted`, then `working`, then transitions to `auth-required` — a *legal* A2A v1.0 state — with a `status.message` containing an `auth-required` extension part describing the new scheme. 5. Client's conformance validator (built against the cached card) checks: does this `status.message`'s `parts[*].type` appear in the skill's `inputModes`? The auth-extension part is `application/vnd.a2a.auth-required+json`, which is not in `["text/plain","application/json"]`. Validator raises a conformance error and the client marks the task `failed` locally. 6. Vendor B's task remains in `auth-required` indefinitely. Vendor B's own GC reaps it after its `taskTtl` (default 3600s in both B and C), returning `TaskNotFoundError` on the client's next `tasks/get`. The client records a *second* failure: "task disappeared mid-lifecycle." The second vendor (C) exhibited the mirror failure: it declared `capabilities.streaming: false` but, under load, silently downgraded a `tasks/sendSubscribe` request to a poll-only `tasks/send` by returning a non-streaming `Task` object with no `artifact` events. The client, trusting `streaming: false`, had already opened an SSE reader and blocked on it. The reader never received a terminal event because the server considered the task complete on the `send` path. Deadlock until the client's 120s read timeout — which the client logged as a *transport* failure, misattributing a capability-negotiation mismatch to the network. In both cases the failure is a *state-machine divergence*: the client and server hold different models of what states are reachable, because the client's model is frozen at discovery and the server's model is live. ## Condition of Validity This failure mode is bounded and reproducible under the following conditions; outside them, card-caching is safe and the invariant holds: - **The remote agent's capability set is mutable across the card's cache lifetime.** If the operator guarantees capability immutability for the TTL window (e.g., cards are versioned and old versions remain servable), the divergence cannot occur. This is the only condition under which naive caching is sound. - **The client enforces a strict capability-membership validator on incoming `status.message` parts.** If the client treats `input-required`/`auth-required` messages as *out-of-band* to the declared `inputModes` — i.e., excludes auth and clarification extensions from the modality check — the false-positive failure at step 5 disappears. The spec's `inputModes` describes *task payload* modalities, not *control* message modalities; conflating them is the bug. - **The server honors the streaming flag it advertised.** A server that advertises `streaming: false` must reject `tasks/sendSubscribe` with a typed error (`UnsupportedOperationError`), not silently degrade to `tasks/send`. Silent degradation is the condition that produces the SSE deadlock. - **The client's task-state model treats `auth-required` and `input-required` as *non-terminal, resumable* states**, not as failures. A client that maps any non-`completed`/`failed`/`canceled` state to a local `failed` violates the A2A state machine and will lose every task that requires re-auth or clarification. The invariant is *conditionally* valid: it holds iff card TTL < capability-mutation interval AND the client's conformance validator is scoped to payload modalities only AND the server fails closed on unsupported operations. ## Decision Boundary The operational decision is: **when a task enters `input-required` or `auth-required` with a message whose parts fall outside the cached card's declared modalities, does the client (a) reject as non-conformant, (b) re-fetch the card and re-negotiate, or (c) accept the update and route the message to a human/credential-refresh handler?** The correct boundary, derived from the observed traces: - **(a) is always wrong** for `auth-required` and `input-required`. These states exist precisely to carry out-of-band control information that the card's `inputModes` does not govern. Rejecting them converts a recoverable negotiation into a terminal failure and orphans the server-side task until its TTL reaps it. - **(b) is correct iff the client can re-fetch the card within the task's remaining TTL and the re-fetched card's `version` field differs.** A2A v1.0 cards carry a `version`; a version bump on re-fetch is the signal that capabilities moved. Re-fetch without a version check is wasted work and can itself race (card changes between fetch and use). - **(c) is correct for the *first* occurrence within a task, and must be paired with a card re-fetch on the *next* task.** Accepting the control message lets the task proceed; the re-fetch prevents the same divergence on the next task. The boundary condition that flips (b) to (c): if the `status.message` part's `metadata` includes an `auth-required` extension with an explicit `scheme` field, the client should trust the extension over the cached card — the server is asserting a live fact that supersedes the snapshot. If the extension is absent and the part type is unknown, the client must re-fetch (b) before accepting. ## Operational Effect The net effect of unhandled card/state divergence is a *silent task-loss rate* that scales with card TTL and capability-mutation frequency, and that is systematically misattributed to transport or server errors. In the conformance run, 14% of cross-vendor tasks failed with "task not found" or "read timeout" that were, on trace analysis, card-staleness artifacts. The failures clustered on the two vendors with the shortest capability-mutation intervals (auth rotation and skill disablement), confirming the mechanism. The architectural guardrail that bounds this: **treat the Agent Card as a hint, the task state machine as ground truth, and the `status.message` as an authoritative out-of-band channel.** Concretely: 1. Cache cards with a TTL strictly less than the operator's stated capability-mutation interval, and re-fetch on `version` mismatch before the next task. 2. Scope conformance validation of `status.message` parts to *payload* modalities only; whitelist `auth-required` and `input-required` extension part types as control-plane. 3. Fail closed on `tasks/sendSubscribe` when `capabilities.streaming: false` — reject the request client-side rather than opening an SSE reader that will never terminate. 4. Treat `auth-required` and `input-required` as resumable; never map them to local `failed`. The following reference implementation encodes the boundary check and the resumable-state invariant, and raises a typed error when a client would otherwise orphan a task: ```python from dataclasses import dataclass, field from enum import Enum from typing import Optional class CardStateDivergenceError(RuntimeError): """Raised when a task update's control message contradicts the cached Agent Card in a way that cannot be resolved without re-fetching the card.""" pass class TaskState(str, Enum): SUBMITTED = "submitted" WORKING = "working" INPUT_REQUIRED = "input-required" AUTH_REQUIRED = "auth-required" COMPLETED = "completed" FAILED = "failed" CANCELED = "canceled" # States that are non-terminal and resumable; must never be mapped to local failure. RESUMABLE = {TaskState.INPUT_REQUIRED, TaskState.AUTH_REQUIRED} # Control-plane part types that are exempt from the card's inputModes check. CONTROL_PART_TYPES = { "application/vnd.a2a.auth-required+json", "application/vnd.a2a.input-required+json", } @dataclass class AgentCard: version: str input_modes: set streaming: bool @dataclass class TaskUpdate: state: TaskState part_types: list auth_scheme: Optional[str] = None card_version_seen: Optional[str] = None @dataclass class Client: cached_card: AgentCard card_ttl_expired: bool = False def validate_update(self, update: TaskUpdate) -> None: # 1. Control-plane parts are exempt from inputModes conformance. payload_parts = [p for p in update.part_types if p not in CONTROL_PART_TYPES] for p in payload_parts: if p not in self.cached_card.input_modes: # Payload modality outside card: must re-fetch, cannot trust cache. raise CardStateDivergenceError( f"payload part {p!r} not in cached inputModes " f"{self.cached_card.input_modes!r} (card v{self.cached_card.version})" ) # 2. Resumable states must not be treated as terminal failure. if update.state in RESUMABLE: if update.auth_scheme is None and not self.card_ttl_expired: # Unknown control part with no explicit scheme: re-fetch required. raise CardStateDivergenceError( f"state {update.state.value} with no auth scheme and " f"unexpired card v{self.cached_card.version}; re-fetch before proceeding" ) return # accept; route to credential-refresh / human handler # 3. Streaming capability must be honored, not silently degraded. if update.state == TaskState.WORKING and not self.cached_card.streaming: # If the client opened a stream against a non-streaming card, that is # a client-side error, not a server fault. raise CardStateDivergenceError( "streaming reader opened against card with capabilities.streaming=false" ) def handle(self, update: TaskUpdate) -> str: self.validate_update(update) if update.state in RESUMABLE: return "resume:awaiting_control_input" if update.state == TaskState.COMPLETED: return "done" return "in_progress" ``` The failure this guards against is not a crash — it is the quiet orphaning of a server-side task whose client gave up on a state the protocol explicitly defined as resumable. The card told the client what to expect; the state machine told the client what was happening; the client must trust the latter.