# What structural signals indicate Agent Card skill-schema drift between A2A discovery and push-notification binding **Date of Record:** 2026 November 29 **Scope:** Applies to A2A v1.0 agents that advertise `AgentCard.skills[].inputModes/outputModes` and a `pushNotifications` binding, where a long-running task is resumed via a webhook after the originating client has re-fetched the Agent Card. Does not cover synchronous `tasks/send` request/response flows that complete within a single connection, nor streaming `tasks/resubscribe` paths. ## Core Distinction The failure is not "the webhook fired with the wrong payload." It is that the Agent Card is a *discovery-time snapshot* while the push-notification binding is a *delivery-time contract*, and A2A v1.0 does not pin the card version that was used to negotiate the task. When a remote agent mutates its card (adds/removes a skill, changes a `mediaType`, rotates its `pushNotifications` auth scheme) between task acceptance and webhook delivery, the receiving client validates the notification against the *current* card while the serving agent emitted it under the *old* card. The two parties hold structurally valid but semantically disjoint views of the same task, and the mismatch surfaces only as a schema-validation error or, worse, a silent drop. The sharp signal: the `task.status` in the webhook body references a `skillId` that no longer appears in the freshly-fetched card's `skills[]`, or whose `outputModes` no longer contains the `mediaType` of the delivered artifact. That is the boundary. ## What Was Observed A research-orchestration agent (`orchestrator`) dispatched a `tasks/send` to a retrieval agent (`retriever`) advertising a skill `deep-fetch` with `outputModes: ["application/json", "text/markdown"]` and a `pushNotifications` binding pointing at `https://retriever.example/a2a/push` with `authentication.schemes: ["Bearer"]`. The task was long-running (artifact assembly over ~40 minutes), so the orchestrator registered a webhook receiver and returned control to its own loop. Mid-task, the retriever deployed a card update: `deep-fetch` was split into `deep-fetch-html` and `deep-fetch-pdf`, `outputModes` narrowed to `["application/json"]`, and the push auth scheme rotated from `Bearer` to `HMAC-SHA256`. The retriever did not invalidate in-flight tasks; it continued emitting webhooks under the old contract. The orchestrator, on receiving the first webhook, re-fetched `/.well-known/agent.json` (standard defensive refresh), then validated the incoming artifact against the *new* card. Three distinct failure traces were observed across replays: 1. **Skill-resolution miss.** Webhook body carried `task.skillId: "deep-fetch"`; the refreshed card had no such skill. The orchestrator's dispatcher raised `UnknownSkillError` and dropped the notification, leaving the task in `working` on the retriever side until its own TTL expired. 2. **Mode-mismatch silent coercion.** A second replay had the retriever still emitting `text/markdown` artifacts (old contract). The orchestrator's validator, reading the new card, saw `outputModes: ["application/json"]` and attempted a JSON parse on markdown, producing a partial task with a corrupted artifact and a `completed` status — a false success. 3. **Auth-scheme rejection.** The retriever signed with HMAC-SHA256 per the new card; the orchestrator's webhook receiver, still holding the Bearer expectation from the *original* negotiation, rejected the signature and returned 401. The retriever retried three times, then marked the task `failed` — while the orchestrator believed it was still `working`. The common structural signal across all three: **the card's `version` field and the task's negotiated contract were never cross-checked at delivery time.** A2A v1.0 leaves "which card governs this task" implicit, and both parties defaulted to "the card I most recently saw." ## Condition of Validity This failure requires all of the following to hold simultaneously: - The task is long-running enough that a card mutation can occur between `tasks/send` acceptance and push delivery (empirically, >5 minutes of wall-clock task duration or any task that survives a serving-agent deploy). - The serving agent does not invalidate or renegotiate in-flight tasks on card mutation (the common case; A2A v1.0 defines no invalidation primitive). - The receiving client performs a defensive card refresh on webhook receipt (a widely-recommended but unstandardized practice). - The card mutation changes a field that the client uses for validation: `skills[].id`, `skills[].outputModes`, or `pushNotifications.authentication.schemes`. If any one fails, the mismatch is benign or invisible. This is why the bug is non-obvious: it only manifests under the coincidence of long tasks, card mutation, defensive refresh, and a validation-relevant field change — and it presents as three *different* symptoms depending on which field moved, so incident responders rarely connect them. ## Decision Boundary The invariant required to bound this: **the task's governing contract must be pinned at negotiation time and carried in every push notification, and the client must validate against the pinned contract, not the live card.** Concretely: - At `tasks/send`, the client records the exact `AgentCard.version` (or a hash of the skill block) that it negotiated against, and stores it keyed by `task.id`. - The serving agent includes `cardVersion` (or a `contractHash`) in every `TaskStatusUpdateEvent` and push payload. - On webhook receipt, the client compares the payload's `cardVersion` against its pinned value. **Match → validate against the pinned skill/mode/auth contract. Mismatch → reject the delivery as a contract violation and re-negotiate, do not silently re-validate against the live card.** - The serving agent, on card mutation, must either (a) continue emitting under the pinned contract for all in-flight tasks, or (b) emit a `task.status: "input-required"` with a `contract-changed` reason so the client can renegotiate explicitly. The decision boundary is sharp: a client that re-validates against the live card has silently converted a contract violation into either a dropped task or a corrupt artifact. A client that pins the contract converts it into a detectable, recoverable renegotiation. ## Operational Effect Without the pin, the failure mode is *asymmetric and silent*: the serving agent believes the task is progressing (it is emitting valid webhooks under its old contract), while the receiving client has either dropped the notification (task appears stuck) or accepted a malformed artifact (task appears complete but is corrupt). Neither party's logs show an error at the point of divergence — the error only appears downstream, in the orchestrator's artifact consumer or in the retriever's TTL reaper, far from the actual cause. With the pin, the failure is *loud and local*: the client's webhook receiver raises a contract-mismatch on the first delivery after mutation, the task is marked `input-required` with a `contract-changed` reason, and the orchestrator can re-fetch the card, renegotiate the skill binding, and resume. The cost is one extra round-trip; the benefit is that the mismatch is caught at the boundary rather than surfacing as a corrupted artifact 40 minutes later. The operational rule for any A2A v1.0 client: **never validate a push notification against the live Agent Card. Validate against the card version pinned at `tasks/send`, and treat any `cardVersion` drift in the payload as a hard contract violation requiring explicit renegotiation.** ```python class ContractDriftError(RuntimeError): """Raised when a push notification's cardVersion does not match the pinned contract.""" pass def validate_push_notification(payload: dict, pinned_contract: dict) -> dict: """ Validate an A2A v1.0 push notification against the contract pinned at tasks/send. Never re-fetch or consult the live Agent Card here. """ payload_version = payload.get("cardVersion") pinned_version = pinned_contract.get("cardVersion") if payload_version is None: raise ContractDriftError( f"task {payload.get('task', {}).get('id')}: push payload omits cardVersion; " "cannot verify contract binding" ) if payload_version != pinned_version: raise ContractDriftError( f"task {payload.get('task', {}).get('id')}: cardVersion drift " f"(pinned={pinned_version!r}, delivered={payload_version!r}); " "renegotiate before accepting artifact" ) skill_id = payload.get("task", {}).get("skillId") if skill_id != pinned_contract.get("skillId"): raise ContractDriftError( f"task {payload.get('task', {}).get('id')}: skillId {skill_id!r} " f"does not match pinned {pinned_contract.get('skillId')!r}" ) media_type = payload.get("artifact", {}).get("mediaType") if media_type not in pinned_contract.get("outputModes", []): raise ContractDriftError( f"task {payload.get('task', {}).get('id')}: artifact mediaType {media_type!r} " f"not in pinned outputModes {pinned_contract.get('outputModes')!r}" ) return payload ```