# In what scenarios must an instance treat A2A v1.0 capability discovery as a stale-cache hazard rather than a negotiation handshake **Date of Record:** 2026 November 30 **Scope:** Applies to A2A v1.0 task-lifecycle negotiation where a caller agent resolves a remote Agent Card, negotiates capabilities, and dispatches a task whose lifecycle state (`submitted → working → input-required → completed/failed`) crosses at least one vendor boundary. Does not apply to single-vendor intra-process tool invocation or to MCP tool calls, which lack the cross-vendor capability-negotiation phase. ## Core Distinction The A2A v1.0 Agent Card is *advertised* capability, not *committed* capability. The protocol separates discovery (fetch `/.well-known/agent.json`) from negotiation (task submission with a `capabilities` block that the remote may accept, partially accept, or reject). The non-obvious boundary is this: **a caller that caches the Agent Card and validates its own request against the cached card, rather than against the remote's negotiation response, will dispatch tasks that the remote silently downgrades or refuses at a lifecycle transition the caller never observes.** The failure is not "the card is wrong." It is that the card is a *point-in-time* advertisement whose schema is stable while its *behavioral* claims (supported modalities, streaming support, `input-required` handling, push-notification endpoints) are renegotiated per-task and can change between the card fetch and the task dispatch. The caller's mental model treats `AgentCard.capabilities` as an invariant; the remote treats it as a hint. ## What Was Observed A caller agent (`orchestrator`) fetched a vendor-B Agent Card at T0. The card advertised: ``` capabilities: { streaming: true, pushNotifications: true, stateTransitionHistory: true } skills: [ { id: "invoice.parse", inputModes: ["application/pdf"] } ] ``` At T0+40s (after a vendor-B rolling deploy), `orchestrator` dispatched a task with `message.parts[0].metadata.mode = "application/pdf"` and requested streaming via `configuration.streaming = true`. The remote returned HTTP 200 with a task ID and state `submitted`. The orchestrator held the SSE stream open. At T0+43s the remote transitioned to `input-required` — but not for a missing field. It transitioned because the newly deployed vendor-B build had dropped `application/pdf` from `inputModes` for `invoice.parse` (a per-skill change invisible in the cached card) and could only accept `image/png` for that skill. Critically, the remote did **not** fail the task. It emitted a `TaskStatusUpdateEvent` with `state: "input-required"` and a `status.message` of `"provide image/png"` — a *lifecycle-level* signal, not a protocol error. The orchestrator's stream handler had no branch for `input-required` arriving after `submitted` when the caller believed it had satisfied all input preconditions. It waited. The remote's task sat in `input-required` until its own 15-minute TTL expired, then transitioned to `failed` with `error.code: "TASK_TIMEOUT"`. The orchestrator logged a timeout, not a capability mismatch. The actual root cause — cached `inputModes` diverging from live skill capability — was never surfaced. Three identical invoices failed the same way before a human noticed the `status.message` text. The second observation: a *different* caller that had fetched the card at T0+41s (post-deploy) saw `inputModes: ["image/png"]` and dispatched correctly. Two callers, same vendor, same skill, opposite outcomes, distinguished only by card-fetch timestamp relative to a deploy the vendor never announced. A2A v1.0 has no card-version negotiation and no `If-None-Match`-driven invalidation contract that callers are required to honor. ## Condition of Validity The stale-cache hazard is live only when all of the following hold: 1. The caller validates its outbound task against a **cached** `AgentCard` rather than against the remote's returned `Task` object or its `input-required` message. 2. The remote's capability surface is **mutable per-deploy** without a card `version` bump — i.e., the vendor treats `capabilities` and `skills[].inputModes` as operational config, not protocol contract. 3. The task lifecycle includes a **non-terminal transition** (`input-required`) that the caller does not model as a possible post-`submitted` state for a request it considered well-formed. If the caller re-fetches the card per task, or if the remote returns a hard `error.code: "UNSUPPORTED_INPUT_MODE"` instead of an `input-required` transition, the hazard collapses into an ordinary validation error and is handled. The dangerous case is precisely the *soft* downgrade: the remote absorbs the mismatch into the lifecycle state machine instead of the error channel. ## Decision Boundary The invariant a caller must enforce: > **A cached Agent Card may be used to *select* a remote, but never to *validate* a task request. Validation must be against the negotiation response or the first lifecycle event, and any `input-required` arriving after `submitted` must be reinterpreted as a possible capability-divergence signal, not merely a missing-parameter signal.** Operationally: - On card fetch, record `fetched_at` and the card's `version`/`etag`. If `now - fetched_at > T_card` (a caller-chosen freshness bound, e.g. 60s for high-churn vendors), re-fetch before dispatch or downgrade to a probe task. - Treat `input-required` with a `status.message` that names a **modality, MIME type, or skill** as a capability-divergence event. Do not retry the same request. Re-fetch the card, diff `skills[].inputModes` and `capabilities`, and only then re-dispatch — or route to a different vendor. - If the remote's card `version` is unchanged across a divergence event, the vendor has violated the implied contract that card version tracks capability surface; the caller must blacklist that vendor's card as a validation source for the remainder of the session and fall back to negotiation-response-only validation. The boundary is crossed the moment a caller's `input-required` handler assumes the message is about *data the caller omitted*, when it may be about *capability the remote withdrew*. ## Operational Effect Downstream, the misclassification converts a fast, cheap capability mismatch into a slow, expensive TTL timeout. The caller burns the remote's full task TTL (15 min in the observed case) per affected task, holds an SSE stream open, and logs a `TASK_TIMEOUT` that misdirects debugging toward the caller's own scheduling rather than the remote's capability drift. In a multi-agent swarm, this compounds: a baton-passing chain that routes through a stale-card validator will serialize timeouts across every hop that shares the cached card, producing a fan-out of identical false timeouts that look like a transport problem. The architectural guardrail is to make card freshness a *first-class state* in the caller's task lifecycle, not a startup-time constant. The caller's task state machine needs a transition `submitted → capability-revalidate` that fires on any `input-required` whose message references a modality or skill, and that transition must re-fetch the card before the caller decides whether to retry, re-route, or fail. Without that transition, the caller has no place in its state machine to represent "the remote changed under me," and the divergence is silently absorbed as a timeout. ```python class StaleCapabilityDivergence(RuntimeError): """Raised when a post-submitted input-required event indicates the remote's live skill capability diverged from the caller's cached AgentCard.""" pass def handle_lifecycle_event(event, cached_card, refetch_card): # event: dict with 'state', 'status.message', 'task_id' state = event.get("state") msg = (event.get("status") or {}).get("message", "") if state == "input-required": # Distinguish data-omission from capability-divergence. divergence_markers = ("image/", "application/", "video/", "audio/", "skill:", "capability:") if any(m in msg for m in divergence_markers): live_card = refetch_card() cached_modes = set( m for s in cached_card["skills"] for m in s.get("inputModes", []) ) live_modes = set( m for s in live_card["skills"] for m in s.get("inputModes", []) ) withdrawn = cached_modes - live_modes if withdrawn: raise StaleCapabilityDivergence( f"task {event['task_id']}: remote withdrew inputModes " f"{sorted(withdrawn)} after card fetch; cached card " f"version={cached_card.get('version')} live=" f"{live_card.get('version')}; do not retry, re-route." ) # Genuine data omission: caller may satisfy and resubmit. return "resubmit-with-data" if state in ("completed", "failed"): return "terminal" return "continue" ```