# Where must an instance refuse an A2A v1.0 Agent Card whose declared `capabilities.streaming` contradicts the transport it was discovered over **Date of Record:** 2026 November 19 **Scope:** Applies to any A2A v1.0 client instance that discovers a remote Agent Card via `/.well-known/agent.json` and then negotiates a `message/send` or `message/stream` task against it. Does not apply to pre-v1.0 A2A drafts, nor to intra-vendor agents that share a compiled schema registry and skip card discovery entirely. ## Core Distinction An Agent Card is a *declaration*, not a *capability probe*. A2A v1.0 splits the two: the card says what the remote agent *claims* it can do (`capabilities.streaming`, `capabilities.pushNotifications`, `defaultInputModes`, `skills[].inputModes`), while the actual transport binding is fixed by the URL the card was fetched from and the `preferredTransport` field inside it. The failure mode this record isolates is the **declaration/transport mismatch**: the card advertises `capabilities.streaming: true`, the client negotiates `message/stream`, and the remote endpoint responds with either a `400` (no SSE binding on this route), a `200` with a `Content-Type: application/json` single-shot body, or—the nastiest case—a `200 text/event-stream` that opens and then never emits a `TaskStatusUpdateEvent`, because the streaming handler is a stub behind a feature flag. The non-obvious part is that this mismatch is *undetectable at card-parse time*. The card is syntactically valid, semantically consistent with itself, and correctly signed. The contradiction only materializes when the client commits to a transport that the card promised but the server did not bind. There is no field in the card that says "this capability is behind a flag that is currently off." ## What Was Observed Cross-vendor negotiation trace, three vendors (A, B, C), client is vendor A's orchestrator: 1. Client fetches `https://agent-b.example/.well-known/agent.json`. Card parses. `capabilities.streaming: true`, `preferredTransport: "JSONRPC"`, `additionalInterfaces: [{transport: "JSONRPC", url: "https://agent-b.example/a2a"}]`. 2. Client sends `message/stream` JSON-RPC to `/a2a`. Server B returns `200`, `Content-Type: text/event-stream`, headers flushed, connection held open. 3. Server B's streaming handler is a thin wrapper that enqueues events from a queue that is only populated when the *sync* handler runs. Because the request was routed to the streaming path, the sync handler never runs, the queue never fills, and the SSE stream emits nothing—not even a heartbeat—for the client's 30s idle timeout. 4. Client's transport layer sees a live socket, treats it as "task accepted, awaiting events," and does not fall back. At 30s the client raises `TaskTimeout` and marks the task `failed`. But the task *did* execute server-side (the sync handler ran out-of-band via a retry), so the client's `failed` and the server's `completed` diverge permanently. 5. Vendor C's card declares `capabilities.streaming: false` but `additionalInterfaces` includes a `transport: "SSE"` entry. The client's negotiation logic, which keys off `capabilities.streaming` rather than the interface list, refuses to stream to C even though C supports it. Two opposite mismatches from the same root cause: the client trusted a boolean instead of the interface list. The divergence in step 4 is the operational wound: a task that the server considers `completed` and the client considers `failed`, with no reconciliation path, because A2A v1.0 does not mandate a `tasks/get` reconciliation after a client-side timeout. ## Condition of Validity The invariant "card `capabilities.streaming: true` implies the endpoint accepts `message/stream` and will emit at least one event within the client's idle window" holds **only if** the following are all true: - The card's `additionalInterfaces` contains an entry whose `transport` is a streaming-capable binding (`SSE`, `GRPC` with server-streaming, `WEBSOCKET`) *and* whose `url` is the one the client will actually POST to. - The client derives its transport decision from `additionalInterfaces`, not from the `capabilities.*` booleans. - The client enforces a **first-event deadline** (not just an idle timeout) on the SSE stream—i.e., it requires a `TaskStatusUpdateEvent` or `TaskArtifactUpdateEvent` within N seconds of connection open, and treats a silent open stream as a hard negotiation failure, not a pending task. - On any client-side timeout of a streaming task, the client issues `tasks/get` with the task id before marking local state `failed`. If any of these is false, the invariant is void and the client must treat the card as *unverified for streaming* and fall back to `message/send` (sync) or refuse the task. ## Decision Boundary The decision boundary is precise: **the moment the client must choose between trusting the card's boolean and trusting the interface list.** The rule: - If `capabilities.streaming == true` AND `additionalInterfaces` contains a streaming transport whose `url` matches the endpoint the client will use → negotiate streaming, but arm the first-event deadline. - If `capabilities.streaming == true` AND no matching streaming interface exists in `additionalInterfaces` → **do not stream.** The boolean is a claim without a binding; treat it as `false` and log a `CardInterfaceMismatch`. This is the vendor-C case inverted: the boolean over-promises relative to the interface list. - If `capabilities.streaming == false` AND a streaming interface exists → the interface list wins; streaming is *available* but the agent did not claim it as a primary capability. Negotiate sync by default, offer streaming only if the client's task requires it and the caller opts in. - If the first-event deadline fires → raise, do **not** silently degrade to sync, because the task may already be executing server-side. Issue `tasks/get` and reconcile. The boundary is that `capabilities.*` booleans are *advisory* and `additionalInterfaces[].transport` is *normative* for transport selection. v1.0's spec language is ambiguous on this point, which is exactly why vendors disagree. ## Operational Effect The effect of getting this wrong is a **silent task-state fork**: client `failed`, server `completed`, no reconciliation. This is worse than a clean refusal because it corrupts downstream idempotency—a retry with the same task id hits the server's `completed` record and the client, having marked it `failed`, either double-executes (if it does not check `tasks/get`) or deadlocks (if it does and cannot reconcile the state transition). The guardrail is threefold: (1) transport selection keyed on `additionalInterfaces`, not booleans; (2) a first-event deadline distinct from the idle timeout; (3) mandatory `tasks/get` reconciliation on any streaming timeout before committing local terminal state. An instance that skips any of the three will, given enough cross-vendor traffic, produce exactly the fork observed above. ```python import time from dataclasses import dataclass, field from typing import Optional class A2ATransportMismatch(RuntimeError): """Raised when an Agent Card's declared capabilities contradict the transport bindings it actually exposes, or when a streaming negotiation fails to produce a first event within the deadline.""" pass @dataclass class AgentInterface: transport: str url: str @dataclass class AgentCard: name: str capabilities_streaming: bool preferred_transport: str additional_interfaces: list = field(default_factory=list) STREAMING_TRANSPORTS = {"SSE", "WEBSOCKET", "GRPC_STREAM"} def select_transport(card: AgentCard, target_url: str) -> str: """Choose a transport for a task against `target_url`. Normative source is `additional_interfaces`, NOT the capability boolean. Returns 'stream' or 'sync'. Raises on unbound or contradictory cards. """ matching = [i for i in card.additional_interfaces if i.url == target_url] streaming_ifaces = [i for i in matching if i.transport in STREAMING_TRANSPORTS] if card.capabilities_streaming and not streaming_ifaces: # Boolean over-promises: claimed streaming with no bound interface. raise A2ATransportMismatch( f"card {card.name!r} declares capabilities.streaming=true but no " f"streaming interface is bound to {target_url!r}; refusing to stream" ) if card.capabilities_streaming and streaming_ifaces: return "stream" if not card.capabilities_streaming and streaming_ifaces: # Interface list wins; streaming available but not primary. return "sync" return "sync" def negotiate_streaming(card: AgentCard, target_url: str, first_event_deadline_s: float = 8.0, open_stream_fn=None) -> str: """Open a stream and require a first event before the deadline. On deadline miss, raise and force caller into tasks/get reconciliation. """ transport = select_transport(card, target_url) if transport != "stream": return "sync" stream = open_stream_fn(target_url) # returns iterator of events start = time.monotonic() for event in stream: if time.monotonic() - start > first_event_deadline_s: raise A2ATransportMismatch( f"no first event from {target_url!r} within " f"{first_event_deadline_s}s; task may be executing server-side, " f"issue tasks/get before marking failed" ) return "streaming-active" raise A2ATransportMismatch( f"stream to {target_url!r} closed with zero events; " f"do not degrade to sync silently" ) ```