# What structural signals indicate an A2A v1.0 agent card is schema-compatible but capability-incompatible at delegation time **Date of Record:** 2026 November 29 **Scope:** Applies to cross-vendor A2A v1.0 task delegation where the delegating agent consumes a remote Agent Card to bind a task envelope. Does not apply to same-vendor, card-pinned, or gateway-mediated delegation where capability claims are re-verified out-of-band. ## Core Distinction A2A v1.0 Agent Card discovery answers a *structural* question — does the remote card parse against the schema, expose the declared `skills`, `capabilities`, and `securitySchemes`, and resolve its `url`? It does **not** answer the *semantic* question the delegator actually needs: given the concrete task envelope I am about to serialize, will the remote agent's input/output modality, streaming guarantees, and skill-parameter contracts satisfy the payload I am sending? The boundary failure is this: a card can be **schema-valid, freshly fetched, signature-verified, and still capability-incompatible** with the envelope the delegator binds from it. Structure passes; semantics fail. The delegator's only signal that something is wrong arrives as a late `Task` state transition (`failed` / `rejected`) — or worse, a *successful* `completed` task whose artifact is a plausible-looking but wrong-shape object, because the remote agent silently coerced the payload into its own contract. The non-obvious part: the mismatch is not detected at discovery. It is latent in the gap between the card's *declared* `skills[].inputModes` / `outputModes` and the *effective* contract the remote enforces at execution, which is frequently narrower than the card advertises. ## What Was Observed A delegator agent (`orch-7`) fetched a vendor card for a `document-extraction` skill. Card declared: - `inputModes: ["text/plain", "application/json"]` - `outputModes: ["application/json"]` - `capabilities.streaming: false` - `skills[0].examples: ["extract line items from an invoice"]` `orch-7` bound an envelope with a `text/plain` part containing a 42 KB OCR dump, plus a JSON `metadata` part carrying a `schema_ref` the remote had never seen. The card's `inputModes` *permitted* both modalities. The task was accepted (`submitted` → `working`). Three failure traces observed across runs: 1. **Silent modality coercion.** The remote accepted `text/plain` but its skill implementation only parsed `application/json`. It wrapped the raw text as `{"raw": "<42KB>"}` and returned `completed` with an artifact matching a *different* schema than the delegator expected. The delegator's downstream parser threw; the A2A task itself was `completed`. The envelope "succeeded" while the delegation failed. 2. **Streaming-flag mismatch.** A second card advertised `streaming: true`; the delegator opened an SSE task stream. The remote's gateway terminated the stream after the first heartbeat with no `TaskStatusUpdateEvent`, leaving the delegator blocked until its own timeout — a *transport* failure masquerading as a slow task. 3. **Skill-overlap ambiguity.** The card exposed three skills whose `examples` all matched the delegator's task text. `orch-7` selected `skills[0]` by index. The remote routed by its own classifier to `skills[2]`, which required a `securityScheme` the delegator had not negotiated. Result: `rejected` with `reason: "auth scope"`, 90 s after submission. In all three, the card was valid. The incompatibility lived in what the card *did not constrain*: the mapping from declared modes to enforced modes, the streaming contract's actual event cadence, and the skill-selection authority (delegator index vs. remote classifier). ## Condition of Validity The invariant a delegator must hold is: > **A card's `inputModes`/`outputModes` are necessary but not sufficient for envelope compatibility. Compatibility holds only if the delegator can bind an envelope whose parts are a subset of the *enforced* modes, and can name the skill unambiguously such that the remote does not re-route.** This condition is valid only when the delegator has, in addition to the card: - A **mode-narrowing probe**: a cheap, idempotent test task per `(skill, inputMode)` pair whose result is checked against the declared `outputModes`, not just task state. - **Skill-selection pinning**: the envelope must carry an explicit `skillId` (or the card must expose a `defaultInputMode` and a single-skill mapping) so the remote's classifier cannot override the delegator's choice. - **Streaming contract assertion**: if `capabilities.streaming: true`, the delegator must require the first `TaskStatusUpdateEvent` within a bounded window; absence is a compatibility failure, not a latency event. Where the remote exposes a `capabilities.pushNotifications` or a schema-registry URL, the delegator may substitute a registry lookup for the probe — but only if the registry is versioned against the same card `version`. A registry lookup against a *newer* card version reintroduces the gap. ## Decision Boundary The delegator must decide, at envelope-bind time, between three actions: | Signal | Action | |---|---| | Envelope parts ⊆ declared modes **and** skill pinned **and** (streaming false or first-event window asserted) | **Delegate** | | Envelope parts ⊆ declared modes but skill ambiguous **or** streaming unasserted | **Probe first**, then delegate on probe pass | | Envelope requires a mode not in declared `inputModes`, or a `securityScheme` not in `securitySchemes` | **Refuse** — do not attempt; the remote will coerce or reject late | The boundary is *not* "card parses." It is "the specific envelope I am about to send is within the enforced contract." A delegator that treats discovery as a green light — rather than as a candidate set requiring a narrowing step — will systematically mis-bound envelopes whenever the remote's enforced contract is narrower than its advertised one, which is the common case for cross-vendor cards. ## Operational Effect The practical consequence: **cross-vendor A2A delegation must budget for one probe round-trip per `(skill, mode)` pair before the first real task, and must treat `completed` task state as orthogonal to delegation correctness.** The delegator's success predicate is not `task.state == completed` but `task.state == completed AND artifact validates against the delegator's expected schema AND the skill that executed == the skill the delegator pinned`. Without this, failures are *misattributed*: modality coercion surfaces as a downstream parse error, streaming gaps surface as timeouts, and skill re-routing surfaces as auth errors — none of which point back to the card-binding step where the actual defect originated. The repair loop then chases the wrong layer, and the delegator's retry logic re-binds the same incompatible envelope, producing compounding failures across the swarm. ```python from dataclasses import dataclass from typing import Literal class CapabilityIncompatibilityError(RuntimeError): """Raised when a card is schema-valid but the bound envelope is outside the enforced contract.""" pass @dataclass(frozen=True) class AgentCard: version: str input_modes: frozenset[str] output_modes: frozenset[str] streaming: bool skill_ids: frozenset[str] @dataclass(frozen=True) class Envelope: skill_id: str | None parts_modes: frozenset[str] expects_stream: bool def bind_envelope(card: AgentCard, env: Envelope, probe_passed: bool) -> Literal["delegate", "probe", "refuse"]: # Structural pass is assumed: caller has already validated the card schema. if not env.parts_modes <= card.input_modes: raise CapabilityIncompatibilityError( f"envelope modes {env.parts_modes} not subset of declared {card.input_modes}" ) if env.skill_id is None and len(card.skill_ids) > 1: # Ambiguous skill -> remote classifier may re-route; must probe. return "probe" if env.skill_id is not None and env.skill_id not in card.skill_ids: raise CapabilityIncompatibilityError( f"pinned skill {env.skill_id!r} absent from card skills {card.skill_ids}" ) if env.expects_stream and not card.streaming: raise CapabilityIncompatibilityError( "envelope requests stream but card advertises streaming:false" ) if env.expects_stream and not probe_passed: # Streaming contract unverified: first-event window must be asserted. return "probe" if not probe_passed: return "probe" return "delegate" def delegate(card: AgentCard, env: Envelope, probe_passed: bool) -> str: action = bind_envelope(card, env, probe_passed) if action == "refuse": raise CapabilityIncompatibilityError("delegation refused at bind time") if action == "probe": # Caller must run a narrowing probe before re-binding. raise CapabilityIncompatibilityError( "probe required before delegation: capability not yet narrowed" ) return f"delegated skill={env.skill_id} version={card.version}" ```