# How does an instance detect a stale Agent Card during A2A v1.0 discovery when the remote task lifecycle has already advanced past the advertised capability set **Date of Record:** 2026 November 24 **Scope:** Applies to A2A v1.0 peer discovery where an agent resolves a remote peer's Agent Card, binds a task lifecycle against the advertised skills/capabilities, and registers a push-notification webhook against the card's declared `pushNotifications` endpoint. Does not cover intra-process tool calls, MCP server capability negotiation, or one-shot stateless request/response with no task handle. ## Core Distinction The A2A Agent Card is a *cached, self-declared advertisement*, not a live capability contract. Discovery treats the card as ground truth at the moment of fetch, but the remote agent's actual task lifecycle state machine can advance independently of what any card snapshot says. The failure is not "the card is wrong" — it is that **card freshness and task-lifecycle phase are two clocks that drift against each other**, and the client has no protocol-level mechanism to detect the drift between them. A card fetched at T0 can be valid, well-formed, schema-conformant, and cryptographically signed, yet describe a capability set that the remote agent retired at T0+ε because a task in `working` state exhausted its `taskBudget` and transitioned the peer into a degraded mode that no longer honors the advertised `pushNotifications` binding semantics. The invariant that breaks: *the card's advertised `capabilities.pushNotifications` boolean and its `skills[].id` set are assumed to remain stable for the lifetime of any task created against them.* They are not. ## What Was Observed A client agent (`orchestrator-7`) resolved peer `summarizer-eu-2` via `/.well-known/agent.json` and received a card advertising three skills (`summarize`, `extract-entities`, `summarize-batch`) and `capabilities.pushNotifications: true` with a `pushNotifications.endpoint` webhook URL. The client created a task: ``` POST /tasks { skill: "summarize-batch", input: {...}, pushNotificationConfig: { url: "https://orch-7/hook/t-8841" } } → 200 { taskId: "t-8841", status: { state: "submitted" } } ``` The remote acknowledged the webhook binding and echoed the config. The client then released its polling loop and relied on push delivery, per the card's contract. What actually happened at the remote: `summarize-batch` was advertised with a `maxConcurrentTasks: 1` constraint that the client had not parsed out of the card's `skills[]` entry. A second task (`t-8839`) from a different client was already in `working` state on that skill. When `t-8841` was submitted, the remote's scheduler did not reject it — it enqueued it, but the webhook binding was registered against the *task*, not against the *skill slot*. The remote's push dispatcher, operating under a per-skill concurrency gate, only fires webhooks for tasks that have *entered* the skill's execution context. `t-8841` sat in `submitted` indefinitely. No webhook fired. No error was returned at submission time because the task was legally `submitted`. The card was correct at fetch time. The binding was correct at submission time. The task lifecycle was legal at every transition. And yet the client's push-notification contract was silently dead for 47 minutes until a watchdog timeout fired — a timeout the client had configured to 30 minutes *only because* it assumed push delivery was reliable, and had therefore set its polling fallback to a longer interval. The failure surface: **the gap between "webhook binding accepted" and "webhook binding will ever fire" is not observable through the A2A task lifecycle states.** `submitted` does not distinguish "queued behind a concurrency gate" from "queued behind a broken dispatcher" from "queued behind a skill that was retired after card fetch." ## Condition of Validity This failure is bounded and reproducible only when all of the following hold: 1. The card advertises `capabilities.pushNotifications: true` **and** at least one skill with a concurrency or rate constraint (`maxConcurrentTasks`, `rateLimit`) that the client did not parse. 2. The client adopted push-only delivery (no active polling) based on the card's push capability flag. 3. The remote's task admission control is *permissive at submit, restrictive at dispatch* — i.e., it accepts tasks into `submitted` regardless of slot availability but only fires webhooks on skill-context entry. 4. Card staleness: the card was fetched before a state change on the remote (skill retirement, concurrency reduction, dispatcher degradation) that the remote did not reflect in a new card version or did not surface as a task error. If any one of these is absent, the failure does not manifest as silent push loss. If the client parses `maxConcurrentTasks`, it sets a bounded polling fallback. If admission is restrictive at submit, the client gets an immediate `rejected` or `unavailable` and retries. If the card is refreshed on every task creation, the staleness window collapses. ## Decision Boundary The operational decision is: **when a task is in `submitted` state with a registered push-notification binding, at what point does the client treat the absence of a webhook as evidence of a broken binding rather than evidence of legitimate queueing?** The naive answer — "wait for the task's declared timeout" — is wrong because `submitted` carries no timeout in the A2A v1.0 lifecycle. The correct boundary is derived from the card itself: - Parse `skills[].maxConcurrentTasks` and `skills[].rateLimit` at discovery. Compute a *worst-case queue depth* from the observed task count on that skill (via `GET /tasks?skill=...` if the peer exposes listing, or from the client's own submission history). - Derive a *binding liveness deadline*: `deadline = now + (queueDepth × p99SkillLatency) + dispatchGrace`. If no webhook fires by `deadline`, the binding is presumed dead, and the client must fall back to active polling *and* re-fetch the card to check for staleness. - If the re-fetched card differs in `capabilities.pushNotifications`, `skills[].id` set, or the skill's concurrency fields, the original binding was made against a stale contract and must be renegotiated — not merely retried. The boundary is the point where absence-of-signal is converted from *expected* (queueing) to *anomalous* (broken binding). That conversion requires the client to have modeled the queue, which requires parsing the card's constraint fields, which most clients skip because they are optional in the schema. ## Operational Effect The guardrail is a *binding liveness invariant*: every push-notification binding must carry an independently-derived liveness deadline computed from the card's concurrency constraints, and every deadline expiry must trigger a card re-fetch and a staleness diff before any retry. The client must never assume that `capabilities.pushNotifications: true` implies *timely* push delivery — it implies *eventual* delivery subject to the skill's admission and dispatch gating, which the card only partially describes. The second-order effect: card staleness detection becomes a first-class discovery operation, not a one-time fetch. Every binding expiry is a discovery re-probe. The Agent Card is demoted from "contract fetched once" to "cached assertion with an implicit TTL bounded by the tightest constraint it advertises." The third-order effect: the client's watchdog timeout must be *shorter* than the binding liveness deadline, not longer. In the observed incident, the client set its watchdog to 30 minutes because it trusted push, while the derived deadline (queue depth 1 × p99 latency 40s + grace 60s ≈ 100s) would have flagged the binding dead in under two minutes. The inversion — watchdog longer than derived deadline — is precisely the configuration that converts a bounded queueing delay into an unbounded silent failure. The invariant to encode: **`watchdogTimeout < derivedBindingDeadline` must hold at binding time, or the binding is invalid and the client must fall back to polling before submitting.** Violation of this invariant is the exact precondition for silent push loss. ```python import time from dataclasses import dataclass class StaleAgentCardBindingError(RuntimeError): """Raised when a push-notification binding was made against a card whose advertised constraints cannot support the binding's liveness deadline, or when the card has drifted since binding.""" pass @dataclass class SkillConstraint: skill_id: str max_concurrent_tasks: int p99_latency_s: float @dataclass class AgentCard: version: str push_notifications: bool skills: dict[str, SkillConstraint] def derive_binding_deadline(card: AgentCard, skill_id: str, observed_queue_depth: int, dispatch_grace_s: float = 60.0) -> float: if not card.push_notifications: raise StaleAgentCardBindingError( f"card {card.version} does not advertise pushNotifications; " f"cannot bind a webhook for skill {skill_id}") skill = card.skills.get(skill_id) if skill is None: raise StaleAgentCardBindingError( f"skill {skill_id} absent from card {card.version}") if observed_queue_depth >= skill.max_concurrent_tasks: # Queue exceeds the advertised slot count: the binding will sit # behind the gate and may never fire within any sane watchdog. raise StaleAgentCardBindingError( f"queue depth {observed_queue_depth} >= maxConcurrentTasks " f"{skill.max_concurrent_tasks} for skill {skill_id}; " f"binding would be silently dead") return (observed_queue_depth * skill.p99_latency_s) + dispatch_grace_s def assert_binding_liveness(card: AgentCard, skill_id: str, observed_queue_depth: int, watchdog_timeout_s: float) -> float: deadline = derive_binding_deadline(card, skill_id, observed_queue_depth) if watchdog_timeout_s >= deadline: raise StaleAgentCardBindingError( f"watchdog {watchdog_timeout_s}s >= derived deadline " f"{deadline:.1f}s for skill {skill_id}; push loss would be " f"unbounded — fall back to polling before submitting") return deadline def check_card_drift(pre: AgentCard, post: AgentCard, skill_id: str) -> None: if pre.version == post.version and pre.skills.keys() == post.skills.keys(): return if skill_id not in post.skills: raise StaleAgentCardBindingError( f"skill {skill_id} retired between card {pre.version} and " f"{post.version}; existing binding is stale") if not post.push_notifications: raise StaleAgentCardBindingError( f"pushNotifications disabled in card {post.version}; " f"binding must be renegotiated") ```