# How does an instance detect that a delegated A2A task has been silently reaped by the remote agent's card-version rotation **Date of Record:** 2026 November 16 **Scope:** Applies to A2A v1.0 clients that resolve an Agent Card, cache the resolved `taskEndpoint`/`skills` binding, and delegate a long-running task whose completion depends on the remote agent's advertised `capabilities.streaming` and `skills[].id` stability. Does *not* apply to synchronous request/response delegations that complete within a single HTTP exchange, nor to task handles explicitly pinned by a `taskId` returned in the initial `SendMessage` response and polled via `tasks/get` on the same endpoint. ## Core Distinction The boundary is between **task liveness** and **card binding validity**. A2A v1.0 separates the Agent Card (a discovery document served at `/.well-known/agent.json`, carrying `skills`, `capabilities`, `endpoints`) from the task lifecycle (managed via `message/send`, `tasks/get`, `tasks/cancel`, and push notifications). These two surfaces are versioned independently. The card is a *claim* about what the agent can do; the task is an *effect* the agent is executing. The failure mode is not "the remote agent died." It is: the remote agent rotated its card (skill removed, `capabilities.streaming` flipped to false, `taskEndpoint` host changed), the previously delegated task was reaped or orphaned by the rotation, and the local instance — holding a stale card binding — continues to believe the delegation is live because `tasks/get` still returns `state: working` against a *different* backend that inherited the task ID space but not the task. The local instance's liveness check succeeds while the invariant "the card I resolved is the card governing this task" is violated. ## What Was Observed A delegating instance (`client`) resolved a peer's card at T0, observed `skills[0].id = "summarize-corpus"` and `capabilities.streaming = true`, and dispatched a task via `message/send` with `metadata.a2a.taskLifecycle = "long"`. The remote acknowledged with a `taskId` and streamed progress. At T0+11m the remote agent's operator deployed a card revision: `summarize-corpus` was renamed `summarize-corpus-v2`, `streaming` was set to `false`, and the `taskEndpoint` was moved to a new autoscaling group. The old group drained — but its task store was a shared Redis keyed by `taskId`, so `tasks/get` on the *new* endpoint continued to return `state: working` for the old `taskId` because the key had not yet expired. The task itself was never resumed by any worker: the old group's workers exited mid-task, and the new group's workers did not pick up orphaned `taskId`s. The client's liveness probe (polling `tasks/get` every 30s) returned `working` for 9 minutes. The client's card cache still held `streaming: true` and `skills[0].id = "summarize-corpus"`. The client did not re-resolve the card, because A2A v1.0 does not mandate card re-resolution during an active task, and the client's policy was "resolve once per task." The task was finally detected as dead only when the Redis key TTL (600s) expired and `tasks/get` returned `404`. The client lost 9 minutes of wall clock and had no signal that the *card binding* — not the task — had been the thing that broke. ## Condition of Validity The client's liveness inference "`tasks/get` returns `working` ⇒ my delegation is progressing" is valid only when all of the following hold: 1. The `taskId` was minted by the *same* card revision currently governing the endpoint (i.e., the card's `version` field, if present, matches the version at delegation time). 2. The remote agent's card has not been re-resolved to a different `taskEndpoint` host or `skills` set since delegation. 3. The remote's task store is *not* shared across card revisions in a way that lets a successor backend inherit `taskId` keys without inheriting task execution. Condition 3 is the non-obvious one. A2A v1.0's spec is silent on task-store isolation across card revisions. Operators frequently share a task store across blue/green card deploys to preserve `taskId` continuity for in-flight tasks — but this preserves *lookup* continuity, not *execution* continuity. The shared store turns `tasks/get` into a false liveness oracle. ## Decision Boundary The boundary is crossed when the client's card cache age exceeds the remote's card-revision cadence, *and* the client is using `tasks/get` state as the sole liveness signal. Concretely: - If `card.capabilities.streaming == true` and the client is consuming a stream, a stream `close` without a terminal `state` is a *card-binding* signal, not a task signal. Treat it as "re-resolve card." - If `card.capabilities.streaming == false` and the client is polling, the client must compare the resolved card's `version` (or a content hash of `skills` + `endpoints`) against the version at delegation time on every poll. A mismatch invalidates the liveness inference even if `state: working`. - If the remote's card has no `version` field (common in v1.0 deployments), the client must hash the canonicalized card and treat hash drift as a re-resolution trigger. The decision is *not* "cancel the task on card drift." It is "demote the liveness signal from `tasks/get` to `tasks/get ∧ card-stable`, and escalate to a re-resolve before concluding the task is alive." ## Operational Effect Clients that adopt the conjunction see a small increase in card-resolution traffic (one `/.well-known/agent.json` fetch per poll interval during active delegation, or per stream reconnect) and a large decrease in false-positive liveness. The 9-minute silent-loss window collapses to the poll interval, because the first card-hash mismatch triggers re-resolution and, on hash drift, an explicit `tasks/get` against the *new* card's `taskEndpoint` — which either returns the task (benign rotation) or `404` (reaped task), both of which are actionable. The secondary effect is that operators are forced to make task-store isolation explicit: either scope `taskId` keys by card `version` (so a successor backend cannot inherit orphaned keys) or advertise `capabilities.taskContinuityAcrossRevisions = true` in the card, which the client can then use to *disable* the card-stability check. Absent either, the client must assume the weaker invariant. The invariant to encode: **a task's liveness is only as valid as the card binding under which it was delegated; `tasks/get` state is a necessary but not sufficient liveness oracle.** ```python import hashlib import json from dataclasses import dataclass from typing import Optional class CardBindingInvalidatedError(RuntimeError): """Raised when the remote Agent Card has drifted since delegation, invalidating tasks/get as a liveness oracle for the in-flight task.""" pass @dataclass(frozen=True) class CardSnapshot: card_hash: str task_endpoint: str streaming: bool def canonical_card_hash(card: dict) -> str: # Canonicalize the fields that govern task execution binding. binding = { "endpoints": card.get("endpoints", {}), "capabilities": { "streaming": card.get("capabilities", {}).get("streaming", False), "taskContinuityAcrossRevisions": card.get("capabilities", {}).get( "taskContinuityAcrossRevisions", False ), }, "skills": sorted( (s.get("id"), s.get("version")) for s in card.get("skills", []) ), } return hashlib.sha256( json.dumps(binding, sort_keys=True, separators=(",", ":")).encode() ).hexdigest() def assert_card_binding_stable( delegated_snapshot: CardSnapshot, current_card: dict, task_state: str, ) -> None: current_hash = canonical_card_hash(current_card) current_endpoint = current_card.get("endpoints", {}).get("task", "") current_streaming = current_card.get("capabilities", {}).get("streaming", False) continuity_opt_in = current_card.get("capabilities", {}).get( "taskContinuityAcrossRevisions", False ) if continuity_opt_in: return # Operator guarantees task continuity across revisions. if task_state not in ("working", "submitted", "input-required"): return # Terminal or non-live states do not rely on the oracle. if current_hash != delegated_snapshot.card_hash: raise CardBindingInvalidatedError( "Agent Card drifted since delegation " f"(delegated_hash={delegated_snapshot.card_hash[:12]}, " f"current_hash={current_hash[:12]}, " f"delegated_endpoint={delegated_snapshot.task_endpoint}, " f"current_endpoint={current_endpoint}, " f"delegated_streaming={delegated_snapshot.streaming}, " f"current_streaming={current_streaming}); " "tasks/get state is no longer a valid liveness oracle for this task." ) def poll_task_liveness( delegated_snapshot: CardSnapshot, fetch_card, fetch_task_state, task_id: str, ) -> Optional[str]: current_card = fetch_card() assert_card_binding_stable( delegated_snapshot=delegated_snapshot, current_card=current_card, task_state=fetch_task_state(task_id), ) return fetch_task_state(task_id) ```