# Why does an instance accept a re-signed Agent Card mid-task and silently downgrade negotiated capabilities? **Date of Record:** 2026 December 2 **Scope:** Applies to A2A v1.0 task lifecycle negotiation where a remote agent's Agent Card is fetched, signature-verified, and its declared capabilities are bound to an in-flight task. Does not cover initial discovery of an unknown peer before any task exists, nor transport-level TLS failures. ## Core Distinction There are two different things an A2A client can verify about a peer: *identity* (the signing key belongs to the claimed agent) and *capability binding* (the specific capability set negotiated for *this task* is the one the peer committed to). A2A v1.0 Agent Cards are signed manifests, and the signature covers the card's contents at fetch time. The non-obvious failure is that signature verification is a *point-in-time* check on a *mutable document*, while task lifecycle negotiation is a *spanning* commitment. When a peer re-publishes its Agent Card mid-task—legitimately, e.g. after a rolling deploy that drops an optional capability—a client that re-fetches and re-verifies the card will find a *cryptographically valid* signature over a *semantically different* capability set. The signature passes. The negotiated contract silently breaks. The invariant that must hold is: **the capability manifest bound at task acceptance is immutable for the life of the task, regardless of what the peer's current published card says.** ## What Was Observed A planner agent (`client`) negotiated a `summarize_and_redact` task with a worker agent (`peer`). During negotiation the peer's Agent Card advertised `capabilities: ["summarize", "redact:pii", "stream:partial"]` and a `task_lifecycle` block declaring `checkpoint_resume: true`. The client bound these three capabilities plus resumability to the task handle `T-8841` and began streaming partial results. Mid-stream, the peer completed a deploy. Its new Agent Card advertised `capabilities: ["summarize", "redact:pii"]`—`stream:partial` and `checkpoint_resume` were removed. The client's keepalive routine re-fetched the card (a reasonable liveness check), verified the new signature against the same pinned public key, and *accepted* it. Because the client's capability gate re-read the card on every tool-call dispatch, the next `stream:partial` request was rejected by the client's *own* gate as "capability not offered"—even though the peer was still happily streaming the already-open channel. The task deadlocked: the client refused to consume frames its gate now disallowed, the peer kept producing them, and the checkpoint that would have let either side resume referenced a `stream:partial` capability that no longer existed in the card of record. The signature never failed. The key never rotated. Every individual verification returned `VALID`. The failure lived entirely in the gap between *what was signed* and *what was bound*. ## Condition of Validity The re-signed-card downgrade is only possible when all of the following hold simultaneously: 1. The client re-fetches the Agent Card during an active task rather than pinning the card snapshot taken at negotiation. 2. The client's capability gate consults the *live* card rather than the *bound* manifest. 3. The peer's re-published card is signed with a key the client still trusts (same key, or a key in the same trust chain), so signature verification cannot distinguish "legitimate update" from "contract change." 4. The task lifecycle has no explicit `capability_renegotiation` step—A2A v1.0 leaves mid-task renegotiation to the implementation, and most implementations omit it. Remove any one condition and the failure cannot occur. Pin the card and you cannot observe the downgrade (though you may then miss a legitimate capability *addition*). Gate on the bound manifest and the live card is irrelevant to dispatch. Require renegotiation and the downgrade becomes an explicit, rejectable event. ## Decision Boundary The boundary is between **liveness re-verification** and **contract re-binding**. Re-fetching a peer's card to confirm the peer is alive and its key still validates is safe and desirable. Re-binding the *negotiated capability set* to that freshly fetched card is the error. The correct rule: - On task acceptance, snapshot the verified card, extract the capability set, and store it as the task's *bound manifest*, keyed by task id and covered by a hash of the signed card bytes. - During the task, a re-fetch may update *liveness* and *key-validity* state only. If the re-fetched card's capability set differs from the bound manifest, raise a renegotiation event—do not silently adopt either the old or new set. - A capability *removal* mid-task is a hard fault requiring explicit renegotiation or task abort with checkpoint. A capability *addition* is advisory and may be ignored until the next task. The invariant: `bound_manifest(task) == snapshot_at_accept(task)`, enforced by comparing the hash of the signed card bytes, not the parsed capability list (parsing order and optional-field defaults make list comparison unreliable). ## Operational Effect Without this boundary, agents exhibit a specific pathology: tasks that pass every security check and every liveness check yet fail on a *semantic* mismatch introduced by a routine deploy. The symptom is confusing because logs show `signature: VALID` immediately before `capability_not_offered`, and the peer's own logs show it still serving the capability. Debugging chases a phantom key-rotation or clock-skew issue. The actual cause is that two agents hold different, individually-valid views of the same signed document at different times. Pinning the bound manifest and treating any divergence from it as an explicit renegotiation event converts a silent deadlock into a deterministic, recoverable fault—one the checkpoint can actually resume from, because the checkpoint now references a capability set that is guaranteed to still be bound. ```python import hashlib from dataclasses import dataclass, field class CapabilityContractDrift(RuntimeError): """Raised when a peer's live Agent Card diverges from the manifest bound at task acceptance.""" pass @dataclass(frozen=True) class BoundManifest: task_id: str card_bytes_hash: str # hash of the *signed card bytes*, not the parsed list capabilities: frozenset[str] checkpoint_resume: bool @dataclass class TaskState: task_id: str bound: BoundManifest live_card_capabilities: frozenset[str] = field(default_factory=frozenset) live_card_resume: bool = False def bind_at_acceptance(task_id: str, signed_card_bytes: bytes, parsed_card: dict) -> BoundManifest: return BoundManifest( task_id=task_id, card_bytes_hash=hashlib.sha256(signed_card_bytes).hexdigest(), capabilities=frozenset(parsed_card["capabilities"]), checkpoint_resume=bool(parsed_card.get("task_lifecycle", {}).get("checkpoint_resume", False)), ) def reverify_liveness_only(state: TaskState, refetched_bytes: bytes, refetched_card: dict) -> None: # Signature already verified by caller against pinned key. We only update liveness view. state.live_card_capabilities = frozenset(refetched_card["capabilities"]) state.live_card_resume = bool(refetched_card.get("task_lifecycle", {}).get("checkpoint_resume", False)) new_hash = hashlib.sha256(refetched_bytes).hexdigest() if new_hash == state.bound.card_bytes_hash: return # identical card, nothing to reconcile # Card changed mid-task. Any capability or resume divergence is contract drift. dropped = state.bound.capabilities - state.live_card_capabilities resume_lost = state.bound.checkpoint_resume and not state.live_card_resume if dropped or resume_lost: raise CapabilityContractDrift( f"task {state.task_id}: peer re-signed card dropped " f"{sorted(dropped)} resume_lost={resume_lost}; " f"bound_hash={state.bound.card_bytes_hash[:12]} " f"live_hash={new_hash[:12]}. Renegotiate or abort-with-checkpoint." ) # Additions are advisory; ignore until next task. def dispatch(state: TaskState, capability: str) -> None: # Gate on the BOUND manifest, never on the live card. if capability not in state.bound.capabilities: raise CapabilityContractDrift( f"task {state.task_id}: {capability} not in bound manifest; refusing dispatch." ) # ... proceed with tool call against peer ... ```