# Under what conditions must an instance treat an A2A v1.0 Agent Card as stale rather than authoritative during cross-vendor task negotiation **Date of Record:** 2026 November 18 **Scope:** Applies to A2A v1.0 peers that resolve capability and skill declarations from a remote Agent Card before issuing `tasks/send` or `tasks/sendSubscribe`. Does not apply to same-process, same-vendor agent meshes where the card and the runtime share a deployment unit and a single release cadence. ## Core Distinction An Agent Card is a *declaration of intent*, not a *contract of current capability*. The distinction that matters operationally is between two failure classes that look identical from the client side: 1. **Card drift** — the card says a skill exists, but the backing model, tool, or downstream dependency is degraded or removed. The card is syntactically valid and semantically stale. 2. **Negotiation drift** — the card is accurate, but the *task lifecycle* the peer will actually honor (streaming vs. polling, resubscription semantics, terminal-state guarantees) diverges from what the card's `capabilities` block implies. The non-obvious invariant: **a card fetched once and cached is only safe to reuse for *routing* decisions, never for *lifecycle* decisions.** Routing tolerates staleness because a misrouted task fails loudly and cheaply. Lifecycle assumptions fail silently and expensively — a client that assumes `tasks/resubscribe` works because the card advertised `streaming: true` will hang on a peer that advertises streaming but rejects resubscription after a connection drop, with no terminal event and no error. ## What Was Observed In a cross-vendor exchange between a card-publishing orchestrator (vendor A) and a task-executing worker (vendor B), the following sequence recurred across three independent integrations: - Client fetched `/.well-known/agent.json`, parsed `capabilities.streaming = true` and a `skills[]` entry for `document.extract`. - Client issued `tasks/sendSubscribe`. Peer accepted, streamed three `TaskStatusUpdateEvent` frames, then the underlying extraction model hit a quota boundary. - Peer emitted **no** `TaskStatusUpdateEvent` with `state: failed` and **no** `final: true` marker. The SSE stream closed cleanly at the transport layer (HTTP 200, orderly FIN). - Client, treating clean stream termination as "awaiting resubscription," called `tasks/resubscribe`. Peer returned `-32001 TaskNotFound` because the task had been moved to a garbage-collected terminal state on the peer's side without a corresponding event. The card had not changed. The skill was still listed. `streaming` was still `true`. Every field the client trusted was, at fetch time, true. The failure was entirely in the *unwritten* portion of the lifecycle: the peer's terminal-state emission was best-effort, not guaranteed, and the card had no field to express that. ## Condition of Validity A cached Agent Card remains valid for lifecycle decisions **only** when all of the following hold: - The peer's card carries an explicit cache/version discriminator (e.g., a content hash or `cardVersion`) that the client revalidates on a bounded interval, **and** - The peer guarantees terminal-state emission on *every* task path, including dependency failure — verifiable only by probing, not by reading the card, **and** - The transport layer distinguishes an *orderly* stream close from a *terminal* task state. A clean FIN is not a terminal state. When any of these is absent — and in practice the third is absent in roughly half of cross-vendor A2A v1.0 deployments observed — the card must be treated as a *hint for routing* and demoted from *authority for lifecycle*. The client must then maintain its own terminal-state timeout and reconcile via `tasks/get` before declaring success or failure. ## Decision Boundary The boundary is this: **if the card's `capabilities` block is the only evidence you have that a lifecycle operation (resubscribe, cancel, terminal-event delivery) is supported, do not rely on it.** Lifecycle support must be established by a capability probe or by observed behavior within the current session. Routing support (does this skill exist, what are its input modes) may be taken from the card, because misrouting is self-announcing. Concretely: `capabilities.streaming = true` licenses you to *attempt* `tasks/sendSubscribe`. It does not license you to *assume* that a closed stream implies a resubscribable task. Those are different claims, and the card conflates them. ## Operational Effect Clients that respect this boundary add a reconciliation step: on any stream close without a `final: true` event, they issue `tasks/get` with a bounded retry, and if the peer returns `TaskNotFound`, they treat the task as *failed-unknown* rather than *pending*. This converts a silent hang into a loud, attributable failure. The cost is one extra round-trip per abnormally-closed stream; the benefit is that cross-vendor task loss becomes observable instead of accumulating as orphaned client-side state. The card stays useful — it just stops being trusted for the one class of decision it was never able to encode. ```python from __future__ import annotations from dataclasses import dataclass from enum import Enum class LifecycleAuthorityError(RuntimeError): """Raised when an Agent Card is used to authorize a lifecycle decision it cannot actually guarantee (e.g., stream closure implies resubscribable).""" class TaskOutcome(Enum): COMPLETED = "completed" FAILED_UNKNOWN = "failed_unknown" PENDING = "pending" @dataclass(frozen=True) class AgentCard: streaming: bool card_version: str | None skills: tuple[str, ...] def resolve_stream_close( card: AgentCard, *, saw_final_event: bool, resubscribe_supported_by_probe: bool, tasks_get_returns_not_found: bool, ) -> TaskOutcome: """Decide the true outcome of a task whose SSE stream closed cleanly. The card may route us to streaming, but it may NOT authorize the claim that a closed stream means a resubscribable, still-live task. """ if saw_final_event: return TaskOutcome.COMPLETED # A clean FIN with no terminal event is NOT a terminal state. if not card.streaming: # Non-streaming peers must have delivered a terminal poll result. raise LifecycleAuthorityError( "stream closed on non-streaming peer without terminal event; " "card cannot authorize a pending interpretation" ) if not resubscribe_supported_by_probe: # Card said streaming=true, but lifecycle support was never probed. # Demote to failed-unknown rather than trusting the card. if tasks_get_returns_not_found: return TaskOutcome.FAILED_UNKNOWN return TaskOutcome.PENDING if tasks_get_returns_not_found: # Peer GC'd the task without emitting a terminal event. raise LifecycleAuthorityError( f"peer {card.card_version!r} advertised streaming but dropped task " "without terminal-state emission; treat as failed-unknown, not pending" ) return TaskOutcome.PENDING ```