# Where must an instance reject an A2A Agent Card whose `capabilities.streaming` claim disagrees with the transport it was discovered over, before the delegation envelope is signed? **Date of Record:** 2026 November 30 **Scope:** Applies to A2A v1.0 cross-org delegation where the delegating agent (caller) resolves a remote peer's Agent Card via `.well-known/agent-card.json`, then constructs a signed task envelope. Does not cover intra-org cards resolved from a trusted registry cache, nor A2A pre-1.0 cards without the `capabilities` block. ## Core Distinction The Agent Card is a *claim*, not a *capability probe*. A2A v1.0 separates the discovery document (`/.well-known/agent-card.json`, a static JSON blob) from the transport binding that actually serves `message/send` and `message/stream`. The card advertises `capabilities.streaming: true` and a `preferredTransport` (e.g. `"HTTP+JSON"` or `"JSONRPC"`), plus `additionalInterfaces[]` listing alternate endpoints. The failure mode is not "the peer lied." It is that **the caller signs a delegation envelope whose `acceptedOutputModes` and expected response shape are derived from the card's streaming claim, while the endpoint actually resolved from `additionalInterfaces` is a unary-only JSONRPC binding.** The card is internally consistent; the *resolution* of which interface to hit is where the invariant breaks. The non-obvious boundary: `preferredTransport` and `additionalInterfaces` are advisory ordering hints, not a routing contract. A2A v1.0 does not require that the interface selected for a given task support every capability the card globally advertises. A peer may advertise streaming on its primary interface and expose a unary fallback in `additionalInterfaces` for cross-org callers behind its egress proxy. If the caller picks the fallback interface (because the primary timed out during discovery, or because an egress allowlist only permits the fallback host), the card's `capabilities.streaming: true` is *still true for the agent*, but *false for the resolved interface*. Signing an envelope that requests `message/stream` against that interface produces a deterministic 404/`MethodNotFound` after the envelope is already signed and the task ID allocated — an orphaned task on the remote side and a caller stuck in a half-open state. ## What Was Observed Trace of a cross-org delegation that failed at the interface/capability join: 1. Caller fetches `https://peer.example/.well-known/agent-card.json`. Card validates against the v1.0 schema. Fields present: `capabilities.streaming: true`, `capabilities.pushNotifications: false`, `preferredTransport: "HTTP+JSON"`, `additionalInterfaces: [{url: "https://peer-egress.example/a2a", transport: "JSONRPC"}]`. 2. Caller's egress allowlist permits only `peer-egress.example`. The `preferredTransport` host (`peer.example`) is not resolvable from the caller's network segment. Interface selection falls through to `additionalInterfaces[0]`. 3. Caller constructs the delegation envelope. Because `capabilities.streaming: true`, it sets `configuration.blocking: false` and expects an SSE stream on the response. It signs the envelope with its org warrant (JWS over the canonical envelope bytes, `kid` bound to caller's A2A identity). 4. Envelope POSTed to `https://peer-egress.example/a2a` with `method: "message/stream"`. The egress proxy fronts a unary-only JSONRPC worker. Response: `{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found"}}`. 5. The remote worker had already allocated a `taskId` and persisted the inbound envelope before dispatching to the method handler (standard A2A server behavior: task record is created on envelope acceptance, method dispatch is downstream). The task sits in `submitted` state with no worker bound to it. 6. Caller sees `-32601`, marks the delegation failed, and issues no `tasks/cancel` (it never received a task handle in a success frame). The orphaned `submitted` task on the peer expires only on its own TTL sweeper. The signed envelope was cryptographically valid, the card was schema-valid, the interface was reachable. The failure is a **capability/transport join violation**: the caller treated an agent-scoped capability claim as an interface-scoped guarantee. ## Condition of Validity The invariant that must hold before signing: > For every interface `i` in `{preferredTransport} ∪ additionalInterfaces`, the effective capability set of `i` is `card.capabilities ∩ interfaceCapabilities(i)`. A delegation envelope requesting method `m` may be signed only if `m` is in the effective capability set of the *specific interface* selected for dispatch — not the card-global set. A2A v1.0 does not carry per-interface capability declarations. `additionalInterfaces[]` entries carry `url` and `transport` only. Therefore the caller cannot *derive* per-interface capabilities from the card; it can only *probe* them. The condition of validity is that the caller performs a `capabilities/get` (or a cheap `message/send` with a no-op payload) against the resolved interface and caches the result keyed by `(peer_origin, interface_url, card_etag)`. If the card has no `etag`/`lastModified` and no probe has been performed within the caller's cache TTL, the envelope must not be signed against a non-preferred interface. This condition does not apply when: (a) the resolved interface equals `preferredTransport`'s host, since the card's claims are scoped to the primary binding by convention; or (b) the caller's egress path can reach `preferredTransport` directly, making fallback unnecessary. ## Decision Boundary The decision the caller must make at interface-selection time: - **If** the selected interface is `preferredTransport` → trust card-global capabilities. Sign. - **If** the selected interface is an `additionalInterfaces` entry **and** the requested method is in `{message/send, tasks/get, tasks/cancel}` (unary, universally required by A2A core) → trust. Sign. - **If** the selected interface is an `additionalInterfaces` entry **and** the requested method is `message/stream` or depends on `capabilities.streaming`, `capabilities.pushNotifications`, or any extension URI → **do not trust**. Probe first. If probe unavailable, degrade the request to unary `message/send` with `configuration.blocking: true`, or refuse to sign and surface a structured `InterfaceCapabilityUnverified` error to the orchestrator. - **If** the card has no `additionalInterfaces` and the sole interface is unreachable → refuse. Do not silently fall back to a cached card from a prior session; stale cards are the second-order version of this failure. The boundary is sharp: unary core methods are safe on any declared interface; streaming, push, and extension-gated methods are safe only on the interface whose capabilities were probed or whose identity matches `preferredTransport`. ## Operational Effect Without this boundary, cross-org delegation produces orphaned remote tasks and half-signed envelopes at a rate proportional to the fraction of peers that publish a unary egress fallback — which is most enterprises with an egress proxy. The caller's failure is silent at the protocol layer (it's a valid JSONRPC error) and expensive at the orchestration layer (task ID consumed, retry budget burned, peer's TTL sweeper load inflated). The guardrail is a pre-sign capability probe keyed to the resolved interface, plus a hard refusal to sign streaming-dependent envelopes against unprobed fallback interfaces. The probe is cheap (one round-trip, cacheable against the card etag) and converts a class of silent half-open failures into a single structured pre-sign rejection the orchestrator can route around. ```python from __future__ import annotations from dataclasses import dataclass from typing import Optional class InterfaceCapabilityUnverified(RuntimeError): """Raised when a delegation envelope would be signed against an A2A interface whose capabilities were never probed and which is not the card's preferredTransport. Signing here risks an orphaned remote task and a half-open caller state on method-not-found.""" CORE_UNARY_METHODS = frozenset({"message/send", "tasks/get", "tasks/cancel"}) STREAMING_DEPENDENT = frozenset({"message/stream"}) @dataclass(frozen=True) class AgentCard: preferred_transport_host: str capabilities_streaming: bool capabilities_push: bool additional_interface_hosts: tuple[str, ...] etag: Optional[str] @dataclass(frozen=True) class ResolvedInterface: host: str transport: str def guard_sign( card: AgentCard, interface: ResolvedInterface, method: str, probed_capabilities: Optional[frozenset[str]], ) -> None: """Enforce the capability/transport join before signing a delegation envelope. Raises InterfaceCapabilityUnverified if the invariant fails.""" is_preferred = interface.host == card.preferred_transport_host is_core_unary = method in CORE_UNARY_METHODS needs_streaming = method in STREAMING_DEPENDENT or ( method.startswith("ext/") and card.capabilities_streaming ) if is_preferred: return if is_core_unary: return if probed_capabilities is None: raise InterfaceCapabilityUnverified( f"refusing to sign method={method!r} against non-preferred " f"interface host={interface.host!r} (transport={interface.transport!r}): " f"no capability probe cached for (host, card.etag={card.etag!r}). " f"Either probe capabilities/get on this interface, degrade to " f"message/send with blocking=true, or route via preferredTransport." ) if needs_streaming and "streaming" not in probed_capabilities: raise InterfaceCapabilityUnverified( f"interface host={interface.host!r} probed capabilities=" f"{sorted(probed_capabilities)!r} do not include 'streaming', but " f"card advertises capabilities.streaming={card.capabilities_streaming}. " f"Card-global claim does not bind to this interface; refusing to sign " f"method={method!r}." ) def sign_envelope(card: AgentCard, interface: ResolvedInterface, method: str, probed: Optional[frozenset[str]]) -> bytes: guard_sign(card, interface, method, probed) # ... canonicalize envelope, JWS-sign with org warrant ... return b"" ```