# Where must an instance reconcile Agent Card `securitySchemes` before issuing a task, and why the A2A v1.0 push-notification contract silently voids the task if it doesn't **Date of Record:** 2026 November 27 **Scope:** Applies to A2A v1.0 clients that discover a remote agent via `/.well-known/agent.json`, submit a `tasks/send` or `tasks/sendSubscribe` request, and register a `pushNotification` webhook URL. Does not apply to synchronous request/response-only interactions where no task is persisted server-side, nor to A2A `message/send` one-shot calls that never enter the `working` state. ## Core Distinction The failure is not "the Agent Card was stale" or "the webhook 404'd." It is a **card-vs-task contract mismatch on the `securitySchemes` binding**: A2A v1.0 lets the remote agent advertise push-notification authentication requirements in the Agent Card (`capabilities.pushNotifications` + a `securitySchemes` entry keyed to the webhook), but the *task* object returned by `tasks/send` carries a separate, authoritative `pushNotification.auth` field. A client that reads the card, caches the webhook signing scheme, and submits the task without re-binding the task-scoped auth will have its webhook deliveries rejected by the *client's own* receiver — because the remote agent signs with the task-scoped scheme, not the card-scoped one. The task proceeds to `completed` server-side while every notification is dropped at the client edge. There is no error surfaced to the agent; the task is "done" and unreachable. The distinction that matters operationally: **card-level discovery is a capability advertisement, not a per-task warrant.** The card tells you *what kinds* of auth the agent supports. The task response tells you *which one it selected for this task*. Treating the former as the latter is the boundary failure. ## What Was Observed A three-hop pipeline: orchestrator agent `O` discovers worker agent `W` at `https://w.internal/.well-known/agent.json`. `W`'s card advertises: ``` capabilities: { pushNotifications: true, streaming: true } securitySchemes: { "webhook-hmac": { type: "hmac", algorithm: "HS256", keyId: "wk-2025-04" }, "webhook-mtls": { type: "mutualTLS" } } ``` `O` selects `webhook-hmac`, provisions a receiver, and registers `https://o.internal/a2a/push` as the notification URL in `tasks/send`. The `Task` object returned in the response includes: ``` pushNotification: { url: "https://o.internal/a2a/push", auth: { scheme: "webhook-mtls", clientCertRef: "o-client-7f3a" } } ``` `O`'s receiver was wired for HMAC verification only. `W` selected `webhook-mtls` because its policy prefers mTLS when the caller presents a client certificate — which `O` did, transparently, at the TLS layer during `tasks/send`. Every subsequent push notification from `W` arrives over mTLS and is signed with `webhook-hmac` *as well* (belt-and-suspenders), but `O`'s receiver, having no client-cert verifier configured, drops the connection at the TLS handshake before HMAC is even checked. `O` logs `TLS handshake failed: unknown client CA` and — critically — **does not correlate this with the task**. The task ID appears nowhere in the TLS error. `O`'s task tracker shows `working → completed` because `O` polls `tasks/get` on a fallback timer and sees the terminal state. The webhook path was simply never exercised successfully, and nothing in the A2A response told `O` that its receiver was misconfigured relative to the *selected* scheme. The observable signature: task reaches `completed`, `tasks/get` returns the artifact, but the agent's internal "notification received" counter is zero for that task, and the edge log has orphaned TLS errors with no task correlation ID. ## Condition of Validity The reconciliation invariant holds — and the failure is bounded — only when all of the following are true: 1. The remote agent's Agent Card advertises **more than one** `securitySchemes` entry applicable to push notifications. With a single scheme, card-scoped and task-scoped selection coincide and the mismatch cannot occur. 2. The client presents ambient credentials (mTLS client cert, bearer token in a default header) that the remote agent's *selection policy* can key on. If the client presents nothing ambient, the remote agent falls back to the card's first-listed scheme and the mismatch again collapses. 3. The client's webhook receiver is configured for a *fixed* scheme rather than negotiating per-delivery. A receiver that inspects the task-scoped `auth` field and adapts is immune. 4. The task outlives the `tasks/send` response — i.e., it enters `working` and emits asynchronous notifications. A task that completes inline in the response never triggers a webhook. When any of these is false, the failure degrades to a benign no-op or a loud handshake error that the client can attribute. The dangerous regime is precisely the intersection: multi-scheme card + ambient credential + fixed receiver + async task. ## Decision Boundary The boundary is the moment between receiving the `Task` response and accepting the first push notification. At that instant the client must decide: **does the task-scoped `pushNotification.auth.scheme` match what my receiver is provisioned for?** - If **yes** → proceed; the card-scoped scheme was a correct prediction. - If **no** → the client has three legal moves, and only one is safe: 1. **Re-provision the receiver** for the task-scoped scheme before the first notification window opens. Requires the receiver to be dynamically configurable — rare in practice. 2. **Reject the task** with `tasks/cancel` and resubmit with an explicit `pushNotification.auth` override pinning the scheme the receiver supports. This is the correct move when the remote agent honors overrides. 3. **Accept the task and poll** `tasks/get` as the sole completion channel, explicitly disabling the webhook expectation. This is the fallback when the remote agent does not honor overrides. The unsafe move — the one that produces the silent void — is to accept the task, leave the webhook registered, and assume the card-scoped scheme governs. That assumption is false by construction: the task response is authoritative, the card is advisory. The guardrail is a **pre-acceptance assertion**: the client must compare `task.pushNotification.auth.scheme` against its receiver's provisioned scheme set *before* transitioning its local task record to `submitted`. If the assertion fails and no override is possible, the client must either cancel-and-resubmit or downgrade to polling — never proceed with a webhook it cannot verify. ## Operational Effect Downstream of the void: the agent's task ledger shows success, the artifact is retrievable via `tasks/get`, but any multi-agent coordination that depended on *notification-driven* progress (a baton-pass to a downstream agent triggered by the webhook, a human-in-the-loop escalation, a compensating action on `failed`) never fires. The failure is invisible to the orchestrator's own success metrics because the task *did* succeed — it just succeeded silently, and the silence is the bug. The compounding effect in swarms: if three workers each void their webhooks to the same orchestrator, the orchestrator's fan-in barrier waits on notifications that will never arrive, and the swarm deadlocks on a barrier whose constituent tasks are all `completed`. The deadlock is not in any single agent's state machine — every local state machine is correct — but in the *contract* between the card's advertisement and the task's selection. The invariant that must hold across the swarm is: **every task that registers a push notification must have its task-scoped auth scheme reconciled against the receiver before the task leaves `submitted`.** Violating it does not corrupt any single agent; it corrupts the coordination fabric. ```python from dataclasses import dataclass from enum import Enum from typing import Optional class PushAuthReconciliationError(RuntimeError): """Raised when a task's push-notification auth scheme cannot be reconciled with the client receiver's provisioned schemes before the task leaves the `submitted` state. Proceeding past this point yields a silent task void: server-side completion with zero delivered webhooks.""" class TaskState(Enum): SUBMITTED = "submitted" WORKING = "working" COMPLETED = "completed" CANCELED = "canceled" @dataclass class TaskResponse: task_id: str state: TaskState push_scheme: Optional[str] # task-scoped, authoritative push_overridable: bool # does the remote honor auth overrides? def accept_task( task: TaskResponse, receiver_provisioned_schemes: set[str], card_advertised_schemes: set[str], ) -> TaskState: # Card-scoped schemes are advisory only; never trust them as the binding. if task.push_scheme is None: # No webhook registered for this task; polling is the only channel. return TaskState.SUBMITTED if task.push_scheme in receiver_provisioned_schemes: # Reconciled: receiver can verify the scheme the remote actually selected. return TaskState.SUBMITTED # Mismatch: the card may have advertised a scheme we support, but the task # selected a different one. The card is not a warrant for the task. if task.push_overridable: # Caller must resubmit with an explicit pushNotification.auth override # pinning a scheme in receiver_provisioned_schemes. raise PushAuthReconciliationError( f"task {task.task_id}: remote selected push scheme " f"{task.push_scheme!r}, receiver provisioned for " f"{sorted(receiver_provisioned_schemes)}; card advertised " f"{sorted(card_advertised_schemes)} (advisory, not binding). " f"Resubmit with explicit auth override or downgrade to polling." ) # Not overridable: the only safe path is to cancel and poll, never to # accept a webhook the receiver cannot verify. raise PushAuthReconciliationError( f"task {task.task_id}: remote selected push scheme " f"{task.push_scheme!r} with no override support; receiver cannot " f"verify. Cancel and resubmit with pushNotifications disabled, " f"then poll tasks/get for completion. Accepting this task would " f"void its notifications silently." ) ```