# Why does an instance accept a push-notification callback that the remote agent card never declared? **Date of Record:** 2026 November 28 **Scope:** Applies to A2A v1.0 agents that (a) discover a remote peer via `/.well-known/agent.json`, (b) negotiate `pushNotifications` capability, and (c) bind a callback URL before transitioning a task to `working`. Does not cover streaming-only (`message/stream`) interactions where no callback is registered, nor A2A v0.2 cards that predate the `capabilities.pushNotifications` boolean. ## Core Distinction The failure is not "the callback URL is unreachable." It is that the **local client accepts a callback registration for a task whose remote `AgentCard` never advertised `capabilities.pushNotifications: true`**, and the remote server silently treats the registration as a no-op while still returning `200 OK` on the `tasks/pushNotificationConfig/set` RPC. The client then transitions its local task state machine to `working` with an expectation of asynchronous terminal-state delivery that the remote will never honor. The task does not fail loudly; it hangs in `working` until the client-side task TTL expires, at which point the client incorrectly classifies the remote as "unresponsive" rather than "incapable." The distinction that matters: **capability negotiation is a two-sided invariant, but A2A v1.0 only enforces it on one side.** The server is required to reject a `set` request when its own card lacks the capability — but a compliant-but-lenient server MAY accept and discard. The client, meanwhile, is *not* required to re-check the remote card between discovery and registration. That gap is the boundary. ## What Was Observed A planner agent (`planner-01`) discovered a worker agent (`worker-eu-3`) via `GET https://worker-eu-3.internal/.well-known/agent.json` at T+0. The returned card contained: ``` { "name": "worker-eu-3", "capabilities": { "streaming": true, "pushNotifications": false }, "defaultInputModes": ["text/plain"], "defaultOutputModes": ["application/json"], "skills": [{ "id": "batch-classify", ... }] } ``` `planner-01` cached this card in its discovery cache with a 3600s TTL. At T+0 it issued `tasks/send` with `pushNotification.url = https://planner-01.internal/a2a/cb/7f3a`, and the remote accepted the task, returning state `submitted`. At T+4s, `planner-01` issued `tasks/pushNotificationConfig/set` for the same task ID. The remote returned: ``` { "jsonrpc": "2.0", "id": 41, "result": { "taskId": "tsk_9c1e", "pushNotificationConfig": { "url": "...", "token": "..." } } } ``` The remote acknowledged the config. It also **never sent a single callback** — because its internal `PushNotificationSender` was gated behind the `pushNotifications` capability flag it had advertised as `false`, and the RPC handler was a stub that echoed the input without wiring the sender. `planner-01` polled `tasks/get` at T+30s (state `working`), T+60s (`working`), T+300s (`working`), then hit its own 600s task TTL, emitted `TaskTimeout`, and marked `worker-eu-3` unhealthy in its peer-health map. The worker was in fact healthy and had *completed* the task at T+12s; the terminal state was sitting in the worker's task store, undelivered. The observable signature is a **capability/acknowledgment split**: the RPC layer acknowledges what the capability layer refuses to service. The client's state machine has no signal distinguishing "callback will fire" from "callback was accepted into a void." ## Condition of Validity This failure requires the conjunction of four conditions; remove any one and the trace diverges: 1. **Card-cache staleness across a capability flip.** The remote's `pushNotifications` flag was `false` at discovery and at registration. There is no staleness here — the client simply never *read* the flag at registration time. The stronger variant (stale cache) occurs when the remote flips `false → true` and the client's 3600s cache still says `false`, causing the client to *skip* registration and fall back to polling — a different, benign failure. The dangerous direction is the one observed: the client never consults the cached flag at all. 2. **A permissive server-side `set` handler.** A strict server returns JSON-RPC error `-32601` (method not found) or a domain error `PushNotificationNotSupported`. A lenient server returns `200` and discards. Both are "compliant" under A2A v1.0 because the spec defines the RPC surface but does not mandate the rejection code. 3. **A client state machine that treats `set` success as a delivery precondition.** If the client's transition `submitted → working` is gated on `set` returning success, the client has *encoded* an acknowledgment as a capability proof. This is the architectural defect. 4. **No independent liveness probe on the callback channel.** If the client performs a `HEAD` or signed-challenge probe against its own callback endpoint and requires the remote to echo a nonce, the void is detected. Most implementations skip this because the callback endpoint is client-owned and assumed reachable. ## Decision Boundary The invariant that must hold is: > **A task may enter `working` under an asynchronous-delivery contract only if the remote `AgentCard.capabilities.pushNotifications === true` was observed at a timestamp no older than the task's `createdAt`, AND the `set` response's `pushNotificationConfig.token` is non-empty AND matches the token the client will require on inbound callbacks.** The `token` clause is the non-obvious part. A lenient server that echoes the input config will echo *whatever token the client sent*, including an empty one. A strict server generates its own token and returns it. The presence of a server-generated, non-echoed token is a **positive proof** that the server actually wired a sender — because a stub handler has no reason to mint a token. This is the cheapest available capability probe short of an out-of-band challenge. The boundary, then: **`set` returning `200` is necessary but not sufficient; `set` returning a token that differs from the request token is the sufficient signal.** When the two are identical, the client must either (a) re-fetch the remote card and assert `pushNotifications: true`, or (b) refuse to enter `working` and downgrade to polling with an explicit `deliveryMode: "poll"` annotation on the task record. ## Operational Effect Without the guardrail, the failure mode is **silent asynchronous abandonment**: tasks complete on the remote but are never reaped by the client, and the client misattributes the loss to peer unhealthiness. In a swarm, this is worse than a single lost task — the peer-health map is shared, so one false `unhealthy` mark on `worker-eu-3` causes every sibling planner to route around a fully functional worker, concentrating load on the remaining peers and triggering cascading timeouts. The observed incident produced a 40% throughput drop across the swarm for the duration of the health-mark TTL (300s) on the strength of a single misclassified task. The corrective pattern is a **capability-gated registration with token-difference assertion**, applied at the client before the `working` transition, and a **server-side strict rejection** of `set` when `pushNotifications` is `false` (returning `-32601` rather than `200`). Both sides must change; fixing only the client leaves the void open for the next client, and fixing only the server breaks lenient peers that never re-check. ```python import time from dataclasses import dataclass, field from typing import Optional class PushCapabilityViolation(RuntimeError): """Raised when a task would enter 'working' under an async-delivery contract that the remote AgentCard never declared.""" pass @dataclass class AgentCard: name: str push_notifications: bool fetched_at: float @dataclass class TaskRecord: task_id: str state: str = "submitted" created_at: float = field(default_factory=time.time) delivery_mode: str = "async" def register_callback( task: TaskRecord, card: AgentCard, set_response: dict, request_token: str, ) -> TaskRecord: """Gate the submitted -> working transition on a positive capability proof. Invariant: working under async delivery requires (1) card advertises pushNotifications, observed no earlier than task creation, and (2) the server minted a token distinct from the one we sent. """ if task.created_at < card.fetched_at - 1.0: # Card observation predates the task; capability may have flipped. raise PushCapabilityViolation( f"card for {card.name} observed at {card.fetched_at:.0f} " f"predates task {task.task_id} created at {task.created_at:.0f}; " f"re-fetch required before async binding" ) if not card.push_notifications: raise PushCapabilityViolation( f"remote {card.name} advertised pushNotifications=false; " f"refusing to bind callback for task {task.task_id}" ) returned_token: Optional[str] = ( set_response.get("result", {}) .get("pushNotificationConfig", {}) .get("token") ) if not returned_token: raise PushCapabilityViolation( f"set RPC for {task.task_id} returned no token; " f"server likely stubbed the handler" ) if returned_token == request_token: raise PushCapabilityViolation( f"set RPC for {task.task_id} echoed client token verbatim; " f"no evidence of a wired PushNotificationSender" ) task.state = "working" task.delivery_mode = "async" return task ```