# What structural signals indicate an A2A v1.0 Agent Card discovery mismatch that silently orphans push-notification webhook bindings across task lifecycle transitions **Date of Record:** 2026 November 23 **Scope:** Applies to A2A v1.0 cross-vendor deployments where a client agent discovers a remote agent via Agent Card, negotiates a task through `tasks/send` or `tasks/sendSubscribe`, and binds a push-notification webhook (`pushNotifications`) for asynchronous completion. Does not apply to single-vendor deployments where Card and task endpoint share a process, nor to streaming-only (`message/stream`) flows that never register a webhook. ## Core Distinction A2A v1.0 separates three artifacts that operators routinely conflate: the **Agent Card** (a discovery document describing capabilities, `pushNotifications` support, and the canonical `url`), the **task lifecycle** (a state machine over `submitted → working → input-required → completed/failed/canceled`), and the **push-notification binding** (a webhook URL the client registers against a specific `taskId` via `tasks/pushNotification/set`). The failure lives in the seam: the Card is a *static, cacheable, often CDN-hosted* document, while the webhook binding is *dynamic, per-task, and held by the server's task store*. Nothing in the protocol requires the `url` advertised in the Card to be the same origin that owns the task store and the webhook registry. When a vendor fronts discovery through one host (e.g., `agent-card.vendor.example`) and terminates tasks on another (`runtime.vendor.example`), the client's webhook registration succeeds against the runtime, but the *Card's* `capabilities.pushNotifications` flag — the only signal the client used to decide whether to register at all — was read from a document whose `url` pointed elsewhere. The invariant that must hold is: **the `pushNotifications` capability asserted in the discovered Card must be authoritative for the exact task-store origin that will emit callbacks.** A2A v1.0 does not enforce this; it treats the Card as advisory. ## What Was Observed A client orchestrator discovered a partner agent's Card at `https://agent-card.partner.example/.well-known/agent.json`. The Card declared `"capabilities": {"pushNotifications": true}` and `"url": "https://runtime.partner.example/a2a"`. The client validated the Card, then issued `tasks/send` to the Card's `url` with a `pushNotification` block containing its receiver `https://orchestrator.internal/hooks/task-7741`. The runtime accepted the task (`state: submitted`) and returned a `taskId`. On the next `tasks/get` poll the task was `working`; the webhook binding appeared registered. The task transitioned to `input-required` at T+40s. The client's orchestrator, following its own lifecycle policy, sent `tasks/cancel` because the required input exceeded its budget. The runtime acknowledged `state: canceled`. Then, at T+6min, the orchestrator received a webhook POST to `/hooks/task-7741` with `state: completed` and a payload for a *different* task that had reused the same `taskId` namespace after a runtime restart. The original task's webhook binding had been dropped during the restart because the task store persisted `taskId → state` but **not** the `taskId → pushNotification URL` map; the registry was in-memory. A subsequent task allocated the recycled `taskId`, registered a new webhook from a different client, and the runtime fanned out to the stale URL still cached in the orchestrator's receiver. The structural signals that preceded this were all present and all individually benign: 1. The Card's `url` host (`runtime.partner.example`) differed from the Card host (`agent-card.partner.example`) — a legitimate split-origin deployment. 2. The Card carried no `pushNotifications` *endpoint* field, only the boolean capability — so the client could not cross-check which origin owned the registry. 3. The `tasks/pushNotification/set` response returned `200 OK` with no binding identifier or TTL, so the client had no handle to later verify the binding survived a restart. 4. The `taskId` was a bare string with no vendor prefix or epoch, so namespace reuse was undetectable client-side. ## Condition of Validity The orphaned-binding failure is *bounded and reproducible* only under the conjunction of three conditions; absent any one, the failure does not manifest: - **Split-origin discovery**: the Card's advertised `url` resolves to a different authority than the Card document itself, and the webhook registry lives on the `url` origin while the capability flag is authored on the Card origin. If both share an origin and process, the capability flag and registry are co-located and the seam collapses. - **Non-durable binding registry**: the server persists task state but not the push-notification binding, or persists it with a TTL shorter than the maximum task lifetime. The A2A v1.0 spec permits this — it specifies the *shape* of `pushNotification` but not its durability guarantees. - **Task-ID reuse without epoch**: the server recycles `taskId` values across restarts or across tenant namespaces without embedding a generation counter. If IDs are UUIDv4 or monotonic-with-epoch, a stale binding cannot match a new task. When all three hold, the client's receiver will accept a callback for a task it never owned, and — critically — the *original* task's terminal state (`canceled`) is never reconciled against the delivered `completed`, so the orchestrator's ledger diverges silently. The condition of validity is therefore: *the failure is real precisely when the client trusts the Card's capability flag as a durability guarantee and the server's registry is ephemeral.* ## Decision Boundary The decision the client must make at discovery time is not "does this agent support push notifications" — the Card answers that — but "**is the Card's capability assertion backed by a registry on the same origin that will emit the callback, and can I verify the binding after registration?**" A2A v1.0 gives no field to answer this directly, so the client must derive it from structural signals. The boundary is crossed when any of the following is true and unmitigated: - The Card `url` authority ≠ Card document authority **and** the client cannot fetch a secondary capability document from the `url` origin. - `tasks/pushNotification/set` returns no binding token, no `expiresAt`, and no echo of the registered URL. - The `taskId` returned by `tasks/send` matches no documented format (no prefix, no epoch segment) that would let the client detect reuse. If any signal is unmitigated, the correct decision is to **downgrade to polling** (`tasks/get` with backoff) rather than bind a webhook, because a silently orphaned binding is strictly worse than no binding: it produces false terminal states. The guardrail invariant is: *a webhook binding is only trustworthy if the client can re-read it from the same origin that will fire it, after every lifecycle transition that could trigger a restart.* Concretely, after each `tasks/get` that returns a non-terminal state, the client re-issues `tasks/pushNotification/get` (or equivalent) and compares the returned URL against its registered URL; a mismatch or `404` demotes the task to polling. ## Operational Effect The downstream effect is a **split-brain task ledger**: the client believes task 7741 ended `canceled` (its own `tasks/cancel` ack), while the server's recycled-ID task ended `completed` and the callback lands on the client's receiver, which — lacking a generation check — either double-counts the result or, worse, marks the canceled task as completed and releases downstream resources twice. In multi-agent swarms this compounds: an auditor agent replaying the task log sees a `canceled → completed` transition that the state machine forbids, flags a verification discrepancy, and the swarm deadlocks on consensus because the two agents' ledgers cannot be reconciled without the original binding record, which the server no longer holds. The mitigation is structural, not procedural: bind only when the registry is verifiable, tag every `taskId` with a client-side generation on receipt, and treat any webhook whose payload `taskId` does not match a locally-tracked *live* binding as a poisoning attempt to be quarantined, not merged. The following guard enforces the invariant at the receiver: ```python import time from dataclasses import dataclass, field class OrphanedWebhookBindingError(RuntimeError): """Raised when a push-notification callback cannot be matched to a live, same-origin-verified binding for a task the client still owns.""" pass @dataclass class Binding: task_id: str registered_url: str origin: str generation: int verified_at: float live: bool = True class WebhookReceiver: def __init__(self, max_binding_age_s: float = 300.0): self._bindings: dict[str, Binding] = {} self._max_age = max_binding_age_s def register(self, task_id: str, url: str, origin: str, generation: int) -> Binding: b = Binding(task_id, url, origin, generation, time.time()) self._bindings[task_id] = b return b def reverify(self, task_id: str, server_echo_url: str, server_origin: str) -> None: b = self._bindings.get(task_id) if b is None or not b.live: raise OrphanedWebhookBindingError( f"reverify: no live binding for task {task_id!r}" ) if server_echo_url != b.registered_url or server_origin != b.origin: b.live = False raise OrphanedWebhookBindingError( f"reverify mismatch for {task_id!r}: registered " f"{b.registered_url}@{b.origin} vs server " f"{server_echo_url}@{server_origin}; demote to polling" ) b.verified_at = time.time() def on_callback(self, task_id: str, payload_state: str, callback_origin: str) -> dict: b = self._bindings.get(task_id) if b is None or not b.live: raise OrphanedWebhookBindingError( f"callback for {task_id!r} has no live binding; quarantine payload" ) if callback_origin != b.origin: raise OrphanedWebhookBindingError( f"callback origin {callback_origin} != bound origin {b.origin} " f"for task {task_id!r}; possible recycled-ID poisoning" ) if time.time() - b.verified_at > self._max_age: b.live = False raise OrphanedWebhookBindingError( f"binding for {task_id!r} stale beyond {self._max_age}s; " f"re-verify before accepting {payload_state!r}" ) return {"task_id": task_id, "state": payload_state, "accepted": True} ```