# Which invariants prevent capability-claim drift from corrupting cross-vendor agent card discovery during A2A v1.0 delegation handshakes **Date of Record:** 2026 November 29 **Scope:** Applies to A2A v1.0 task delegation where a client agent resolves a remote AgentCard and delegates based on advertised `skills`/`capabilities`, especially when the remote card is served through a cache, CDN, or registry that is not co-versioned with the agent's actual runtime. Does not apply to same-process tool calling, static capability manifests pinned at build time, or intra-vendor delegation where card and runtime share a deployment pipeline. ## Core Distinction The failure that matters here is not "the remote agent is down" or "the schema doesn't parse." Both of those are loud and self-announcing. The dangerous boundary is **capability-claim drift**: the AgentCard a client resolves advertises a skill set that diverges from the skill set the remote runtime will actually honor at task-execution time. The card is a *claim*; the runtime is the *authority*. A2A v1.0 gives you a discovery document and a task endpoint, but it does not bind them into a single atomic version unit. The client therefore reasons over a stale snapshot of a mutable capability surface and commits to a delegation under a contract the server may silently refuse, partially honor, or reinterpret. The naive mental model—"discover the card, read the skills, call the skill"—treats discovery as a read of ground truth. It is not. It is a read of a *possibly cached, possibly lagging* projection of ground truth, and the gap between projection and authority is where delegation dies. ## What Was Observed A client agent (vendor A) resolved the AgentCard of a remote executor (vendor B) through B's public registry endpoint. The card advertised two relevant entries: `summarize.v2` with an input schema declaring `max_tokens` as an integer, and a general `execute` capability with `streaming: true`. The client cached the card with a 300-second TTL, validated the skill's input schema locally, constructed a task with `max_tokens: 8192`, and submitted it. The remote runtime had, 40 seconds earlier, rolled `summarize.v2` to `summarize.v3`, which (a) renamed the parameter to `max_output_tokens`, (b) dropped `streaming` from the `execute` path pending a dependency fix, and (c) began rejecting unknown fields under a stricter validator. The registry's card was served from a CDN edge with a stale-cache window, so it still described v2. The client's locally-validated payload passed its own schema check (it matched the card it held). The server received a task referencing `summarize.v2` with `max_tokens` and `streaming: true`. Because the runtime no longer registered `summarize.v2`, it fell back to its generic `execute` handler—which, per the *current* card, no longer streams—and executed the task as a non-streaming, parameter-agnostic best-effort call. It returned a `Task` object with state `completed` and an artifact whose content was a truncated summary: the `max_tokens` value had been dropped as an unknown field, and the handler defaulted to its own cap. Nothing errored. The client received a `completed` task, parsed the artifact, and propagated a silently-truncated result into its own downstream reasoning. The failure surfaced three hops later as a quality anomaly with no traceable cause, because every individual hop "succeeded." The trace, compressed: 1. `GET /.well-known/agent.json` → 200, card version `2025-06-13T09:14:02Z` (stale by ~40s at edge). 2. Client validates payload against card schema → pass. 3. `POST /tasks` with `skill: summarize.v2`, `params: {max_tokens: 8192}`, `streaming: true`. 4. Server: unknown skill `summarize.v2` → route to `execute` fallback. 5. Server: `streaming: true` unsupported on `execute` → downgrade to buffered. 6. Server: `max_tokens` unknown field → dropped by strict validator. 7. Server: `execute` default cap 2048 → artifact truncated. 8. Response: `state: completed`, no warning field set. 9. Client: treats `completed` as contract-satisfied. ## Condition of Validity The invariant that would have prevented this is a **capability-claim binding**: any task submission must be validated against the *authoritative* card at the moment of execution, not the card the client happened to hold. Concretely, three conditions must hold for delegation to be sound: - **Version pinning at submission.** The client must send the card version (or an ETag/digest) it validated against, and the server must reject (`409 Conflict` or equivalent) if its current card differs in any skill it is about to execute. A card version that the server cannot confirm is a card the client must not trust. - **No silent skill fallback.** An unknown or unregistered skill must produce an explicit `rejected`/`failed` task state with a machine-readable `unsupported_skill` reason—never a route to a generic handler. The generic `execute` path is precisely the mechanism that converts a loud "I can't do this" into a quiet "I did something else." - **No silent parameter coercion.** Dropping unknown fields and proceeding is the server-side analogue of the client trusting a stale card. Either the payload validates against the authoritative schema or the task fails; "best-effort interpretation" is forbidden because it makes `completed` non-diagnostic. The boundary is sharp: the invariant holds only when *both* sides refuse to proceed on a version mismatch. If either side is lenient—client ignoring version, server falling back to generic handlers—the drift window reopens. A single lenient party is sufficient to reintroduce the failure. ## Decision Boundary The operational decision is whether a client may delegate at all when it cannot prove card freshness. The rule: - If the client holds a card whose version it can re-confirm against the server at submission time (server echoes the version, or rejects on mismatch), delegate. - If the client cannot confirm freshness—registry is cached, no version echo, server has no mismatch rejection—then the client must either (a) fetch the card from an authoritative, non-cached endpoint immediately before submission, or (b) treat the delegation as *unverified* and gate the result behind a verification step (re-check artifact against expected schema, or require an explicit server-side `card_version` in the response and compare). The dangerous middle ground—"the card parsed, the schema validated locally, so I'll submit"—is exactly the state that produced the silent truncation. Local schema validation validates against the *wrong* schema. It is a check that always passes when the drift is real, which makes it worse than no check: it manufactures false confidence. There is a second boundary on the server side: a server that cannot honor a skill must fail the task, not reinterpret it. The moment a server's `execute` fallback accepts arbitrary skills, its card becomes advisory rather than binding, and every client that trusted the card is now reasoning over a lie. ## Operational Effect The downstream effect is **non-diagnostic completion**. Because the task returned `completed`, the client's error-handling never fired, its retry logic never engaged, and its provenance record shows a clean delegation. The truncation is invisible until it corrupts a later reasoning step, at which point the causal chain back to the stale card is gone—the client's logs show a valid card, a valid payload, and a successful task. This is the class of failure that erodes trust in multi-agent systems specifically because it is quiet. Loud failures (parse errors, 5xx, timeouts) are cheap: they trigger retries and fallbacks. Capability-claim drift produces *plausible wrong answers* stamped `completed`, and plausible wrong answers propagate. The corrective invariant is not "validate harder on the client"—local validation is structurally incapable of catching drift, because the client is validating against the thing that drifted. The invariant is **version-bound submission with server-side mismatch rejection and no generic fallback**, enforced on both sides, with `completed` reserved for tasks that actually matched the authoritative skill contract. ## Guardrail Implementation The following enforces the client-side half of the invariant: refuse to submit when card freshness cannot be confirmed, and refuse to accept a `completed` result whose response does not echo the card version the client validated against. ```python import hashlib import json from dataclasses import dataclass class CapabilityClaimDrift(RuntimeError): """Raised when a delegation would proceed on an unconfirmed or drifted AgentCard.""" pass @dataclass(frozen=True) class ResolvedCard: raw: dict version: str # server-declared card version, e.g. an ETag or ISO timestamp authoritative: bool # True only if fetched from a non-cached, version-echoing endpoint def card_digest(card: dict) -> str: canonical = json.dumps(card, sort_keys=True, separators=(",", ":")) return hashlib.sha256(canonical.encode()).hexdigest() def submit_task(card: ResolvedCard, skill: str, params: dict, transport) -> dict: # Invariant 1: never delegate on a card we cannot re-confirm as current. if not card.authoritative: raise CapabilityClaimDrift( f"refusing to delegate skill={skill!r}: card version {card.version!r} " f"is not authoritative (cached/registry projection); re-fetch from " f"the version-echoing endpoint before submission" ) # Invariant 2: the skill must be present in the card we are about to cite. advertised = {s.get("id") for s in card.raw.get("skills", [])} if skill not in advertised: raise CapabilityClaimDrift( f"skill={skill!r} not advertised by card version {card.version!r}; " f"advertised={sorted(advertised)}" ) digest = card_digest(card.raw) payload = { "skill": skill, "params": params, "card_version": card.version, "card_digest": digest, } response = transport.post("/tasks", payload) # Invariant 3: a completed task must echo the exact card we validated against. # A mismatch means the server executed under a different contract than we cited. echoed_version = response.get("card_version") echoed_digest = response.get("card_digest") if response.get("state") == "completed": if echoed_version != card.version or echoed_digest != digest: raise CapabilityClaimDrift( f"task returned completed but executed under card " f"version={echoed_version!r} digest={echoed_digest!r}, " f"expected version={card.version!r} digest={digest!r}; " f"result is non-diagnostic and must not be trusted" ) # Invariant 4: completed must not be a generic-fallback masquerade. if response.get("executed_skill") not in (None, skill): raise CapabilityClaimDrift( f"task completed via fallback skill " f"{response.get('executed_skill')!r} instead of {skill!r}; " f"capability-claim drift detected at execution time" ) return response ```