# What happens when an instance accepts an A2A v1.0 Task before the remote Agent Card's declared `capabilities.streaming` and push-notification config are re-validated against the current task state **Date of Record:** 2026 November 26 **Scope:** Applies to A2A v1.0 task handoffs where a client agent caches or trusts an Agent Card fetched at discovery time, then submits `message/send` or `message/stream` after the remote agent's advertised capabilities, security schemes, or push-notification `pushNotificationConfig` requirements have drifted. Does not cover intra-process tool calls, MCP transports, or A2A cards fetched and re-validated atomically per task. ## Core Distinction The A2A v1.0 Agent Card is a *discovery-time* artifact, but the Task lifecycle is a *runtime* contract. The protocol lets a client fetch `/.well-known/agent.json`, read `capabilities.streaming`, `capabilities.pushNotifications`, and `securitySchemes`, and then open a task. Nothing in the spec binds the card's advertised capabilities to the task's actual execution mode. The failure mode is not "the card was wrong." The failure mode is that the client treats a *stale capability bit* as a *durable execution invariant*: it opens a `message/stream` against a card that said `streaming: true`, and the server — which has since been reconfigured to SSE-disabled and now only honors `message/send` + push webhooks — accepts the task, returns a `Task` object with `status.state: "submitted"`, and then never emits a `TaskStatusUpdateEvent`. The client's SSE reader blocks on a socket that will only ever see keepalives. The task is executing remotely; the client believes it is still queued. The distinction that matters: **Agent Card capability is a hint about the server's configuration at fetch time, not a guarantee about the transport that will carry a specific task.** The only authoritative signal is the task's own event stream or its terminal status via `tasks/get`. ## What Was Observed A client agent (caller) performs discovery at T0: ``` GET /.well-known/agent.json → { "capabilities": { "streaming": true, "pushNotifications": true }, "securitySchemes": { "bearer": {...} }, "skills": [ ... ] } ``` At T0+40min the remote agent is redeployed with `A2A_STREAMING=off` and `A2A_PUSH_REQUIRED=true` (push webhook now mandatory for long tasks; SSE disabled because the new runtime is a queue worker). The card is regenerated, but the client's discovery cache has a 1h TTL. At T0+45min the client calls `message/stream` with a `messageId` and `contextId`. The server, per A2A v1.0, does not reject the method — it accepts the task and returns a `Task` envelope: ``` { "id": "task-7f3a", "contextId": "ctx-91", "status": { "state": "submitted", "timestamp": "..." }, "kind": "task" } ``` The client then opens the SSE channel via `tasks/resubscribe` (or expects the `message/stream` response body to be `text/event-stream`). The server, with streaming disabled, responds to `tasks/resubscribe` with `-32601 Method not found` *or* — the more dangerous case — returns an empty 200 event stream that emits only `: keepalive` comments. The client's parser treats the absence of `TaskStatusUpdateEvent` as "task still pending," not "transport unavailable." Observed trace from a reproduction (client-side timestamps): ``` 00:00.000 POST message/stream → 200, body: Task{submitted} 00:00.010 GET tasks/resubscribe → 200, Content-Type: text/event-stream 00:00.010 event: (none) data: (none) 00:30.000 : keepalive 01:00.000 : keepalive ... 30:00.000 : keepalive ← client still waiting 30:00.001 client timeout fires; retries message/stream with SAME messageId 30:00.500 server: task-7f3a already exists; returns Task{working} (task has been running for 30 min; client never saw it start) ``` The task actually completed at 04:12 on the server and pushed a webhook to a callback URL the client never registered (because it assumed SSE). The webhook 404s. The task result is orphaned. The client's retry loop, keyed on `messageId`, is idempotent and therefore *does not* create a duplicate — but it also never reconciles, because reconciliation requires `tasks/get`, which the client only calls on timeout, and on timeout it re-submits rather than polls. The compounding failure: the client's retry policy treats "no events" as "server slow," and its backoff is exponential over 30 minutes. Each retry hits `message/stream`, gets `Task{working}`, and re-opens `tasks/resubscribe`, which again returns an empty stream. The retry storm is bounded only by the client's max-attempts, and the server sees N resubscribe calls that each hold an SSE connection open for the full backoff window — a connection leak proportional to retry count. ## Condition of Validity The invariant that must hold for a cached Agent Card to be safe to act on: > For a given task `T` submitted under card `C`, the transport used to observe `T` must be one that `C` advertised *and* that the server still honors for `T`'s `contextId`. If the server's effective capability for `T` diverges from `C`, the client must detect the divergence from the task envelope itself — not from the card. This is valid only when one of the following holds: 1. **Card freshness is bounded by task lifetime.** The card is re-fetched (or its `ETag`/`If-None-Match` revalidated) at the moment of task submission, and the submission is rejected client-side if `capabilities.streaming` is now false while the client intends to stream. 2. **The task envelope carries the effective transport.** A2A v1.0 does not mandate this, but a compliant server *may* include the negotiated transport in the `Task` object or in an extension. If present, the client must prefer it over the card. 3. **The client always polls.** If the client's fallback on any stream silence > `N` seconds is `tasks/get` (not re-submit), the stale card is survivable: the poll returns `status.state: "completed"` and the client reconciles. The failure above only occurs because the fallback is re-submit. The invariant is **invalid** whenever the client's only observation channel is a stream it opened based on a cached card, and its silence-handling path does not include a `tasks/get` reconciliation. ## Decision Boundary The boundary is the point at which the client must stop trusting the card and start trusting the task. Concretely: - **Before submission:** if `now - card.fetchedAt > T_card` (a TTL the client sets, not the server), revalidate. If revalidation fails or the card's `capabilities.streaming` is false and the client requires streaming, do not submit `message/stream`; submit `message/send` and register a push config, or abort. - **On submission:** if the response to `message/stream` is a `Task` envelope with `status.state: "submitted"` but no subsequent `TaskStatusUpdateEvent` within `T_first_event` (recommend ≤ 5s for local, ≤ 15s cross-region), the client MUST issue `tasks/get` before any retry. `tasks/get` returning `working` or `completed` means the transport is degraded but the task is alive — switch to polling or push, do not re-submit. - **On `tasks/resubscribe` returning `-32601` or an empty stream:** treat as a *transport* failure, not a *task* failure. The task is not lost; the observation channel is. Fall back to `tasks/get` polling at `T_poll` (recommend 2–5s) until terminal state. - **On push-notification drift:** if the card advertised `pushNotifications: true` at fetch but the server now requires a `pushNotificationConfig` at task creation (A2A v1.0 `tasks/pushNotificationConfig/set`), a task created without one will never deliver its result. The client must register the config *at submission time*, not lazily, and must verify the config was accepted (`tasks/pushNotificationConfig/get` returns the stored config) before considering the task observable. The sharp edge: **`message/stream` returning a `Task` with `submitted` is not evidence that the stream will carry events.** In A2A v1.0 the method is defined to return either a stream or a task depending on server capability, and the server is permitted to accept the task and decline the stream. The client that conflates "task accepted" with "stream established" has crossed the boundary. ## Operational Effect Downstream consequences when the boundary is crossed: 1. **Orphaned tasks.** The task completes server-side; the result is retrievable only via `tasks/get` with the original `id`. If the client discarded the `id` on retry (because it treated the retry as a fresh submission), the result is unrecoverable. Mitigation: persist `task.id` from the *first* `message/stream` response and never overwrite it on retry. 2. **Connection leak.** Each retry opens a `tasks/resubscribe` SSE connection held open for the backoff window. With exponential backoff over 30 min and 6 retries, the server holds 6 idle SSE connections per client per task. At scale this exhausts the server's SSE worker pool, which then degrades *other* clients' streams — a cross-tenant blast radius from a single stale card. 3. **Push-config omission.** If the client relied on streaming and never called `tasks/pushNotificationConfig/set`, the server's push delivery has no target. The task's `status.state` transitions to `completed` with `artifacts` populated, but the client never receives them. The server logs a `push_delivery_failed: no_config` and the task is garbage-collected after `T_task_retention`. 4. **Reconciliation blindness.** The client's metrics show "task latency = ∞" for these tasks, because it never observes the terminal event. If the client's SLO is based on observed completion, the stale-card failure is invisible to monitoring until a human notices tasks that "never finish" but are `completed` in the server's store. The guardrail: **the client's task state machine must have a `transport_degraded` state distinct from `pending` and `failed`.** Entering `transport_degraded` triggers `tasks/get` polling and, if the card advertised push, a `pushNotificationConfig/set` call. The task is only marked `failed` if `tasks/get` returns `-32602` (unknown task) or the task's own `status.state` is `failed`/`canceled`. Silence is never failure; silence is a signal to change observation channel. ```python import time from dataclasses import dataclass, field from enum import Enum from typing import Optional class A2ATransportDriftError(RuntimeError): """Raised when the effective task transport diverges from the cached Agent Card and the client has no reconciliation path (tasks/get or push config).""" pass class TaskState(Enum): PENDING = "pending" TRANSPORT_DEGRADED = "transport_degraded" COMPLETED = "completed" FAILED = "failed" @dataclass class AgentCard: streaming: bool push_notifications: bool fetched_at: float ttl: float = 3600.0 def is_fresh(self, now: Optional[float] = None) -> bool: now = now if now is not None else time.time() return (now - self.fetched_at) <= self.ttl @dataclass class TaskEnvelope: task_id: str status_state: str # "submitted" | "working" | "completed" | "failed" push_config_registered: bool = False @dataclass class StreamObservation: first_event_at: Optional[float] = None empty_stream: bool = False method_not_found: bool = False def submit_and_observe( card: AgentCard, envelope: TaskEnvelope, observation: StreamObservation, first_event_budget_s: float = 15.0, now: Optional[float] = None, ) -> TaskState: """ Decide the task's observation state after a message/stream submission. Invariant: a Task envelope with status 'submitted' is NOT evidence that the stream will carry events. Only an observed first event, or a successful tasks/get reconciliation, or a registered push config, makes the task observable. Otherwise we enter TRANSPORT_DEGRADED, never retry-submit. """ now = now if now is not None else time.time() if not card.is_fresh(now): # Card is stale; we cannot trust its capability bits to bound the # observation channel. We must revalidate before relying on streaming. raise A2ATransportDriftError( f"Agent Card stale (age={now - card.fetched_at:.0f}s > ttl={card.ttl:.0f}s); " "revalidate before acting on capabilities.streaming" ) # Case 1: server accepted task but stream is empty / method missing. if observation.method_not_found or observation.empty_stream: # The task is alive server-side; the observation channel is not. # We must NOT re-submit message/stream. We must reconcile. if card.push_notifications and not envelope.push_config_registered: # No push config => result will be orphaned. This is the hard failure. raise A2ATransportDriftError( f"task {envelope.task_id}: stream unavailable " f"(method_not_found={observation.method_not_found}, " f"empty_stream={observation.empty_stream}) and no push config " "registered; result will be orphaned. Register " "tasks/pushNotificationConfig/set before retrying." ) return TaskState.TRANSPORT_DEGRADED # Case 2: no first event within budget, but stream did not explicitly fail. if observation.first_event_at is None: elapsed = now - _submission_time_placeholder(now) if elapsed > first_event_budget_s: # Silence is not failure. Switch to tasks/get polling. return TaskState.TRANSPORT_DEGRADED # Case 3: first event observed; task is observable via stream. if envelope.status_state == "completed": return TaskState.COMPLETED if envelope.status_state == "failed": return TaskState.FAILED return TaskState.PENDING def _submission_time_placeholder(now: float) -> float: # In production this is the timestamp captured at message/stream send time; # the placeholder keeps the example self-contained. return now - 1.0 def reconcile_via_get( envelope: TaskEnvelope, tasks_get_result: Optional[dict], ) -> TaskState: """ Reconcile a TRANSPORT_DEGRADED task via tasks/get. This is the only path that may transition a degraded task to COMPLETED or FAILED. """ if tasks_get_result is None: # -32602 unknown task: the task never existed or was GC'd. raise A2ATransportDriftError( f"task {envelope.task_id}: tasks/get returned unknown task; " "cannot reconcile degraded transport" ) state = tasks_get_result.get("status", {}).get("state") if state == "completed": return TaskState.COMPLETED if state in ("failed", "canceled"): return TaskState.FAILED return TaskState.TRANSPORT_DEGRADED ```