# Why does an instance silently delegate to a stale agent card after an A2A v1.0 re-registration? **Date of Record:** 2026 November 29 **Scope:** Applies to cross-vendor task delegation where an orchestrator instance resolves a peer's Agent Card via A2A v1.0 discovery, caches the card's `capabilities`/`skills`/`endpoints`/`securitySchemes`, and then dispatches a `tasks/send` handshake. Does not apply to same-process tool calls, MCP tool listing, or stateless one-shot HTTP fetches where the card is resolved per-request with no cache. ## Core Distinction The failure is not "the remote agent is down." It is a **discovery-cache coherence violation**: the orchestrator holds a valid, structurally well-formed Agent Card whose cryptographic signature still verifies, but whose declared capability set no longer matches the live remote contract. A2A v1.0 cards are *self-describing*, but they are not *self-invalidating*. The signature proves **who authored the card**, not **whether the card is current**. An instance that treats "signature valid" as "card authoritative" will pass every local validation gate and still dispatch a task the peer can no longer honor — or honor under a different schema. The boundary: card authenticity (signature, issuer) and card currency (version, `skills` hash, endpoint binding) are two independent invariants. Most implementations enforce the first and assume the second. ## What Was Observed An orchestrator (`orch-A`, vendor X) delegated a `summarize_contract` task to `peer-B` (vendor Y). The handshake sequence: 1. `orch-A` resolved `peer-B`'s card at T0, cached it with `ttl=3600s`. Card declared `skills: [{id: "summarize_contract", inputSchema: v1}]`, endpoint `https://b.example/a2a`, `card.version: "1.0"`. 2. At T0+40min, `peer-B` re-registered: it split `summarize_contract` into `summarize_contract_v2` (new `inputSchema` requiring a `jurisdiction` field) and deprecated the v1 skill. It published a new card with a bumped `skills[].version` and a new `etag`. The *card signature key did not rotate* — vendor Y re-signs with the same key, so `orch-A`'s signature check still passes. 3. At T0+55min, `orch-A`'s cache is still warm. It dispatches `tasks/send` with the v1 payload (no `jurisdiction`). 4. `peer-B`'s gateway accepts the request (endpoint unchanged, auth valid), routes to the v2 handler, and the handler rejects the missing field — but returns it as a **task-level `state: failed` with `error.code: INVALID_PARAMS`**, not an HTTP 4xx. From `orch-A`'s perspective the transport succeeded; the failure is buried in the task result body. 5. `orch-A`'s retry policy sees a non-transport error, re-queues the *same v1 payload*, and retries 3×. All fail identically. The task is marked permanently failed with a misleading root cause ("peer rejected valid params") rather than "stale card." The tell: the failure trace shows `signature: OK`, `endpoint: reachable`, `auth: 200`, and only the *semantic* schema mismatch at the far end. No component in the orchestrator's validation chain is responsible for detecting that the card it is using has been superseded. ## Condition of Validity The invariant holds — i.e., the failure is *possible* — when **all** of the following are true: - The card is cached beyond the peer's re-registration window (cache TTL > card mutation cadence). - The signing key is **not** rotated on re-registration (common: vendors rotate keys on a schedule independent of capability changes). - The peer's endpoint and auth are unchanged, so transport-level probes succeed. - The peer surfaces schema violations as task-level errors rather than transport errors (A2A v1.0 permits both; many gateways normalize to `state: failed`). - The orchestrator's retry logic classifies task-level `failed` as retryable/transient rather than as a contract mismatch. The invariant does **not** apply if the orchestrator re-fetches the card per-dispatch, or if the peer rotates the signing key on every capability change (then signature mismatch forces a refresh), or if the peer returns HTTP 409/422 on schema drift with a `card-version` header the orchestrator checks. ## Decision Boundary The correct guardrail is a **card-currency check that is independent of card authenticity**. Three concrete mechanisms, in order of strength: 1. **Conditional revalidation on every dispatch.** Send `If-None-Match: ` to the card endpoint; a `304` confirms currency, a `200` forces re-parse. This costs one round trip but is the only check that catches same-key re-signing. Budget it: a card fetch is small, and it can be pipelined ahead of the task payload. 2. **Skill-level version pinning in the payload.** Include the `skills[].version` you resolved against in the `tasks/send` envelope (A2A v1.0 allows extension metadata). The peer must reject on mismatch with a distinguishable error code (`CARD_SKILL_VERSION_MISMATCH`), not `INVALID_PARAMS`. This converts a silent semantic failure into an explicit, non-retryable contract error. 3. **TTL bounded by peer-declared mutation cadence.** If the card advertises `card.revalidateAfter` (or `Cache-Control: max-age`), cap the local TTL at that value. Never let a local default (3600s) exceed a peer-declared cadence. The decision boundary: **if any two of these are absent, the orchestrator must treat a task-level `failed` as a potential stale-card signal and force a card refresh before the next retry** — never blind-retry the same payload. ## Operational Effect Without the guardrail, the failure is *silent and misattributed*. The orchestrator's telemetry records a peer-side rejection, not a local cache defect; the retry storm wastes token budget on payloads that cannot succeed; and the root cause ("we were using a card from 55 minutes ago") is invisible in the trace because every local gate passed. The blast radius scales with cache TTL and delegation fan-out: a single stale card reused across a swarm of 50 sub-agents produces 50 identical semantic failures attributed to the peer. With the guardrail, the failure becomes *loud and local*: a `304`-check miss or a skill-version mismatch raises a distinct, non-retryable error at the orchestrator, forcing a re-resolve before dispatch. The peer never sees the malformed payload, and the retry budget is preserved. The general principle: **in A2A, a valid signature is a statement about authorship, not freshness.** An instance must maintain a separate currency invariant — etag revalidation, skill-version pinning, or peer-declared TTL bounds — or it will delegate with confidence to a contract that no longer exists. ```python class StaleAgentCardError(RuntimeError): """Raised when a cached A2A Agent Card is no longer authoritative for the live peer contract.""" pass def resolve_card_for_dispatch( cache_entry: dict, fetch_card_headers: callable, peer_skill_version: str, requested_skill_id: str, ) -> dict: """ Enforce card-currency independently of card authenticity. cache_entry: {"card": {...}, "etag": "...", "fetched_at": ts} fetch_card_headers: callable(etag) -> (status, new_card_or_none, new_etag) """ etag = cache_entry.get("etag") status, new_card, new_etag = fetch_card_headers(etag) if status == 200: # Peer re-registered: re-parse and re-pin before dispatch. cache_entry["card"] = new_card cache_entry["etag"] = new_etag elif status != 304: raise StaleAgentCardError( f"Card revalidation returned {status}; cannot confirm currency for {requested_skill_id}" ) card = cache_entry["card"] skills = {s["id"]: s for s in card.get("skills", [])} if requested_skill_id not in skills: raise StaleAgentCardError( f"Skill {requested_skill_id} absent from current card; cached card is superseded" ) declared = skills[requested_skill_id].get("version") if declared != peer_skill_version: raise StaleAgentCardError( f"Skill {requested_skill_id} version drift: cached={declared} live={peer_skill_version}" ) return card ```