Why does an instance accept a delegated A2A task whose `capabilities.skills[]` matched at negotiation time but whose signed Agent Card rotated its `skillHash` between the handshake and the first `tasks/send`?

**Date of Record:** 2026 December 1 **Scope:** Applies to A2A v1.0 task delegation where the delegating agent (client) validates the remote Agent Card via JWS signature and negotiates skills before dispatching `tasks/send`. Does not apply to same-process tool calls, MCP tool invocation, or A2A deployments that pin Agent Cards by immutable digest out-of-band.

Core Distinction

The failure is not signature forgery and not a skill-name mismatch. It is a **capability-identity split** between the *negotiation artifact* (the Agent Card the client read and validated) and the *execution artifact* (the Agent Card the server is actually running against when the task lands). A2A v1.0 signs the card, but the signature binds the *publisher's* key to *a* card body — it does not bind the card to a specific session, nor does the protocol require the server to echo the exact card digest back in the task acceptance response. So a card that is validly signed at T0 and a card that is validly signed at T1 can both pass `verify_jws()` while describing different `skills[].id`, different `inputModes`, or a narrowed `capabilities.streaming` flag. The client's capability-negotiation gate is satisfied against a stale snapshot; the server executes against a rotated one.

The non-obvious part: signature validity is monotonic across rotation. Both cards verify. There is no cryptographic failure to catch. The only signal is a semantic diff the client never computes because the protocol treats the card as configuration, not as a versioned contract.

What Was Observed

A planner agent `P` delegated a document-extraction task to worker `W`. Sequence:

  1. `P` fetched `W`'s Agent Card at `/.well-known/agent.json`. Card `C0` declared `skills: [{id: "extract.v2", inputModes: ["text/plain","application/pdf"], outputModes:["application/json"]}]`, signed by `W`'s key `K_w`, `kid: w-2025-05`.
  2. `P` verified JWS, matched `extract.v2` against its own required skill, checked `inputModes` contained `application/pdf`, and cached `C0` with `etag` but **without** a body digest in its delegation envelope.
  3. Between step 2 and step 4 (≈4.2s, `W` was mid-deploy), `W` rolled out `C1`: same `kid`, same key, `skills[].id` still `extract.v2`, but `inputModes` narrowed to `["text/plain"]` (PDF path disabled pending a CVE fix) and `outputModes` changed to `["application/json","text/markdown"]`. `C1` is correctly signed.
  4. `P` dispatched `tasks/send` with a PDF artifact and `metadata.card_ref = C0.etag`.
  5. `W` accepted the task (HTTP 200, `state: "submitted"`), then failed at execution with `UnsupportedInputMode`. `W`'s acceptance response did **not** include a card digest; `P` had no way to detect the drift at accept time.
  6. `P`'s retry logic re-sent to the same endpoint with the same cached `C0` assumptions — three retries, all accepted-then-failed, because acceptance and capability are decoupled in A2A v1.0.

Net effect: a task that passed every cryptographic and negotiation gate failed deterministically at execution, and the client's retry loop amplified it because the failure surfaced as a *task* error, not a *capability* error, so the retry path never re-fetched the card.

Condition of Validity

The guardrail only holds if the client can bind the card it validated to the task it sends, and can detect rotation at accept time. Concretely, a delegation is safe iff:

Absent any one of these, the invariant "a task accepted under card X executes under card X" is unenforced. A2A v1.0 as specified does not mandate the digest echo; it is an extension point. Deployments that rely on `etag`/`If-None-Match` alone are vulnerable because `etag` is server-chosen and may not change across a body rotation (many servers derive it from `kid` or path, not body).

Decision Boundary

The boundary is **accept-time vs execute-time capability binding**. Two regimes:

The boundary is crossed the moment a client caches a card without a body digest *and* the server permits card rotation without invalidating in-flight negotiation state. Both are default behaviors in A2A v1.0 reference implementations. The failure is not a bug in either component; it is the gap between them.

A secondary boundary: even with digest echo, a *narrowing* rotation (PDF removed) and a *widening* rotation (new skill added) are not symmetric. Narrowing must reject in-flight tasks; widening must not, or you break long-running delegations. The digest check must therefore be paired with a capability-subset check, not equality alone.

Operational Effect

The architectural invariant required: **signed ≠ bound**. A valid JWS proves *who* published a card, not *which* card a task executes against. The missing primitive in A2A v1.0 is a per-task card-digest binding with accept-time enforcement and asymmetric (narrowing-rejects, widening-allows) subset semantics.

import hashlib, json
from dataclasses import dataclass
from typing import Any

class CardDigestMismatch(RuntimeError):
    """Raised when a delegated task's accepted card digest differs from the card the server currently serves."""
    pass

class CapabilityNarrowed(RuntimeError):
    """Raised when the served card drops a skill/inputMode the client negotiated against."""
    pass

def canonical_digest(card_body: dict[str, Any]) -> str:
    canon = json.dumps(card_body, sort_keys=True, separators=(",", ":")).encode()
    return hashlib.sha256(canon).hexdigest()

@dataclass
class DelegationEnvelope:
    skill_id: str
    input_mode: str
    accepted_card_digest: str

def accept_task(server_card_body: dict[str, Any], env: DelegationEnvelope) -> None:
    served = canonical_digest(server_card_body)
    if served != env.accepted_card_digest:
        # Rotation detected at accept time. Do NOT accept-then-fail.
        raise CardDigestMismatch(
            f"card rotated between negotiation and send: "
            f"client={env.accepted_card_digest[:12]} server={served[:12]}"
        )
    skills = {s["id"]: s for s in server_card_body.get("skills", [])}
    skill = skills.get(env.skill_id)
    if skill is None or env.input_mode not in skill.get("inputModes", []):
        # Same digest but narrowed capability — must reject, not widen-accept.
        raise CapabilityNarrowed(
            f"skill {env.skill_id!r} no longer advertises input mode {env.input_mode!r}"
        )
    # Safe: digest matches and capability is a superset of what was negotiated.