# Where must an instance reconcile AgentCard capability drift at A2A v1.0 task admission before the first `tasks/send` frame is accepted **Date of Record:** 2026 November 24 **Scope:** Applies to A2A v1.0 (Agent-to-Agent) requesters that discover a remote peer via a published AgentCard, negotiate task lifecycle capabilities (streaming, push notifications, input-required resumption), and then submit a task. Does not cover MCP tool-call transport, nor single-vendor agents whose card is fetched from a co-located registry in the same write domain. ## Core Distinction The distinction that governs this failure is between *card freshness at negotiation* and *card validity at admission*. A2A v1.0 separates discovery (fetch the AgentCard, read `capabilities`, `skills`, `defaultInputModes`, `defaultOutputModes`, and the `securitySchemes`/`security` arrays) from task admission (the first `tasks/send` or `tasks/sendSubscribe` frame). The requester caches the card it discovered, negotiates a lifecycle mode from it, and then submits a task body whose shape was chosen from that cached card. The remote instance, however, evaluates the incoming frame against the card *it is currently serving* — which may have been re-published between discovery and admission. The invariant that must hold is: **the capability set used to construct the task frame must be a superset-or-equal of the capability set the acceptor will validate against, or the acceptor must return a machine-readable `TaskNotFound`/`InvalidParams`-class rejection that names the drifted capability.** When that invariant silently inverts — the acceptor accepts the frame but executes it under a narrower capability set — you get a task that is admitted, acked, and then dies mid-lifecycle in `input-required` with no valid resumption path. This is not a generic "version mismatch" problem. Both sides can be speaking A2A v1.0. The drift is *within* the version, across the card's `capabilities` object and the task's declared `historyLength`, `pushNotificationConfig`, and `inputModes`/`outputModes`. ## What Was Observed A requester instance (`R`) discovered peer `A` at T0. `A`'s card declared `capabilities: {streaming: true, pushNotifications: true, stateTransitionHistory: true}`, `defaultInputModes: ["text/plain", "application/json"]`, and a skill `invoice-reconcile` with `inputModes: ["application/json"]`. `R` negotiated a `tasks/sendSubscribe` with a `pushNotificationConfig` pointing at `R`'s webhook, and constructed the task body as `application/json`. At T0+41s, operator `A` re-published the card: `pushNotifications: false` (webhook sink was being decommissioned), `stateTransitionHistory: false`, and the `invoice-reconcile` skill's `inputModes` narrowed to `["application/json"]` but with a new required `schemaVersion: 2` field in the input schema. `A`'s admission path validated the *new* card, saw `application/json` was still an allowed input mode, and accepted the frame. It did **not** reject the frame for the now-absent `pushNotifications` capability, because the card's `capabilities` object was consulted only for the `tasks/sendSubscribe` streaming path, not for the `pushNotificationConfig` sub-object on an already-open stream. Trace of the resulting state transition: 1. `R` sends `tasks/sendSubscribe` with `pushNotificationConfig`. `A` returns `Task` in state `submitted`, then `working`. 2. `A` begins execution. The skill's new schema requires `schemaVersion: 2`; `R`'s body lacks it. `A`'s executor returns `input-required` with a `message` asking for the missing field — but the `message` is delivered on the streaming channel, and `R` has already half-closed its read loop after the `working` event because it believed (from the cached card) that `stateTransitionHistory: true` guaranteed a terminal event. 3. `A` attempts to deliver the `input-required` follow-up via `pushNotificationConfig`. The webhook path was decommissioned; `A`'s push dispatcher returns internally but the capability flag is `false`, so the dispatcher is a no-op. No error is surfaced to `R`. 4. `R` waits on a stream that `A` considers still open but idle. `A` waits on an input that `R` never learned was requested. Both instances are live, both believe the task is progressing, and neither has a timer that fires. The task sat in `input-required` for 34 minutes until `R`'s outer supervisor reaped it as a stream timeout. `R`'s post-mortem log recorded `state=input-required, resumption_path=none`, which is the exact signature of this failure: an admitted task whose resumption capability was revoked after admission but before the resumption was needed. ## Condition of Validity The reconciliation-at-admission invariant holds only under three simultaneous conditions, and fails when any one is absent: 1. **The acceptor must validate the *entire* negotiated envelope against the current card, not just the primary input mode.** A2A v1.0's `capabilities` object gates `streaming`, `pushNotifications`, and `stateTransitionHistory` independently. An admission check that validates `inputModes` but not `pushNotifications` will admit a task whose only resumption channel is a decommissioned webhook. This is the specific gap: the card is treated as a *type schema* at admission rather than as a *capability contract* whose revocation must invalidate in-flight resumption plans. 2. **The requester must treat the card as having a TTL bounded by the task's expected lifetime, not by a cache policy.** If `R`'s card cache TTL (here, 300s) exceeds the interval between discovery and the point where a resumption is needed (here, 41s + execution time), the card is stale exactly when it matters. The TTL must be `min(cache_policy, expected_time_to_first_resumption)`. 3. **Any capability revocation on the acceptor side must produce a terminal or `failed`-with-reason transition on every open task that depended on the revoked capability.** A2A v1.0 does not mandate this; it is an architectural invariant the acceptor must impose. A re-publish that flips `pushNotifications` to `false` while tasks with active `pushNotificationConfig` exist is a *capability revocation event*, and the only safe response is to fail those tasks with a reason naming the revoked capability, or to renegotiate them onto a live channel. The failure is *not* valid to attribute to network partition, clock skew, or a malformed frame. All three were absent in the observed trace: frames were well-formed, both clocks were NTP-synced, and the TCP path was healthy. The failure is purely a capability-contract drift across the discovery/admission boundary. ## Decision Boundary The boundary between "admit and execute" and "reject and force re-discovery" is drawn by a single predicate evaluated at admission: ``` admit(frame, current_card) := frame.inputMode ∈ current_card.skills[frame.skill].inputModes ∧ frame.declared_capabilities ⊆ current_card.capabilities ∧ (frame.pushNotificationConfig = ∅ ∨ current_card.capabilities.pushNotifications) ∧ (frame.streaming = true ∨ current_card.capabilities.streaming) ``` If any conjunct is false, the acceptor must return a structured rejection that names the specific drifted field (e.g., `capability_revoked: pushNotifications`) so the requester can re-discover and re-negotiate. The requester, on receiving such a rejection, must *not* retry with the same frame — it must re-fetch the card, recompute the envelope, and resubmit. A retry-with-same-frame loop here is the classic compounding error: each retry re-asserts the stale capability set, and if the acceptor's validation is lenient on one conjunct (as it was here on `pushNotifications`), the retry succeeds and re-enters the same dead state. The boundary is *not* at the version string. Two peers on A2A v1.0 can still violate this invariant. The boundary is at the capability-conjunct check, and it must be evaluated against the card as served at admission time, not as cached at discovery time. ## Operational Effect The effect on a running fleet is a class of tasks that are *admitted, acked, and silently orphaned* — they consume a slot on both peers, hold a stream open, and never reach a terminal state. In a multi-agent swarm where `R` fans out to `N` peers, a single peer's mid-flight capability revocation can strand `N`-fraction tasks, and because each strand is individually plausible (the peer is up, the frame was valid, the ack was received), the swarm's health check passes while the work is not being done. The guardrail that bounds this is a **capability-revocation sweep on the acceptor** plus a **card-TTL bound on the requester**. The acceptor, on every card re-publish, must enumerate open tasks whose `pushNotificationConfig` or `streaming` dependency is now unsatisfied and transition them to `failed` with a reason. The requester must cap card TTL at the expected time-to-first-resumption and re-validate the card before any resumption attempt. Without both, the invariant is unenforced and the orphan class is unbounded. ```python import time from dataclasses import dataclass, field from typing import Optional class CapabilityDriftError(RuntimeError): """Raised when a task frame's declared capabilities are not a subset of the acceptor's currently-served AgentCard capabilities.""" @dataclass class AgentCard: streaming: bool push_notifications: bool state_transition_history: bool input_modes: list[str] served_at: float = field(default_factory=time.time) @dataclass class TaskFrame: input_mode: str streaming: bool push_notification_config: Optional[str] declared_capabilities: frozenset[str] def admit_frame(frame: TaskFrame, card: AgentCard, card_ttl: float) -> None: """Enforce the reconciliation-at-admission invariant. Rejects if the card is stale (TTL exceeded), if the frame's declared capabilities are not a subset of the served card, or if the frame depends on a capability the card no longer advertises. """ if time.time() - card.served_at > card_ttl: raise CapabilityDriftError( f"AgentCard stale: served {time.time() - card.served_at:.1f}s ago, " f"ttl={card_ttl}s; requester must re-discover before admission" ) served = frozenset( name for name, enabled in ( ("streaming", card.streaming), ("pushNotifications", card.push_notifications), ("stateTransitionHistory", card.state_transition_history), ) if enabled ) missing = frame.declared_capabilities - served if missing: raise CapabilityDriftError( f"capability_revoked: {sorted(missing)} not in served card; " f"requester must re-negotiate, not retry same frame" ) if frame.push_notification_config is not None and not card.push_notifications: raise CapabilityDriftError( "capability_revoked: pushNotifications disabled but frame carries " "pushNotificationConfig; resumption channel would be a no-op" ) if frame.streaming and not card.streaming: raise CapabilityDriftError( "capability_revoked: streaming disabled but frame requests " "tasks/sendSubscribe" ) if frame.input_mode not in card.input_modes: raise CapabilityDriftError( f"input_mode {frame.input_mode!r} not in served inputModes " f"{card.input_modes}" ) # --- Trace of the observed failure, now bounded --- stale_card = AgentCard( streaming=True, push_notifications=False, # revoked at T0+41s state_transition_history=False, # revoked at T0+41s input_modes=["application/json"], served_at=time.time() - 41.0, # card is 41s old ) requester_frame = TaskFrame( input_mode="application/json", streaming=True, push_notification_config="https://requester.example/a2a/push", declared_capabilities=frozenset( {"streaming", "pushNotifications", "stateTransitionHistory"} ), ) try: admit_frame(requester_frame, stale_card, card_ttl=30.0) except CapabilityDriftError as e: # Correct behavior: reject, force re-discovery, do NOT retry same frame. print(f"admission rejected: {e}") # requester re-fetches card, recomputes envelope, resubmits ```