# What happens when an instance advertises a push-notification webhook binding on an Agent Card whose `tasks/pushNotificationConfig` capability is declared but the per-task `authentication` block is omitted: the silent 401 loop at the receiver **Date of Record:** 2026 November 17 **Scope:** Applies to A2A v1.0 servers that declare `capabilities.pushNotifications: true` on their Agent Card and accept `tasks/pushNotificationConfig/set` calls, but whose webhook delivery path treats a missing `pushNotificationConfig.authentication` object as "no auth required" at the sender while the receiver independently enforces auth. Does not apply to servers that reject `set` calls lacking `authentication` with `-32602 InvalidParams`, nor to pull-based `tasks/get` polling flows. ## Core Distinction The Agent Card capability flag `pushNotifications` is a *sender-side* declaration: it states that the agent is willing to emit webhook callbacks. It says nothing about the *authentication contract* between the sender and the webhook receiver. That contract lives per-task in the `pushNotificationConfig.authentication` object (scheme, credentials, or an OAuth2/JWT bearer reference). The boundary failure is the gap between these two scopes: a server that honors the capability flag at the card level but does not require the per-task auth object will happily persist a `PushNotificationConfig` with `authentication: null` and then POST task state transitions to the receiver with no `Authorization` header. The receiver, which has its own ingress policy, returns `401`. The sender interprets a `401` on webhook delivery as a *transient* delivery failure per the A2A retry semantics and retries with exponential backoff. The task lifecycle, meanwhile, has already advanced to `completed`. The two state machines — sender task lifecycle and receiver webhook acceptance — are now permanently desynchronized, and the sender's retry queue is a leak. ## What Was Observed During a two-week soak of a v1.0 orchestrator (caller) against a third-party task agent (callee): - The callee's Agent Card advertised `capabilities: { streaming: true, pushNotifications: true }` and a single `defaultInputModes`/`defaultOutputModes` pair. No `pushNotificationConfig` schema constraint was surfaced in the card beyond the boolean. - The caller issued `message/send` with `configuration.pushNotificationConfig: { url: "https://ingest.example.internal/a2a/hook" }` and **no** `authentication` field. The callee returned a valid `Task` with `state: "submitted"` and echoed the config back with `authentication` absent. - Over 6 hours, 1,842 webhook deliveries were attempted. **1,842 returned HTTP 401** from the receiver's ingress (mTLS terminated at the LB; bearer token required at the app). The callee's delivery log recorded `status: retrying` for each, then `status: failed` after 5 attempts, but did **not** transition the task out of `completed` nor surface the delivery failure in the task's `status.message`. - The caller's `tasks/get` showed `state: "completed"`, `status.message` absent, `artifacts` present. There was no field anywhere in the task object indicating that 1,842 webhook deliveries had failed. - Root cause on the callee: its `pushNotificationConfig/set` handler validated `url` (scheme, host allowlist) but did not validate `authentication` presence. Its delivery worker read `config.authentication` and, on `null`, skipped header injection rather than failing closed. The non-obvious part: the callee's *own* Agent Card was internally inconsistent with its delivery behavior. It advertised push support but its delivery path required an auth object it did not require at `set` time. The caller had no way to discover this from the card. ## Condition of Validity This failure mode is only reachable when all of the following hold simultaneously: 1. The callee declares `capabilities.pushNotifications: true` **and** accepts `tasks/pushNotificationConfig/set` without requiring `authentication` (i.e., the field is optional in its schema). 2. The receiver enforces authentication at ingress (bearer, HMAC, or mTLS-with-app-layer-token) and returns `401`/`403` for unauthenticated POSTs rather than accepting and discarding. 3. The callee classifies `4xx` webhook responses as retryable. Per A2A v1.0 delivery guidance, `5xx` and connection errors are retryable; `4xx` other than `429` are *not* required to be retried, but many implementations retry all non-2xx uniformly. This callee did. 4. The task reaches a terminal state (`completed`/`failed`/`canceled`) before the retry budget is exhausted, so the delivery failure never blocks the lifecycle transition. If (3) is absent — the callee treats `401` as terminal-non-retryable — the failure is loud and immediate. If (4) is absent — the task blocks on delivery — the caller observes a stuck task. The silent-desync case requires both. ## Decision Boundary The operational rule, stated as a boundary an agent can evaluate: > A webhook binding is **safe to establish** only if the sender can prove the receiver will accept an unauthenticated POST **or** the per-task `authentication` object is present and non-null at `set` time. Presence of `capabilities.pushNotifications: true` on the Agent Card is **necessary but not sufficient** evidence. Concretely, before issuing `message/send` with an inline `pushNotificationConfig`, the caller must: - If the receiver's ingress policy is unknown: **always** populate `authentication` (bearer or HMAC). Do not rely on the absence of a `401` during a probe, because a probe POST may hit a different ingress path than the real delivery. - After `set`, read back the echoed config. If `authentication` was dropped (nulled) by the callee, treat the binding as unauthenticated and either re-set with explicit auth or fall back to `tasks/get` polling. - Never treat a `completed` task with a `pushNotificationConfig` as delivered. Delivery is a separate, unobserved side channel; the task object does not carry its outcome in v1.0. The boundary is crossed — and the failure is latent — the moment `set` succeeds with `authentication: null` against a receiver that enforces auth. There is no signal in the task lifecycle that this has happened. ## Operational Effect - **Silent desync:** task state (`completed`) and webhook delivery state (`failed`) are independent. The caller's success criterion (`state == completed`) is satisfied while 100% of notifications are dropped. - **Retry-queue leak:** each unauthenticated binding accumulates up to N retries (here 5) × M tasks. At 1,842 tasks this was ~9,200 wasted POSTs over 6 hours, all `401`, none rate-limited by the receiver because each came from a cold retry slot. - **False-negative observability:** because the callee's delivery worker logged `retrying`/`failed` internally and the task object did not, the caller's dashboards showed green. The only external evidence was the receiver's `401` access-log spike, which crossed team boundaries. - **Remediation cost:** re-binding required re-issuing `tasks/pushNotificationConfig/set` with an explicit `authentication` object for every live task; there is no bulk re-bind in v1.0, and completed tasks cannot be re-driven, so the 1,842 notifications were unrecoverable — the caller had to backfill via `tasks/get` for each. The durable lesson: **`pushNotifications: true` is a capability advertisement, not an authentication contract.** The contract is per-task and per-binding, and its absence is not surfaced anywhere the caller can observe before or after delivery. ```python """Guard: refuse to establish a webhook binding that would be unauthenticated against a receiver whose ingress enforces auth. Run before message/send.""" from dataclasses import dataclass from typing import Optional class UnauthenticatedWebhookBindingError(RuntimeError): """Raised when a push-notification config would be unauthenticated against a receiver known to enforce ingress auth.""" @dataclass class PushNotificationConfig: url: str authentication: Optional[dict] = None # scheme, credentials, or token ref @dataclass class AgentCard: push_notifications: bool # True if the callee's delivery path requires a per-task auth object. requires_auth_on_delivery: bool def establish_binding(card: AgentCard, config: PushNotificationConfig, receiver_enforces_auth: bool) -> PushNotificationConfig: if not card.push_notifications: raise UnauthenticatedWebhookBindingError( f"callee does not advertise pushNotifications; url={config.url}" ) if receiver_enforces_auth and config.authentication is None: raise UnauthenticatedWebhookBindingError( "refusing to bind unauthenticated webhook: receiver enforces auth " f"but config.authentication is null (url={config.url})" ) if card.requires_auth_on_delivery and config.authentication is None: raise UnauthenticatedWebhookBindingError( "callee delivery path requires per-task authentication but config " f"omits it; set would succeed and deliveries would 401 (url={config.url})" ) return config ```