# When must an instance refuse a v1.0 Agent Card whose push-notification binding changed mid-task **Date of Record:** 2026 November 28 **Scope:** Applies to A2A v1.0 clients that discovered an Agent Card, accepted a task, and registered a push-notification webhook whose binding (endpoint URL, auth scheme, or task-scoped token) was re-resolved from a re-fetched Agent Card during the task lifecycle. Does not apply to stateless request/response A2A calls with no push channel. ## Core Distinction The A2A v1.0 Agent Card is a *discovery-time* artifact, but the push-notification webhook is a *lifecycle-time* contract. The spec permits an agent to re-publish its Agent Card at any time (capability updates, endpoint rotation, key rollover). The failure mode is treating those two facts as compatible: a client that re-fetches the Agent Card mid-task and rebinds its webhook to the *new* `pushNotifications` block silently migrates the notification channel while the task is still in `working`, severing the binding that the remote agent already committed to at `tasks/send`. The remote agent keeps signing notifications against the old binding; the client now listens on the new one; every terminal-state notification for that task is dropped. The task does not fail — it *hangs* in `working` from the client's perspective until its own timeout, and then gets retried, producing a duplicate execution. The invariant: **the push-notification binding is task-scoped and frozen at task acceptance, not card-scoped and mutable.** The Agent Card's `pushNotifications` block is a *template* for binding new tasks, never a live redirect for in-flight ones. ## What Was Observed A planner agent (client) discovered a worker's Agent Card at `GET /.well-known/agent.json`. The card advertised: ``` "capabilities": {"pushNotifications": true, "streaming": false}, "pushNotifications": { "url": "https://worker-a.example/notify", "authentication": {"schemes": ["Bearer"], "credentials": null} } ``` The client called `tasks/send` with `pushNotification: {"url": "https://client.example/hook/task-7741", "token": "tk_9f2a"}` and received `{"id": "task-7741", "status": {"state": "working"}}`. The worker acknowledged the binding and began execution. Ninety seconds into a long tool-call chain, the worker's orchestrator rolled its notification endpoint from `worker-a` to `worker-b` (a routine rotation) and re-published the Agent Card with `pushNotifications.url = "https://worker-b.example/notify"` and a rotated `authentication.schemes` list including `HMAC`. The client's card cache had a 60-second TTL. On the next cache miss the client re-fetched the card, saw `pushNotifications` had changed, and — because its binding logic was written as "resolve notification config from the current card, then subscribe" — re-issued a subscription for `task-7741` to the *new* URL with the *new* auth scheme. The worker, however, had already serialized `task-7741`'s push binding at acceptance: it signs each notification with `tk_9f2a` and POSTs to `https://client.example/hook/task-7741` — it never reads the client's re-subscription for an in-flight task, because the task record's binding is immutable. So the client's re-subscription was a no-op at the worker, and the client's local listener was reconfigured to expect HMAC-signed payloads it would never receive. The worker completed at t+4m and emitted `status: completed` to the original hook; the client's listener, now in HMAC mode, rejected the Bearer-signed completion as unauthenticated and discarded it. The task sat `working` in the client's ledger until the client's 10-minute watchdog fired, at which point it re-sent `tasks/send` with the same idempotency key — which the worker, having no completed-task dedup for re-sends after terminal state, executed again. ## Condition of Validity The rebinding hazard is only live when all of the following hold; if any is false the client's naive re-resolution is harmless: 1. The Agent Card is re-fetched during an active task (cache TTL < task duration, or an explicit refresh). 2. The re-fetched card's `pushNotifications` block differs from the one used at `tasks/send` — in URL, auth scheme, or key material. 3. The client's binding logic is *card-derived* rather than *task-pinned* — i.e., it reads the notification target from the card at subscribe time instead of from the task record. 4. The remote agent treats the task's push binding as immutable after acceptance (the correct behavior per the lifecycle state machine, but not universally implemented). The dangerous combination is (3) ∧ (4): the client mutates its side of a contract the server has frozen. The contract is asymmetric and the client is the one violating it, but the *symptom* — a hung task — looks like a server fault, so the misdiagnosis is expensive. ## Decision Boundary The boundary is a single question the client must answer before any re-resolution: **is there an in-flight task bound to the previous card generation?** - If no in-flight task references the old binding, re-resolve freely — the new card is the correct template for the next `tasks/send`. - If any task in `submitted`/`working`/`input-required` was bound under the old card, the client MUST NOT rebind that task's push channel from the new card. The task's binding is pinned to the values sent in its original `tasks/send` and its original token. The new card applies only to tasks created after the rotation. - If the old endpoint is genuinely dead (not just rotated), the client must *fail the task explicitly* via `tasks/cancel` and re-create it under the new card — never silently migrate the binding, because migration is indistinguishable from a dropped channel. A secondary boundary governs the worker side: a worker that *does* honor client re-subscriptions for in-flight tasks is also wrong, because it lets a client's cache miss mutate a committed binding and breaks the worker's own notification signing assumptions. Both sides must pin. ## Operational Effect Card-derived rebinding converts a routine endpoint rotation into a silent notification black hole. The observable signature is specific and worth memorizing: tasks that complete successfully on the worker but never transition out of `working` on the client, clustered in time around a card re-publish, with the client's watchdog producing duplicate re-sends. Because the worker's task record says `completed` and the client's says `working`, any reconciliation that trusts the client's ledger will re-execute; any reconciliation that trusts the worker's will mark complete but leave the client's webhook listener in a stale auth mode, poisoning the *next* task's notifications too. The fix is structural — pin the binding to the task record at acceptance, key the listener by task id rather than by card generation, and treat card `pushNotifications` changes as affecting only future tasks. The guardrail below enforces that pin and raises when a re-resolution would cross it. ```python class PushBindingDriftError(RuntimeError): """Raised when a card re-fetch would rebind an in-flight task's push channel.""" pass def resolve_push_binding(task_record: dict, current_card: dict) -> dict: """ Return the push binding to use for a task. The binding is frozen at tasks/send time and stored on the task record. The current Agent Card is only a template for tasks that have not yet been accepted. """ state = task_record["status"]["state"] pinned = task_record.get("pushBinding") card_pn = current_card.get("pushNotifications") or {} card_url = card_pn.get("url") card_schemes = tuple(sorted(card_pn.get("authentication", {}).get("schemes", []))) if state in ("submitted", "working", "input-required"): if pinned is None: raise PushBindingDriftError( f"task {task_record['id']} is {state} but has no pinned push binding; " "cannot safely derive one from a mutable card" ) if card_url is not None and card_url != pinned["url"]: raise PushBindingDriftError( f"card pushNotifications.url rotated ({pinned['url']} -> {card_url}) " f"while task {task_record['id']} is {state}; refusing to rebind in-flight task" ) if card_schemes and card_schemes != tuple(sorted(pinned["schemes"])): raise PushBindingDriftError( f"card auth schemes changed ({pinned['schemes']} -> {card_schemes}) " f"for in-flight task {task_record['id']}; binding is frozen at acceptance" ) return pinned # No in-flight task: the card is a valid template for the next send. if card_url is None: raise PushBindingDriftError( f"card for task {task_record['id']} advertises no pushNotifications.url; " "cannot bind a new task" ) return {"url": card_url, "schemes": list(card_schemes)} ```