When must an instance reject a validly-signed Agent Card: the A2A v1.0 capability-scope drift failure in cross-vendor delegation handshakes

**Date of Record:** 2026 December 1 **Scope:** Applies to A2A v1.0 (and structurally identical) agent-to-agent delegation handshakes where a caller agent verifies a peer's signed Agent Card, then binds task capabilities from that card to a subsequent delegated task. Does not apply to same-process tool calls, MCP tool invocation, or cases where the caller and callee share a trust root and out-of-band capability attestation.

Core Distinction

The failure this record isolates is *not* signature forgery, expired certificates, or malformed JSON. Every one of those is caught by ordinary verification and is well-understood. The boundary condition is subtler: **a cryptographically valid, unexpired, correctly-signed Agent Card whose declared capability set is stale relative to the callee's actual runtime behavior.** The signature attests to *who published the card and that the bytes were not altered in transit*. It attests nothing about *whether the runtime behind the card still honors those capabilities at the moment of delegation.*

Callers conflate two distinct invariants:

  1. **Authenticity invariant** — the card bytes were signed by the key claimed by `provider.organization` and have not been tampered with. This is a static, offline-checkable property.
  2. **Capability-liveness invariant** — the capability scopes, input/output schemas, and skill bindings in the card still describe the callee's current execution surface. This is a *dynamic* property that the signature cannot and does not carry.

A2A v1.0's Agent Card is a signed *document*, not a signed *promise about present state*. When a caller treats card authenticity as sufficient authorization to delegate a task whose preconditions depend on capability liveness, the handshake succeeds and the task fails *downstream* — often after the caller has already committed partial state, spent tokens, and advanced its own reasoning chain.

What Was Observed

A caller agent (vendor A, an orchestrator) discovers a callee (vendor B, a document-processing skill provider) via its well-known Agent Card endpoint at `/.well-known/agent.json`. The card is signed with an Ed25519 key; the caller verifies the signature against the `jwks_uri` in the card's `provider` block and checks `card.signatures[].header.kid` against the published key set. All checks pass. The card declares:

The orchestrator delegates a 40-page PDF extraction task with `tasks/send`, passing a `message` whose `parts[0]` is a `file` part and whose metadata references the `v2` result schema. The callee accepts the task (HTTP 200, task state `submitted`), then transitions to `working`. Critically, the callee's *runtime* had been rolled back to `TableExtractionResult@v1` two hours earlier because of a schema regression in `v2`, but the card publish pipeline had not re-signed and re-published the card — the card's `version` field still read `2.4.1`, and the `capabilities` block still advertised `streaming: true` even though the rollback disabled the SSE endpoint.

Three distinct drifts were live simultaneously:

  1. **Schema drift** — output schema `v2` advertised, `v1` emitted.
  2. **Transport drift** — `streaming: true` advertised, SSE endpoint returning `404` after rollback.
  3. **Scope drift** — `tasks:write` accepted by the token issuer, but the rollback build's authorization middleware checked a different scope string (`task:submit`), so the callee silently downgraded the request to a non-persisted path.

The caller's handshake verifier had no mechanism to detect any of these because it validated the *card*, not the *runtime*. The task ran to `completed` on the callee side, emitting a `v1`-shaped artifact that the caller's `v2` deserializer rejected at parse time — *after* the caller had already written the task ID to its own episodic memory and marked the delegation as "in flight." The caller then re-delegated, got the same result, and entered a retry loop that consumed 14,000 tokens across 6 attempts before its token budget guard tripped.

The observable signature of this failure class, in the caller's trace, is: **signature verification passed → task accepted → task completed → artifact parse/schema rejection → retry → identical rejection.** The callee never reports an error because from its own perspective it did exactly what its (rolled-back) runtime supports.

Condition of Validity

The invariant that must hold for a signed Agent Card to be a sound basis for delegation is:

> *For every capability scope, input mode, output schema reference, and transport flag in the card, the callee's live runtime must honor that declaration at handshake time, and the card must carry a freshness token that the caller can independently bound.*

A2A v1.0 provides the *ingredients* for this but does not enforce it. The card's `signatures[].protected` header may carry a `created` timestamp, and the card may carry a `version`. But nothing in the protocol requires the callee to (a) re-sign on runtime change, (b) publish a monotonically increasing `card_epoch`, or (c) expose a runtime capability probe endpoint that the caller can cross-check against the card. The caller must therefore *construct* the liveness check itself, or accept that card authenticity is not capability liveness.

The condition of validity for treating a card as delegable is conjunctive:

If any conjunct fails, the handshake is *authentic but not delegable*. Proceeding anyway is the boundary failure.

Decision Boundary

The decision the caller must make is not "is this card valid?" but "is this card *current enough to bind a task to?*" The boundary is crossed at the moment the caller writes the task ID into its own durable state (episodic memory, checkpoint, or outbox) *before* the callee has confirmed the capability contract via a live probe or a fresh-enough card. That write is the point of no return: once the task ID is committed, the caller's retry logic, memory distillation, and user-facing status all assume a delegation that may be structurally impossible.

The correct boundary policy:

The failure mode is that most callers implement only the first branch and treat "signature valid" as equivalent to "within freshness window," because the signature *feels* like a freshness guarantee. It is not. A signature is a point-in-time attestation of authorship; freshness is a separate, caller-owned policy.

Operational Effect

When this boundary is crossed, the caller experiences *silent capability mismatch* — the most expensive failure class in multi-agent systems because it produces no error at the handshake, only a downstream artifact rejection that the caller's retry loop misinterprets as a transient fault. The operational consequences compound:

  1. **Token burn on retries.** Each retry re-sends the full task payload (the 40-page PDF, in the observed case), re-runs the callee's extraction, and re-fails at parse. Budget guards trip late.
  2. **Memory poisoning.** The caller writes the task ID and a "delegated to vendor B" episodic record before the failure. Distillation later treats this as a successful delegation, corrupting the caller's model of vendor B's reliability.
  3. **False consensus in multi-agent swarms.** If the caller is one of several orchestrators delegating to the same callee, all of them cross the same boundary simultaneously (they all fetched the same stale card), and the swarm's auditor sees N identical failures and may interpret them as a callee outage rather than a card-liveness failure — triggering a failover to a *different* vendor whose card is also stale.
  4. **Cross-vendor blame misattribution.** The callee reports `completed`. The caller reports `failed`. Neither is lying; the contract they agreed on was the card, and the card was stale. The post-mortem has no shared ground truth unless the caller logged the card's `created` timestamp and its own freshness policy at handshake time.

The guardrail is architectural, not procedural: the caller must treat the Agent Card as a *capability lease with an expiry the caller sets*, not as a permanent authorization. The lease expiry must be enforced in code at the delegation boundary, and the task ID must not be committed to durable state until the lease is confirmed live.

import time
from dataclasses import dataclass
from typing import Optional


class StaleCapabilityCardError(RuntimeError):
    """Raised when an authentic Agent Card is too old to bind a task to."""
    pass


class CapabilityProbeFailedError(RuntimeError):
    """Raised when a live capability probe contradicts the card."""
    pass


@dataclass
class AgentCard:
    kid: str
    version: str
    created_epoch: float
    capabilities: dict          # e.g. {"streaming": True, "skills": [...]}
    signature_valid: bool


@dataclass
class DelegationPolicy:
    freshness_window_s: float = 900.0      # 15 min for high-churn vendors
    require_probe_without_history: bool = True


def verify_and_bind(
    card: AgentCard,
    required_capabilities: dict,
    policy: DelegationPolicy,
    prior_success_within_window: bool,
    probe_fn,                              # callable(card) -> dict of live caps
    now: Optional[float] = None,
) -> None:
    """
    Enforce the conjunctive validity condition. Returns None on success;
    raises on any boundary violation. Must be called BEFORE the caller
    commits a task ID to durable state.
    """
    now = now if now is not None else time.time()

    # Conjunct 1: authenticity.
    if not card.signature_valid:
        raise StaleCapabilityCardError(
            f"card kid={card.kid} failed signature verification"
        )

    # Conjunct 2: freshness. Authenticity is not liveness.
    age = now - card.created_epoch
    if age > policy.freshness_window_s:
        raise StaleCapabilityCardError(
            f"card kid={card.kid} v{card.version} age={age:.0f}s "
            f"exceeds freshness_window={policy.freshness_window_s:.0f}s; "
            f"authentic but not delegable"
        )

    # Conjunct 3a: declared capability superset.
    for cap, want in required_capabilities.items():
        have = card.capabilities.get(cap)
        if have != want:
            raise CapabilityProbeFailedError(
                f"card declares {cap}={have!r}, task requires {want!r}"
            )

    # Conjunct 3b: liveness. Without prior success, require a live probe.
    if not prior_success_within_window:
        if not policy.require_probe_without_history:
            return
        live = probe_fn(card)
        for cap, want in required_capabilities.items():
            if live.get(cap) != want:
                raise CapabilityProbeFailedError(
                    f"live probe contradicts card: {cap}={live.get(cap)!r} "
                    f"vs declared {want!r} (runtime drift / rollback)"
                )


def delegate_task(card: AgentCard, task_payload: dict, policy: DelegationPolicy,
                  prior_success: bool, probe_fn, commit_fn) -> str:
    """
    Order matters: verify+probe FIRST, commit task ID to durable state SECOND.
    Reversing this order is the boundary failure this record documents.
    """
    verify_and_bind(
        card=card,
        required_capabilities=task_payload["requires"],
        policy=policy,
        prior_success_within_window=prior_success,
        probe_fn=probe_fn,
    )
    # Only now is it safe to write to episodic memory / outbox.
    task_id = commit_fn(task_payload)
    return task_id