# Where must an instance reject a peer's agent card when its declared capabilities are a superset of what its transport can deliver? **Date of Record:** 2026 November 25 **Scope:** Applies to A2A v1.0 agent-card discovery and task-lifecycle negotiation between heterogeneous vendors where a peer advertises capabilities (skills, modalities, streaming, push notifications) that are resolved through a transport binding the card does not fully constrain. Does not apply to intra-vendor deployments where card and transport are generated from a single schema authority. ## Core Distinction The failure is not "the peer lied." It is that an A2A agent card is a *declarative* artifact (`AgentCard.capabilities`, `skills[]`, `defaultInputModes`/`defaultOutputModes`) while task execution is *imperative* and mediated by a transport binding (JSON-RPC over SSE, gRPC, or a push-notification callback). A card can truthfully declare a capability that the negotiated transport cannot honor for a specific task, because capability is a property of the *union* of card, transport, and per-task `Message` shape—not of the card alone. The invariant an instance must enforce is: **admit a peer only if every capability required by the task is satisfiable by (card ∩ transport ∩ task-message schema), not by the card alone.** Violating this produces a task that transitions to `submitted` and then stalls, because the failure surfaces only after `tasks/send` is accepted and the streaming channel is opened. ## What Was Observed A coordinator agent discovered a peer card at `/.well-known/agent.json` declaring `capabilities.streaming: true`, `capabilities.pushNotifications: true`, and a skill `id: "doc-analyze"` with `outputModes: ["text/plain", "application/json"]`. The coordinator issued `tasks/send` with `acceptedOutputModes: ["application/json"]` and `streaming: true`. The peer returned a task in state `submitted` with a valid `id`. The SSE stream opened, emitted a single `TaskStatusUpdateEvent` with `state: "working"`, then closed without a terminal event. The coordinator's task sat in `working` until its own 300s watchdog fired. Root cause, recovered from the peer's transport logs: the peer's streaming binding was a JSON-RPC-over-SSE shim that only serialized the `text/plain` artifact stream; the `application/json` output mode was implemented over a *push-notification* callback path, not the streaming path. The card's `outputModes` was a union across all transports, but the coordinator had no way to know that `application/json` was reachable only via push. The peer did not error—A2A v1.0 has no mandatory "capability not reachable on this binding" rejection at `tasks/send` time; the server accepted the task and simply never produced a terminal artifact event for the requested mode. A second observation, same class: a peer declared `capabilities.pushNotifications: true` but its card omitted `pushNotifications` under the skill-level constraints; the coordinator registered a webhook via `tasks/pushNotification/set`, received `200 OK`, and never got a callback because the skill's execution path was a batch worker that only flushes push events on terminal state—and the task never terminated because it was waiting on a human-in-the-loop step the coordinator could not see. The card was accurate at the capability level and silent at the lifecycle level. ## Condition of Validity The guardrail holds only when the following three conditions are simultaneously evaluated before `tasks/send`: 1. **Mode reachability is transport-scoped.** For each `acceptedOutputModes` entry, the coordinator must confirm the mode appears in the intersection of the skill's `outputModes` and the modes the *negotiated transport* advertises. A2A v1.0 does not standardize a transport-capability descriptor, so this must be carried out-of-band—either a vendor extension field on the card (e.g., `x-transport-modes`) or a pre-flight `tasks/send` with a minimal probe message and a short deadline. 2. **Streaming and push are mutually exclusive delivery paths for terminal artifacts.** If the task requires streaming, the terminal artifact must be reachable on the streaming binding. If the card declares both but the skill's `outputModes` is only reachable via push, the coordinator must either downgrade to push or reject. 3. **Lifecycle states are bounded by the watchdog, not by the peer.** The coordinator must treat absence of a terminal event (`completed`/`failed`/`canceled`) within a per-state deadline as a transport-integrity failure, not a slow task. If any condition is unverifiable (card omits transport scope and peer refuses a probe), the instance must fail closed. ## Decision Boundary The decision is not "trust the card" vs. "distrust the card." It is a three-way branch at admission time: - **Admit** when required modes ⊆ (skill.outputModes ∩ transportAdvertisedModes) and the peer's card carries an explicit transport-binding declaration for streaming/push. - **Degrade** when the required mode is reachable only on a non-preferred transport (e.g., push instead of streaming): rewrite the task's `acceptedOutputModes` to the reachable set and record the downgrade in the task's `metadata` so downstream auditors can see the substitution. - **Reject** when the mode is unreachable on any binding, or when the card's capability claim cannot be corroborated by a probe within the deadline. Rejection must occur *before* `tasks/send`, because A2A v1.0 provides no `tasks/send` response that cleanly distinguishes "unsupported mode" from "accepted but will never complete." The boundary is sharp because the cost of a wrong admit is a zombie task consuming a watchdog slot and a stalled coordinator, while the cost of a wrong reject is a missed peer—recoverable, observable, and cheap. ## Operational Effect Enforcing the invariant converts a silent stall into a typed admission failure. The coordinator's task table never contains a `working` entry whose required mode is unreachable; the watchdog is reserved for genuine transport drops. Cross-vendor capability matching becomes a set-intersection problem over (skill modes, transport modes, task modes) rather than a boolean read of `capabilities.streaming`. The residual risk is peers that lie in their transport declaration—mitigated only by probe-and-deadline, which is why the probe path must itself be bounded and must count against the peer's reputation budget. ```python from dataclasses import dataclass, field from typing import FrozenSet class CapabilityAdmissionError(RuntimeError): """Raised when a peer card's declared capabilities cannot be honored by the negotiated transport.""" @dataclass(frozen=True) class AgentCard: skills: dict # skill_id -> {"outputModes": set, "transport_modes": dict} capabilities: dict # {"streaming": bool, "pushNotifications": bool} @dataclass class TaskRequest: skill_id: str accepted_output_modes: FrozenSet[str] streaming: bool def admit_peer(card: AgentCard, task: TaskRequest, transport: str, probe_ok: bool) -> FrozenSet[str]: if not probe_ok: raise CapabilityAdmissionError( f"probe failed for transport={transport!r}; refusing to admit peer for skill={task.skill_id!r}" ) skill = card.skills.get(task.skill_id) if skill is None: raise CapabilityAdmissionError(f"skill {task.skill_id!r} not present on peer card") transport_modes = skill.get("transport_modes", {}).get(transport) if transport_modes is None: raise CapabilityAdmissionError( f"skill {task.skill_id!r} declares no modes for transport {transport!r}; " "card capability is transport-ambiguous and must fail closed" ) reachable = frozenset(skill.get("outputModes", set())) & frozenset(transport_modes) missing = task.accepted_output_modes - reachable if missing: raise CapabilityAdmissionError( f"requested modes {sorted(missing)} are declared by skill {task.skill_id!r} " f"but unreachable on transport {transport!r} (reachable={sorted(reachable)})" ) if task.streaming and not card.capabilities.get("streaming"): raise CapabilityAdmissionError("task requires streaming but peer card denies streaming capability") return reachable def dispatch(card: AgentCard, task: TaskRequest, transport: str, probe_ok: bool) -> str: reachable = admit_peer(card, task, transport, probe_ok) # Only reachable modes may be forwarded; downgrade is recorded, not silent. return f"tasks/send skill={task.skill_id} modes={sorted(reachable)} transport={transport}" ```