What structural signals indicate a stale A2A v1.0 Agent Card is silently rebinding a delegated task to a deprecated skill endpoint

**Date of Record:** 2026 December 2 **Scope:** Applies to cross-vendor agent delegation over A2A v1.0 where the caller resolves a remote agent via Agent Card discovery and then drives a long-running task through `tasks/send` / `tasks/sendSubscribe` with push-notification webhook binding. Does not cover in-process tool calls, MCP-only transports, or A2A tasks that complete within a single synchronous request.

Core Distinction

The failure is not "the remote agent is down" and not "the webhook is unreachable." Both of those are loud. The failure is that the **Agent Card is a cached, independently-versioned artifact that is not bound to the task lifecycle it authorizes**. A2A v1.0 treats the Agent Card as the discovery surface (`/.well-known/agent.json`) and the task as a separate state machine (`submitted → working → input-required → completed/failed/canceled`). Nothing in the protocol forces the card's `skills[].id` set, its `capabilities.pushNotifications` flag, or its declared `defaultInputModes`/`defaultOutputModes` to remain stable for the lifetime of a task created against it.

The consequence is a **silent skill rebind**: the caller holds a task handle whose `skillId` was resolved from a card snapshot taken at delegation time, but the remote agent has since redeployed, dropped that skill, or changed its input schema. The task continues to exist and continues to emit `working` status updates — because the task record is durable on the remote side — but the *worker* that was supposed to advance it no longer matches the skill contract the caller validated against. The caller sees a task that is neither failed nor progressing, and the webhook keeps firing status updates that describe a state machine the caller can no longer meaningfully interpret.

What Was Observed

A cross-vendor delegation flow: Orchestrator **A** (vendor X) delegates a document-extraction task to Agent **B** (vendor Y) by:

  1. Fetching `https://b.vendor-y.example/.well-known/agent.json`, caching it with a 24h TTL.
  2. Selecting `skills[].id == "extract-structured-v2"` and validating that `defaultInputModes` includes `application/json`.
  3. Calling `tasks/send` with `pushNotification.url` bound to A's webhook receiver.
  4. Receiving `task.id` and `task.status.state == "submitted"`.

Mid-task, vendor Y ships a breaking change: `extract-structured-v2` is renamed to `extract-structured-v3` with a tightened input schema (a required `schemaVersion` field). The old skill is not deleted from the card immediately — it lingers for a deprecation window — but the *worker pool* behind it is drained. The card still advertises `extract-structured-v2`; the task record still exists; the webhook still fires. But every `working` tick advances a state machine whose worker is gone.

The observable signature is a **wedge**, not an error:

The last point is the structural signal: **the task carries no provenance of the card snapshot that authorized it.** A2A v1.0 task objects do not mandate a `cardVersion` or `cardEtag` field. The caller *can* attach it in `metadata`, but the remote agent has no obligation to echo it back or to reject a task whose metadata card-version is stale.

Condition of Validity

This analysis holds when all of the following are true:

It does **not** hold when the caller re-fetches the card on every `tasks/get` poll and diffs the skill set — that pattern converts the silent rebind into a detectable event, at the cost of a discovery round-trip per poll.

Decision Boundary

The boundary is between **card-as-snapshot** and **card-as-live-contract**. A2A v1.0 permits both interpretations; the protocol does not adjudicate. The caller must choose, and the choice determines whether the wedge is invisible or bounded.

The failure to avoid is the **hybrid**: cache the card for efficiency but never re-check it, while treating webhook liveness as proof of progress. That hybrid is what produces the wedge — the caller has neither the snapshot's binding guarantee nor the live contract's detection.

Operational Effect

The practical effect is a **zombie task**: a task that is `working` forever, billed by the remote vendor for compute that no longer advances it, and invisible to the caller's health checks because the webhook is healthy. The caller's orchestrator accumulates these until a queue-depth alarm fires — typically hours later, and typically misattributed to the remote vendor's "slowness" rather than to the card/task binding gap.

The guardrail is to make the card hash a first-class field on the task, and to make the webhook receiver validate it:

  1. At delegation, compute `card_hash = sha256(canonical_json(card))` and attach it to `task.metadata.cardHash` in the `tasks/send` payload.
  2. The remote agent, on each `working` transition, echoes `metadata.cardHash` in the status update (A2A v1.0 allows arbitrary `metadata` on `TaskStatus`).
  3. The caller's webhook receiver compares the echoed hash against the hash it recorded. A mismatch is a **rebind event**, not a transient error — it means the remote worker is no longer the one the caller validated.
  4. On rebind, the caller issues `tasks/cancel` and re-delegates against a freshly fetched card, or fails terminally if the skill is gone.

This converts the silent wedge into a bounded, observable state transition. The cost is one hash comparison per webhook delivery and the discipline of echoing `metadata` on the remote side — a small price against zombie tasks that bill indefinitely.

import hashlib
import json
from dataclasses import dataclass


class CardRebindError(RuntimeError):
    """Raised when a task's authorizing Agent Card hash no longer matches
    the hash echoed by the remote worker on a status update.

    This is a terminal condition for the task: the worker advancing the
    state machine is not the worker the caller validated against.
    """


@dataclass(frozen=True)
class TaskBinding:
    task_id: str
    card_hash: str
    skill_id: str


def canonical_card_hash(card: dict) -> str:
    """Stable hash of the Agent Card snapshot used at delegation time.

    Canonicalization matters: vendors serialize the same card with
    different key orderings and whitespace. We hash the sorted-key
    compact encoding so that a re-fetch of an unchanged card produces
    the same hash.
    """
    encoded = json.dumps(card, sort_keys=True, separators=(",", ":")).encode("utf-8")
    return hashlib.sha256(encoded).hexdigest()


def validate_status_update(binding: TaskBinding, status_payload: dict) -> None:
    """Validate that a webhook status update comes from the same card
    snapshot that authorized the task.

    Raises CardRebindError if the echoed cardHash is missing or mismatched.
    A missing echo is treated as a rebind because a compliant remote must
    echo it; silence is indistinguishable from a redeployed worker that
    dropped the metadata field.
    """
    echoed = status_payload.get("metadata", {}).get("cardHash")
    if echoed is None:
        raise CardRebindError(
            f"task {binding.task_id}: status update omitted metadata.cardHash; "
            f"cannot confirm worker matches card {binding.card_hash[:12]}"
        )
    if echoed != binding.card_hash:
        raise CardRebindError(
            f"task {binding.task_id}: card rebind detected. "
            f"delegated against {binding.card_hash[:12]}, "
            f"worker now reports {echoed[:12]} for skill {binding.skill_id}"
        )


def handle_webhook(binding: TaskBinding, status_payload: dict) -> str:
    """Entry point for the caller's push-notification receiver."""
    try:
        validate_status_update(binding, status_payload)
    except CardRebindError:
        # Cancel the zombie task and surface for re-delegation.
        return "cancel_and_redelegate"
    return status_payload["status"]["state"]