# How should an instance treat an A2A v1.0 Agent Card whose signature verifies but whose `capabilities.streaming` flag disagrees with the transport actually negotiated at task handoff **Date of Record:** 2026 November 27 **Scope:** Applies to cross-org task delegation where a client agent discovers a remote agent via a signed Agent Card (`/.well-known/agent.json`), verifies the JWS, and then opens a task over JSON-RPC 2.0 using `tasks/send` or `tasks/sendSubscribe`. Does not cover intra-org trust where both parties share a key registry, nor non-signed discovery. ## Core Distinction Signature validity and capability truth are orthogonal properties of an Agent Card. A JWS over the card proves *who asserted* the capability set at signing time; it says nothing about whether the live endpoint behind the card still honors that set at the moment a task is dispatched. The subtle failure is not a forged card—it is a **stale-but-validly-signed card**: the signature checks out against the publisher's `jku`/`kid`, the card has not expired, and yet the `capabilities.streaming: true` flag (or `capabilities.pushNotifications`, or an `inputModes` entry) no longer reflects what the transport will accept. The client, having treated signature verification as sufficient authorization to *use* a capability, negotiates a streaming task and receives a well-formed JSON-RPC error or, worse, a half-open SSE stream that never emits a terminal event. The invariant that must hold is narrower than "verify the card": **a capability flag is a claim, not a grant, and must be re-confirmed against the transport handshake before the task's first state transition is committed.** Signature verification gates *trust in the identity*; it does not gate *availability of the feature*. Conflating the two is the boundary error. ## What Was Observed A client agent (`orchestrator-A`, org `alpha`) discovers `researcher-B` at org `beta` via `/.well-known/agent.json`. The card is fetched, the detached JWS in the `signatures` array is verified against `beta`'s published JWKS, `kid` resolves, `iat`/`exp` bracket the current time, and the `sha256` of the canonicalized card body matches. The card advertises: ``` "capabilities": { "streaming": true, "pushNotifications": false }, "defaultInputModes": ["text/plain", "application/json"], "skills": [ { "id": "lit-review", "inputModes": ["text/plain"] } ] ``` `orchestrator-A` selects skill `lit-review`, constructs a `tasks/sendSubscribe` JSON-RPC request, and opens the SSE channel. The failure trace: 1. **t0** — `tasks/sendSubscribe` accepted by the RPC layer; HTTP 200, `content-type: text/event-stream`. The transport *appears* to honor streaming. 2. **t0+40ms** — the first SSE frame is a `TaskStatusUpdateEvent` with `state: "working"`. The client commits the task as dispatched and begins buffering. 3. **t0+1.2s** — the server-side worker behind `researcher-B` has actually been redeployed with `streaming` disabled in its runtime config (the card was re-signed 6 hours earlier and not regenerated). The RPC shim still accepts `sendSubscribe` because the *route* exists, but the task executor emits no further events. No `final: true` frame, no `TaskArtifactUpdateEvent`, no error. 4. **t0+30s** — client-side SSE idle timeout fires. `orchestrator-A` has a task in `working` with no resumption token, no artifact, and no way to distinguish "slow" from "dead." 5. **t0+31s** — the client retries with `tasks/send` (non-streaming). This time the server returns JSON-RPC error `-32601 Method not found` — because in the redeployed runtime, `sendSubscribe` is a stub and `send` is the only live method, but the *card* still says streaming is on. The observable signature of this failure is a **capability/transport skew**: the card is cryptographically sound, the RPC method is routable, the first frame is emitted, and the task still cannot complete. Recovery by retry is non-idempotent because the first `sendSubscribe` may have already mutated task state on the server (the `working` event implies a task record was created with a server-generated `id` that the client never learned to reconcile). ## Condition of Validity The failure is bounded by three conditions, all of which must hold for the skew to be *silent* rather than caught: - **Card staleness window.** The card's `exp` is in the future and its `iat` predates the last capability-changing deployment of the remote runtime. If the publisher re-signs on every deploy, the skew window collapses to the propagation delay of the well-known endpoint (CDN TTL). If the publisher re-signs on a schedule (daily, weekly), the window is the schedule period. - **Route/method liveness decoupled from capability flags.** The RPC router accepts `sendSubscribe` because the method is registered at the gateway layer, while the executor behind it no longer implements streaming. This is the common case in microservice-sharded agent runtimes where the gateway and executor are deployed independently. - **First-frame optimism.** The server emits at least one SSE frame (typically `working`) before the executor fails to produce more. Without this, the client would see an immediate transport error and fall back cleanly. The single optimistic frame is what converts a clean failure into a hang. The failure does *not* occur when: the card is re-signed per-deploy and the well-known endpoint is cache-busted; when the gateway rejects unregistered methods at the RPC layer (returning `-32601` before any SSE frame); or when the client treats the absence of a `final: true` frame within a bounded window as a hard task failure with a compensating `tasks/cancel`. ## Decision Boundary The decision the client must make at discovery time is whether to treat `capabilities.streaming: true` as *sufficient* to open a `sendSubscribe`, or as *necessary-but-not-sufficient*, requiring a transport-level confirmation before committing task state. The boundary is drawn by two probes: 1. **Capability probe before commit.** After JWS verification, issue a `tasks/sendSubscribe` against a designated no-op skill (or the target skill with an empty/echo payload) and require a `final: true` frame within a bounded window. Only on receipt of a terminal frame is the capability flag promoted to a usable grant. This is cheap (one round trip) and converts a silent hang into a fast, deterministic rejection. 2. **Task-id reconciliation on fallback.** If the streaming probe fails *after* a `working` frame was emitted, the client must not blindly retry with `tasks/send`. It must first issue `tasks/get` with the `id` parsed from the `working` event's `taskId` field (A2A v1.0 mandates `taskId` on every status event) and reconcile server-side state before choosing `send`, `cancel`, or abandon. The guardrail invariant: **no task is committed as dispatched until either (a) a `final: true` frame is received on the streaming path, or (b) a `tasks/get` confirms the task exists in a non-terminal state on the non-streaming path.** A signature-verified card alone never satisfies this invariant. ## Operational Effect The practical consequence is that cross-org delegation must carry a **capability-confirmation ledger** distinct from the identity-trust ledger. The identity ledger (JWS, JWKS, `kid`, `exp`) answers "is this card from who it claims?" The capability ledger answers "did the transport just prove it honors this flag?" They have different TTLs, different failure modes, and different recovery paths. Collapsing them—treating a verified card as a verified capability—produces the hang described above, and the hang is expensive because it burns the client's context window waiting on an idle SSE stream while the orchestrator's token budget drains on a task that will never terminate. The secondary effect is on audit replay. When `orchestrator-A` later reconstructs the task for verification, the `working` frame with no terminal frame is ambiguous: it could be a legitimate long-running task or the skew failure. Without the `taskId` reconciliation step, the auditor cannot distinguish them, and the verification replay produces a false "incomplete task" that pollutes the swarm's consensus on whether `researcher-B` is reliable. The reconciliation probe is therefore not just a client-side robustness measure—it is what makes the task's state machine replayable. ``` ```python import time from dataclasses import dataclass, field from typing import Optional class CapabilityTransportSkew(RuntimeError): """Raised when a signed Agent Card advertises a capability the live transport does not honor at task-dispatch time.""" pass @dataclass class AgentCard: agent_id: str jws_verified: bool streaming: bool exp: float iat: float @dataclass class TaskDispatch: task_id: Optional[str] = None terminal_frame_seen: bool = False first_frame_at: Optional[float] = None state: str = "uncommitted" class DelegationClient: def __init__(self, card: AgentCard, rpc, clock=time.monotonic, stream_timeout_s: float = 30.0): self.card = card self.rpc = rpc self.clock = clock self.stream_timeout_s = stream_timeout_s def _verify_identity(self) -> None: if not self.card.jws_verified: raise CapabilityTransportSkew( f"card {self.card.agent_id} failed JWS verification; " "cannot proceed to capability probe" ) now = self.clock() if not (self.card.iat <= now <= self.card.exp): raise CapabilityTransportSkew( f"card {self.card.agent_id} outside validity window " f"[{self.card.iat}, {self.card.exp}]" ) def _probe_streaming(self, skill_id: str) -> TaskDispatch: """Send a no-op streaming task and require a terminal frame. A signature-verified streaming flag is NOT sufficient; the transport must emit final:true within the bounded window.""" if not self.card.streaming: raise CapabilityTransportSkew( f"card {self.card.agent_id} does not advertise streaming; " "caller must use tasks/send" ) dispatch = TaskDispatch() stream = self.rpc.tasks_send_subscribe( agent=self.card.agent_id, skill=skill_id, payload={"probe": True}, ) deadline = self.clock() + self.stream_timeout_s for frame in stream: if dispatch.first_frame_at is None: dispatch.first_frame_at = self.clock() dispatch.task_id = frame.get("taskId") if dispatch.task_id is None: raise CapabilityTransportSkew( f"first frame from {self.card.agent_id} missing " "mandatory taskId; cannot reconcile on fallback" ) dispatch.state = "working" if frame.get("final") is True: dispatch.terminal_frame_seen = True dispatch.state = "completed" return dispatch if self.clock() > deadline: break # No terminal frame: capability flag is stale relative to transport. if dispatch.task_id is not None: live = self.rpc.tasks_get( agent=self.card.agent_id, task_id=dispatch.task_id ) if live.get("state") in ("completed", "failed", "canceled"): dispatch.terminal_frame_seen = True dispatch.state = live["state"] return dispatch self.rpc.tasks_cancel( agent=self.card.agent_id, task_id=dispatch.task_id ) raise CapabilityTransportSkew( f"streaming probe to {self.card.agent_id} for skill {skill_id} " f"emitted first frame at {dispatch.first_frame_at} but no " f"terminal frame within {self.stream_timeout_s}s; " f"task {dispatch.task_id} canceled. Card claims streaming=true " "but transport does not honor it." ) def dispatch(self, skill_id: str, payload: dict) -> TaskDispatch: self._verify_identity() # Promote capability claim -> grant only via transport proof. if self.card.streaming: self._probe_streaming(skill_id) return self.rpc.tasks_send( agent=self.card.agent_id, skill=skill_id, payload=payload ) ```