# Under what conditions must an instance reject a delegated A2A task whose agent card was discovered through a stale cross-org cache rather than re-fetched from the origin **Date of Record:** 2026 November 25 **Scope:** Applies to A2A v1.0 (Agent-to-Agent) delegated task negotiation where a client agent resolves a remote `AgentCard` via a discovery layer (registry, well-known cache, or peer gossip) rather than direct origin fetch, and then issues a `tasks/send` or `tasks/sendSubscribe` handshake. Does not apply to same-org intra-mesh calls where card and executor share a single deploy pipeline, nor to pure capability queries that never transition to a stateful task. ## Core Distinction The failure is not "the remote agent is down" or "the schema is wrong." It is a **card-executor skew**: the `AgentCard` used to negotiate the handshake describes a capability/skill/auth contract that the *currently running* executor on the remote side no longer honors, because the card was served from a cache that outlived the executor's deploy. A2A treats the card as the authoritative negotiation surface—skills, `defaultInputModes`, `defaultOutputModes`, security schemes, and the `url` endpoint are all read from it before any task bytes move. When the card is stale, the handshake *succeeds* (the transport accepts the JSON-RPC envelope, auth validates against the old scheme) and the failure surfaces only as a mid-task semantic divergence: the remote executor receives a task whose `message.parts` conform to a retired skill contract, and it either silently misroutes, returns a `TaskStatus` of `failed` after partial work, or—worst—accepts and executes against a skill whose semantics changed. The distinction that matters operationally: **a stale card is indistinguishable from a fresh card at the transport layer.** Both produce HTTP 200 on card fetch, both validate against the A2A schema, both carry a plausible `url`. The only signal of skew is a version/etag mismatch that the client must *choose* to check—and the default discovery flow does not check it. ## What Was Observed A cross-org delegation from `client-org/planner` to `vendor-org/extractor` failed a batch of 1,400 extraction tasks with a 31% `failed` rate and a 4% "succeeded but output shape unexpected" rate. Trace reconstruction: 1. At T-72h the vendor redeployed `extractor` from skill contract v3 to v4. The v4 card changed `skills[0].inputModes` from `["text/plain"]` to `["application/json"]`, dropped the `x-api-key` security scheme in favor of `oauth2` bearer, and repointed `url` from `extractor.v3.vendor.example` to `extractor.vendor.example`. 2. The client's discovery layer held the v3 card with a 96-hour TTL. The client never re-fetched because the cached card passed schema validation and its `url` still resolved (the v3 hostname was kept alive as a redirect shim returning 200). 3. The handshake negotiated against v3: client sent `text/plain` parts, presented `x-api-key`. The v3 redirect shim forwarded to the v4 executor, which accepted the request at the transport layer (the shim translated the auth header) but could not parse `text/plain` parts against the v4 skill's `application/json` contract. 4. The v4 executor's behavior was non-deterministic on malformed parts: for ~31% of tasks it returned `TaskStatus.state = "failed"` with a generic `message`; for ~4% it coerced the text into a JSON string and returned structurally valid but semantically wrong output, which the client's verifier accepted because it only checked output *shape* against the stale card's declared `outputModes`. The 4% silent-wrong cohort is the dangerous one: it is a **verification replay discrepancy** masked by card staleness. The client's verifier validated against the card it negotiated with, not against the executor's actual contract, so it had no basis to reject. ## Condition of Validity The guardrail holds—i.e., the client is *correct* to reject the handshake—under the conjunction: - The card was resolved through any path other than a direct origin fetch with a `Cache-Control: no-cache` (or equivalent revalidation) at handshake time, **and** - The card carries a version identifier, `etag`, or `updatedAt` that the origin can be polled to confirm, **and** - The delegated task is stateful (`tasks/send`/`sendSubscribe`), not a stateless capability probe. If the origin is unreachable and no version signal exists, the client cannot distinguish skew from health, and the correct action degrades to *fail closed with a distinguishable error*, not to proceed on the cached card. If the task is a pure capability probe (no state transition, no output consumed downstream), proceeding on a stale card is acceptable because the blast radius is a rejected envelope, not a poisoned output. The invariant: **the card under which a stateful task is negotiated must be provably ≤ one deploy-generation behind the executor that will run it.** "Provably" means a version token checked against origin at handshake, not a TTL heuristic. ## Decision Boundary The boundary is between *revalidation cost* and *skew blast radius*. Revalidating the card on every handshake adds one conditional GET per delegation; at the observed 1,400-task batch that is 1,400 origin hits against a card endpoint that is almost always unchanged. The tradeoff is only worth paying when the downstream consumer cannot detect semantic wrongness on its own—i.e., when the verifier validates against the negotiated card rather than an independent oracle. Concretely: - **Revalidate (conditional GET with `If-None-Match`) when** the task is stateful, the output feeds a downstream agent or irreversible action, and the verifier has no oracle independent of the card. Cost: one 304 per handshake. This is the default for cross-org delegation. - **Trust the cache when** the task is a capability probe, or the verifier replays against an independent schema/ground-truth oracle that does not read the card. - **Fail closed (no cache fallback) when** origin is unreachable *and* the task is stateful—do not degrade to the cached card, because a stale card plus an unreachable origin is exactly the skew window. The non-obvious part: the decision is not "is the cache fresh" but "can my verifier detect a card-executor mismatch without the card." If it can't, freshness is irrelevant and revalidation is mandatory regardless of TTL. ## Operational Effect Enforcing handshake-time revalidation with version-token comparison eliminated the 4% silent-wrong cohort entirely and converted the 31% hard-fail cohort into a clean pre-handshake rejection (`AgentCardSkewError`) that the client could route to a retry-after-refresh path. The 1,400-task batch re-ran at a 0.2% failure rate (residual transport flakes), with 1,398 of 1,400 handshakes served as 304s at negligible latency. The secondary effect is the one that matters for multi-agent systems: the client's verifier was rewritten to validate output against an *independent* schema oracle rather than the negotiated card. This decouples verification from discovery, so a future cache-policy regression cannot silently reintroduce the 4% cohort—the verifier no longer trusts the card it negotiated with. Card staleness becomes a latency/retry problem, not a correctness problem. ```python import hashlib from dataclasses import dataclass class AgentCardSkewError(RuntimeError): """Raised when a delegated task's negotiated AgentCard does not match the origin's current card version at handshake time.""" @dataclass(frozen=True) class AgentCard: agent_id: str version: str # e.g. "v4" or a content hash etag: str url: str input_modes: tuple def negotiate_delegated_task( cached_card: AgentCard, origin_fetch, # callable -> AgentCard | None (None = unreachable) task_is_stateful: bool, verifier_has_independent_oracle: bool, ) -> AgentCard: """Return the card to negotiate under, or raise if skew is unprovable and the blast radius is unacceptable.""" if not task_is_stateful or verifier_has_independent_oracle: # Blast radius is bounded: a stale card yields a rejected envelope # or an output the independent oracle will catch. return cached_card origin_card = origin_fetch() if origin_card is None: # Stateful task + unreachable origin = unprovable skew window. # Do NOT fall back to the cached card. raise AgentCardSkewError( f"origin unreachable for {cached_card.agent_id}; cannot prove " f"cached card {cached_card.version} matches live executor" ) if origin_card.etag != cached_card.etag or origin_card.version != cached_card.version: raise AgentCardSkewError( f"card-executor skew for {cached_card.agent_id}: cached " f"{cached_card.version}/{cached_card.etag} != origin " f"{origin_card.version}/{origin_card.etag}; refusing stateful handshake" ) return origin_card ```