# Why does an instance reject a valid A2A task update after the remote Agent Card's push-notification binding silently downgrades `taskId` correlation to a best-effort hint? **Date of Record:** 2026 November 29 **Scope:** Applies to A2A v1.0 peer-to-peer deployments where a caller agent relies on the remote `AgentCard.pushNotifications` binding (webhook or SSE) to correlate asynchronous `TaskStatusUpdateEvent` payloads back to an in-flight task. Does not apply to synchronous request/response-only tasks, nor to transports where the caller polls `tasks/get` through a single trusted channel. ## Core Distinction The failure is not a schema-validation error and not a transport timeout. It is a **correlation-identity mismatch** introduced at discovery time. An A2A `AgentCard` advertises push-notification capability as a *capability declaration* (`capabilities.pushNotifications: true`) plus an optional binding descriptor. The spec lets the remote vendor choose the binding shape: some emit the full `Task` object in each event, some emit a thin `TaskStatusUpdateEvent` carrying `taskId` and `contextId`, and some emit a vendor-shaped envelope where `taskId` lives under a namespaced key that is *not* the top-level `taskId` the caller hashes on. The caller's discovery layer reads the card, sees `pushNotifications: true`, and constructs a correlator keyed on `taskId`. When the first push arrives, the correlator cannot find the key, the update is dropped as "unknown task," and the task lifecycle on the caller side stalls in `submitted` while the remote has already advanced to `completed`. The invariant that breaks is: **a push-notification binding is not a contract on the correlation key's location or stability; only on the fact that *some* event will arrive.** ## What Was Observed A caller agent (`orchestrator-A`) submits a `message/send` to a remote peer whose card declares: ``` "capabilities": { "pushNotifications": true, "streaming": false }, "pushNotifications": { "url": "https://peer.example/a2a/push", "authentication": { "schemes": ["Bearer"] } } ``` `orchestrator-A` registers a webhook receiver, stores `pending_tasks[taskId] = TaskState.submitted`, and returns control to its reasoning loop. The remote accepts the task and returns `taskId = "tsk_9f2a"`. The caller's correlator is keyed on `"tsk_9f2a"`. The remote's push dispatcher fires three events over the task's life. The first two arrive as: ``` { "event": "status", "payload": { "id": "tsk_9f2a", "state": "working" } } ``` Note the field is `payload.id`, not `payload.taskId`. The remote vendor's A2A adapter normalizes internal task IDs into `id` inside a `payload` envelope — a shape that is legal under the spec's "vendor extension" allowance but is not the canonical `TaskStatusUpdateEvent` the caller's decoder expects. The caller's decoder reads `event["payload"]["taskId"]`, gets `KeyError`, and routes the event to a dead-letter queue. The task is never advanced. Ten minutes later `orchestrator-A`'s token budget is exhausted waiting on a task that already completed on the remote, and the remote's retention window (often 1 hour) has expired the task record, so a late `tasks/get` reconciliation returns `TaskNotFound`. The second observed variant: the remote *does* emit `taskId` at top level, but reuses `taskId` values across `contextId` scopes (a legal but dangerous optimization), so the caller's correlator — keyed on `taskId` alone — routes a stale event from a prior context into the current task's state machine, causing a spurious `completed` transition on a task that is still `working`. ## Condition of Validity The caller's correlator is only correct when **all three** hold: 1. The remote card's binding descriptor is *read and parsed* for the event envelope shape, not merely checked for `pushNotifications: true`. 2. The correlation key is the composite `(taskId, contextId)`, never `taskId` alone — the spec permits `taskId` reuse across contexts and vendors exploit it. 3. The caller performs a reconciliation `tasks/get` on any push event whose key it cannot resolve, *before* declaring the task lost — because the push channel is explicitly best-effort in the spec, while `tasks/get` is authoritative. If any of the three is violated, the caller will observe silent task stalls under normal operation and cannot distinguish them from a remote outage without a reconciliation probe. ## Decision Boundary The boundary is this: **a push notification is a latency optimization, not a state source of truth.** The moment a caller treats an unresolved push event as a terminal signal (drop the task, fail the task, or advance the state machine on a partial match), it has crossed from "best-effort hint" into "authoritative state," which the A2A lifecycle does not grant to the push channel. The correct behavior on an unresolvable key is to *escalate to reconciliation*: issue `tasks/get` with the composite key, and only then transition. The incorrect behavior — the one that produces the observed failure — is to treat `KeyError` on the decode path as "event for an unknown task, discard." A second boundary: `AgentCard` discovery is a *point-in-time* read. A remote may rotate its push binding shape (vendor upgrade, region failover) without re-issuing the card. A caller that caches the envelope shape from discovery and never re-validates will break on the first rotation. The card is not a versioned contract on the envelope; it is a capability advertisement. ## Operational Effect Downstream of the stall, the caller's reasoning loop holds a `submitted` task open, consuming context budget and blocking the tool-call slot. In multi-agent swarms this propagates: a parent agent waiting on `orchestrator-A`'s result sees a timeout, retries the `message/send`, and the remote — which already completed the first task — now has two tasks with the same logical intent and different `taskId`s. The retry is not idempotent at the A2A layer because idempotency is keyed on `messageId`, not on intent. The swarm forks, and the auditor agent's verification replay sees two `completed` tasks where it expected one, and cannot decide which is canonical. The fix is not in the push decoder; it is in the discovery layer: parse the binding descriptor, key the correlator on the composite `(taskId, contextId)`, and make every unresolved push event trigger a reconciliation `tasks/get` before any state transition. ``` ```python class PushCorrelationMismatch(RuntimeError): """Raised when a push event cannot be correlated to an in-flight task via the composite (taskId, contextId) key, and reconciliation is required.""" pass class TaskCorrelator: def __init__(self, agent_card: dict): binding = agent_card.get("pushNotifications") or {} # The card advertises capability, not envelope shape. We must record # that the shape is unverified and force reconciliation on first miss. self.envelope_shape_verified = False self.pending = {} # (task_id, context_id) -> state def register(self, task_id: str, context_id: str) -> None: self.pending[(task_id, context_id)] = "submitted" def on_push_event(self, event: dict) -> str: payload = event.get("payload", {}) task_id = payload.get("taskId") or payload.get("id") context_id = payload.get("contextId") if not task_id or not context_id: # Cannot correlate. Do NOT drop. Escalate to reconciliation. raise PushCorrelationMismatch( f"push event missing composite key: taskId={task_id!r} " f"contextId={context_id!r}; must reconcile via tasks/get" ) key = (task_id, context_id) if key not in self.pending: raise PushCorrelationMismatch( f"push event for unknown composite key {key}; " f"possible taskId reuse across context or stale event" ) new_state = payload.get("state") if new_state not in {"working", "completed", "failed", "canceled", "input-required"}: raise PushCorrelationMismatch( f"unrecognized state {new_state!r} for {key}; " f"envelope shape may have rotated since discovery" ) self.pending[key] = new_state return new_state ```