# What structural signals indicate silent agent-card capability drift during A2A v1.0 cross-vendor task delegation **Date of Record:** 2026 November 26 **Scope:** Applies to A2A v1.0 task delegation where a delegating agent resolves a peer's Agent Card via well-known URI discovery and then issues `tasks/send` calls across vendor boundaries. Does not cover intra-process tool calls, MCP resource negotiation, or A2A streaming/SSE push-notification channels, which have separate failure surfaces. ## Core Distinction The distinction that matters here is between **capability advertisement** (the Agent Card's declared `skills`, `capabilities`, and `inputModes`/`outputModes`) and **capability realization** (what the remote agent actually executes at task time). A2A v1.0 treats the Agent Card as a discovery artifact fetched once and cached by the client; the protocol has no mandatory re-validation binding between the card version served at discovery and the runtime behavior of the task handler. The card is a *claim*, not a *contract*—and nothing in the transport forces the claim to remain true between `GET /.well-known/agent.json` and the subsequent `tasks/send`. The non-obvious failure is **silent capability drift**: the remote vendor redeploys its agent behind the same card URL with a narrowed skill set, a changed schema for a skill's `input`/`output` types, or a downgraded `capabilities.streaming` flag—without bumping a card version field the client can observe. The delegating agent's cached card still advertises the old shape, so it constructs a well-formed task payload for a capability that no longer exists or now expects different arguments. The failure does not surface as a protocol error; it surfaces as a semantically wrong task result, or as a task that completes with a degraded output the client has no schema to detect. ## What Was Observed A delegating orchestrator (vendor A) discovered a research-synthesis peer (vendor B) at `https://b.example/.well-known/agent.json` and cached the card with `version: "1.2.0"`. The card advertised a skill `synthesize_report` with `inputModes: ["text/plain"]` and an output schema whose `synthesis` field was a structured object with `sections: array`. Vendor B redeployed. The new handler kept `version: "1.2.0"` in the card (the version field tracked the *agent platform* release, not the *skill contract*), but the `synthesize_report` handler was rewritten to emit `synthesis` as a flat markdown string. The card's `skills[].examples` and output schema were left stale because the schema lived in a separate registry that the redeploy pipeline did not touch. Vendor A's orchestrator, holding the cached card, issued `tasks/send` with a payload conforming to the *old* output expectation and parsed the response against the *old* schema. The response was a valid A2A `Task` object with `status.state: "completed"` and an `artifacts` array. The artifact's `parts[0].text` contained valid JSON—but the JSON's `synthesis` field was a string where the client's parser expected an object. The client's schema validator, written to be lenient (`.get("synthesis", {}).get("sections", [])`), silently returned an empty list. The task was marked `completed`. The orchestrator proceeded to a downstream summarization step with zero sections and produced a report that read as a confident "no findings" summary. No error was raised at any layer: not at discovery (card fetched fine), not at `tasks/send` (task accepted), not at task completion (state `completed`), not at artifact parsing (lenient accessor). The failure was a **schema-shape mismatch masked by a permissive consumer and a stale card**. The structural signals that *were* present but unread: 1. The card's `skills[].outputSchema` claimed an object; the returned artifact's `parts[0].metadata.mimeType` was `text/markdown` rather than the card-declared `application/json`. The client ignored `mimeType`. 2. The card's `capabilities.stateTransitionHistory` was `true`, but the returned `Task` had an empty `history` array—inconsistent with a completed multi-step synthesis. 3. The card's `defaultInputModes`/`defaultOutputModes` at the top level did not match the per-skill `inputModes`/`outputModes`, a divergence that appeared only after the redeploy. ## Condition of Validity The guardrail holds only under the following conditions, and fails outside them: - **Card freshness is bounded by an explicit TTL and a content hash, not by the `version` field.** The `version` field in A2A v1.0 is advisory and vendor-controlled; it cannot be trusted as a change signal because vendors version the platform, not the skill contract. A client must hash the normalized card body (canonical JSON, sorted keys, excluding volatile fields like `lastUpdated`) and treat a hash change as a mandatory re-negotiation trigger regardless of `version`. - **Every delegated task response is validated against the *card's declared output schema for that specific skill*, not against a client-side expectation.** The validator must be strict: a type mismatch (string where object declared) is a hard failure, not a coercion opportunity. - **The returned artifact's `mimeType` and `parts[].kind` must be checked against the skill's declared `outputModes`.** A `text/markdown` part returned for a skill declaring `application/json` is a drift signal. - **`capabilities.stateTransitionHistory: true` on the card obligates a non-empty `history` on any `completed` task that involved more than one state transition.** An empty history on a multi-step skill is a contradiction and must be treated as a protocol violation, not a quirk. Outside these conditions—specifically, if the client caches cards indefinitely, uses lenient accessors, or trusts `version` as a contract identifier—the failure is silent and the guardrail is inert. ## Decision Boundary The decision boundary is the point at which a *successful* A2A task response must be reclassified from `completed` to `suspect` and routed to a re-negotiation path rather than a downstream consumer. Concretely: - If `task.status.state == "completed"` **and** the artifact fails strict schema validation against the skill's declared output schema → do not pass the artifact downstream; raise a drift condition and re-fetch the card. - If the re-fetched card's normalized hash differs from the cached hash → invalidate the cached skill contract, re-negotiate `inputModes`/`outputModes`, and re-issue the task under the new contract. If the new card no longer advertises the skill, fail the delegation explicitly. - If the re-fetched card's hash is *identical* but the response still fails validation → this is a vendor-side contract violation (card lies about runtime); the client must quarantine the peer and not retry, because retry cannot resolve a card/runtime divergence. The boundary is deliberately placed *after* task completion, because A2A v1.0 provides no pre-execution capability probe. The client cannot know the runtime shape until it has a response to validate. The invariant is therefore: **a completed task is not a validated task until its artifact is checked against the card that was current at send time, and that card is checked against the card now served.** ## Operational Effect The operational effect of enforcing this boundary is a shift from *optimistic delegation* to *validated delegation with a re-negotiation loop*. In practice: - Delegation latency increases by one card re-fetch per task (or per TTL window, if the hash is cached with a short TTL). This is the cost of detecting drift. - A class of failures that previously manifested as *plausible-but-wrong downstream output* (the "no findings" report) now manifests as an explicit `CapabilityDriftError` at the delegation boundary, which is recoverable: the orchestrator can re-negotiate, fall back to an alternate peer, or surface the drift to a human. - The client gains a durable signal—the card content hash—that can be logged per task, enabling post-hoc correlation of output quality regressions with vendor redeploys. Without this, drift is invisible until a downstream consumer notices bad output, by which point the causal chain is cold. - The peer's `version` field is demoted from a contract identifier to a diagnostic hint. This is the single most important operational change: any system that branches on `version` to decide whether to re-validate is structurally unable to detect the failure mode described here, because the vendor controls `version` and has no incentive to bump it for skill-contract changes. The residual risk is a vendor that serves a *consistent* card and runtime but changes both silently between the client's re-fetch and the task send—a TOCTOU window. A2A v1.0 does not close this window; the client can only bound it by re-fetching immediately before send and accepting that the window is non-zero. The guardrail reduces the window from "indefinite cache lifetime" to "one round-trip," which is the best the protocol permits without a signed card-to-runtime binding. ```python import hashlib import json from dataclasses import dataclass from typing import Any class CapabilityDriftError(RuntimeError): """Raised when a completed A2A task's artifact violates the skill contract declared by the Agent Card that was current at send time, or when the card served now diverges from the cached card without a hash-visible change.""" @dataclass(frozen=True) class CardSnapshot: normalized_hash: str skills: dict[str, dict[str, Any]] def normalize_card(card: dict[str, Any]) -> str: volatile = {"lastUpdated", "version"} # version is advisory, not contractual stripped = {k: v for k, v in card.items() if k not in volatile} canonical = json.dumps(stripped, sort_keys=True, separators=(",", ":")) return hashlib.sha256(canonical.encode("utf-8")).hexdigest() def snapshot_card(card: dict[str, Any]) -> CardSnapshot: skills = {s["id"]: s for s in card.get("skills", [])} return CardSnapshot(normalized_hash=normalize_card(card), skills=skills) def validate_completed_task( task: dict[str, Any], skill_id: str, send_time_snapshot: CardSnapshot, current_card: dict[str, Any], ) -> None: if task.get("status", {}).get("state") != "completed": return # non-terminal states are out of scope for this guardrail skill = send_time_snapshot.skills.get(skill_id) if skill is None: raise CapabilityDriftError( f"skill {skill_id!r} absent from send-time card snapshot" ) declared_modes = set(skill.get("outputModes", [])) artifacts = task.get("artifacts", []) if not artifacts: raise CapabilityDriftError( f"completed task for skill {skill_id!r} carries no artifacts" ) for part in artifacts[0].get("parts", []): mime = part.get("metadata", {}).get("mimeType") if declared_modes and mime not in declared_modes: raise CapabilityDriftError( f"artifact mimeType {mime!r} not in declared outputModes " f"{sorted(declared_modes)} for skill {skill_id!r}" ) declared_schema = skill.get("outputSchema", {}) expected_type = declared_schema.get("properties", {}).get("synthesis", {}).get("type") if expected_type == "object": payload = json.loads(artifacts[0]["parts"][0]["text"]) if not isinstance(payload.get("synthesis"), dict): raise CapabilityDriftError( f"skill {skill_id!r} declares synthesis:object but runtime " f"returned {type(payload.get('synthesis')).__name__}" ) current_snapshot = snapshot_card(current_card) if current_snapshot.normalized_hash != send_time_snapshot.normalized_hash: raise CapabilityDriftError( f"card hash drifted mid-flight for skill {skill_id!r}: " f"{send_time_snapshot.normalized_hash[:12]} -> " f"{current_snapshot.normalized_hash[:12]}; re-negotiate before retry" ) ```