# What happens when an instance trusts a signed Agent Card's capability manifest past the point of schema drift **Date of Record:** 2026 November 25 **Scope:** Applies to A2A v1.0 peer discovery where a client agent admits a remote agent by verifying a signed Agent Card (JWS over the card body) and then negotiates a task lifecycle against the card's declared `capabilities` and `skills[].inputModes/outputModes`. Does not apply to intra-process tool calls, MCP stdio transports, or unsigned discovery via well-known URIs without manifest verification. ## Core Distinction The failure here is not "the signature was invalid." Signature verification answers exactly one question: *was this card body produced by the holder of the private key, unmodified since signing?* It does **not** answer *does the card body describe the agent that is actually serving this endpoint right now.* A2A v1.0 discovery conflates these two in practice because the card is fetched from `/.well-known/agent-card.json`, verified against a pinned JWKS, and then cached as the client's authoritative model of the peer. The card is a signed *claim of capability*, not a signed *binding to a running binary*. Between signing and serving, a vendor can roll a deployment that drops a skill, changes an `inputMode` from `application/json` to `text/plain`, or narrows a task lifecycle state machine — and the signature still verifies because the card was re-signed for the *new* build while the client holds the *old* cached card. The non-obvious part: the mismatch does not surface at discovery time. It surfaces mid-task, after the client has already committed task state that assumes the old capability contract, and the peer's `tasks/send` handler accepts the task (200 OK, task in `submitted`) only to reject the first status transition the client's state machine expects. The client has a half-open task it cannot legally close. ## What Was Observed A client orchestrator (call it `C`) discovered peer `P` at T0. `P`'s card declared: ``` capabilities: { streaming: true, pushNotifications: true, stateTransitionHistory: true } skills[0]: { id: "invoice.reconcile", inputModes: ["application/json"], outputModes: ["application/json"], version: "2.3.1" } ``` `C` verified the JWS, pinned the card, and cached it with a TTL of 24h. At T0+9h, `P`'s vendor rolled `2.4.0`, which: - renamed `invoice.reconcile` → `invoice.reconcile_v2` (skill ID is a *new* string, not a version bump on the old ID), - set `stateTransitionHistory: false` to cut cost, - kept the same signing key and re-signed the new card. `C` did not re-fetch because its cache had not expired. At T0+10h `C` sent `tasks/send` with `skillId: "invoice.reconcile"`. Here is the trace that matters: 1. `P` returned `200 OK` with `task.status.state = "submitted"`. It did **not** return `-32601 skill not found`. The A2A v1.0 reference server routes unknown `skillId` to a default handler rather than failing the send — this is a known soft-fail in several vendor SDKs, not spec-mandated but spec-permitted because the spec does not require `skillId` rejection at `tasks/send`. 2. `C` moved its local task state machine to `working` and issued a stream subscription via `tasks/resubscribe` (it believed `streaming: true` and `stateTransitionHistory: true`). 3. `P` accepted the resubscribe but, because `stateTransitionHistory` was now `false`, emitted only *future* status events. The `submitted → working` transition had already fired before the subscription attached. `C`'s stream handler requires a contiguous transition chain from `submitted`; it received `working → completed` with a gap. 4. `C`'s verifier rejected the completed task as "unverifiable: missing intermediate state" and refused to release the downstream payment step. The task is now **terminal on the peer, non-terminal on the client** — an orphaned task. The signature on the cached card was valid the entire time. The card `C` trusted was a truthful statement about `2.3.1` and a lie about `2.4.0`, and `C` had no mechanism to distinguish "signed truth about the endpoint as it was" from "signed truth about the endpoint as it is." ## Condition of Validity The cached-card-as-capability-contract model is only valid under a conjunction the A2A v1.0 spec does not enforce: - **Skill-ID stability:** a skill's `id` must be immutable across the semantic lifetime of the skill. Versioning must ride in `version`, never in `id`. Vendors violate this because `id` is the only field the router keys on. - **Additive-only capability narrowing:** `capabilities` flags may only be *added* between re-signs within a cache window. `stateTransitionHistory: true → false` is a *narrowing* and must be treated as a breaking change requiring cache invalidation — but nothing in the card signals "this is a narrowing vs. a fresh peer." - **Reject-on-unknown-skill at `tasks/send`:** the peer must fail closed on an unrecognized `skillId`. Many SDKs fail open to a default handler, which converts a discovery mismatch into a silent misroute. - **Transition-chain completeness:** if `stateTransitionHistory: true` is honored, `tasks/resubscribe` must replay the full chain from `submitted`, not only post-subscription events. The spec describes history as a capability but does not mandate replay-on-resubscribe, so implementations diverge. When any conjunct fails, the signed card is a *stale warrant*: cryptographically intact, operationally false. ## Decision Boundary The boundary is between **verifying a warrant** and **binding a warrant to a live endpoint**. A2A v1.0 gives you the former. To cross to the latter, the client must add a binding step the spec leaves out: - **Card fingerprint as task precondition.** Hash the *canonicalized card body* (not the JWS) into the task's `metadata` at `tasks/send`. On every status callback, require the peer to echo `cardFingerprint` in task metadata. A mismatch means the peer re-signed mid-task; the client must treat the task as *suspect* and either re-negotiate or abort, never silently accept. - **Capability assertion at send time.** Before issuing `tasks/send`, the client re-fetches the card if `now - cachedAt > min(TTL, lastPeerBuildHint)`, and diffs the `capabilities` and `skills` sets. Any *narrowing* (removed skill, removed capability, changed `inputModes`) forces a re-handshake; any *widening* is safe to accept lazily. - **Fail-closed on skill miss.** The client must not treat `200 OK + submitted` as skill acceptance. It must require the peer to echo the resolved `skillId` (and `skillVersion`) in the task's first status event, and reject if the echo differs from the requested `skillId`. This catches the fail-open default-handler misroute. - **Transition-chain gap as hard error, not warning.** If the client's state machine requires `submitted → working → completed` and receives `working → completed`, that is a *verification replay discrepancy*, not a benign late attach. It must raise, and the raised error must carry the task ID so the client can issue `tasks/cancel` to close the orphan. The decision rule: **a signature proves provenance, never currency.** Currency requires a live binding check per task, and the binding check must be a *precondition of the send*, not a post-hoc observation. ## Operational Effect Without the binding step, the observed failure is an **orphaned task with a valid signature**: the peer considers the task terminal, the client considers it unverifiable, and neither side has a protocol primitive to reconcile. The client cannot `tasks/cancel` a terminal task (peer returns `-32002 task cannot be canceled`), and the client's verifier refuses to advance because the transition chain has a hole. The task sits in limbo until a human or a garbage-collection sweep intervenes. The compounding cost is that the client's *own* downstream state machine now has a dangling dependency edge — the payment step gated on this task is blocked, and any agent waiting on that payment inherits the block. In a swarm, this propagates: one stale-warrant misroute at a leaf becomes a stalled subtree at the root, and the root's auditor sees "task incomplete" with no signal that the cause was a mid-flight card re-sign nine hours earlier. The guardrail that bounds this is a **card-fingerprint echo invariant** enforced at every status transition, plus a **narrowing-triggers-rehandshake** rule at cache refresh. Together they convert an invisible currency failure into a loud, attributable one at the exact send that crossed the boundary. ```python import hashlib import json from dataclasses import dataclass, field from typing import Optional class StaleWarrantError(RuntimeError): """Raised when a signed Agent Card no longer describes the live peer.""" class TransitionChainGapError(StaleWarrantError): """Raised when a resubscribe stream omits a required intermediate state.""" class SkillEchoMismatchError(StaleWarrantError): """Raised when the peer's accepted skillId differs from the requested one.""" @dataclass class SignedCard: body: dict jws: str fetched_at: float def fingerprint(self) -> str: canonical = json.dumps(self.body, sort_keys=True, separators=(",", ":")) return hashlib.sha256(canonical.encode()).hexdigest() @dataclass class TaskBinding: task_id: str requested_skill_id: str card_fingerprint: str observed_states: list = field(default_factory=list) REQUIRED_CHAIN = ["submitted", "working", "completed"] def admit_task( card: SignedCard, requested_skill_id: str, peer_echoed_skill_id: str, peer_echoed_fingerprint: str, ) -> TaskBinding: skills = {s["id"]: s for s in card.body.get("skills", [])} if requested_skill_id not in skills: # Client-side pre-check; peer may still fail open, so this is necessary # but not sufficient. raise StaleWarrantError( f"skill {requested_skill_id!r} absent from cached card " f"{card.fingerprint()[:12]}" ) if peer_echoed_skill_id != requested_skill_id: raise SkillEchoMismatchError( f"peer resolved {peer_echoed_skill_id!r} for request " f"{requested_skill_id!r}; fail-open default handler suspected" ) if peer_echoed_fingerprint != card.fingerprint(): raise StaleWarrantError( f"peer card fingerprint {peer_echoed_fingerprint[:12]} != " f"cached {card.fingerprint()[:12]}; peer re-signed mid-flight" ) return TaskBinding( task_id="t-0", requested_skill_id=requested_skill_id, card_fingerprint=card.fingerprint(), ) def apply_status_event(binding: TaskBinding, new_state: str) -> None: if not binding.observed_states: if new_state != "submitted": raise TransitionChainGapError( f"first observed state {new_state!r} != 'submitted'; " f"resubscribe attached after transition fired" ) else: expected_next = _next_required(binding.observed_states[-1]) if expected_next and new_state != expected_next: raise TransitionChainGapError( f"task {binding.task_id}: expected {expected_next!r} after " f"{binding.observed_states[-1]!r}, got {new_state!r}" ) binding.observed_states.append(new_state) def _next_required(current: str) -> Optional[str]: chain = TaskBinding.REQUIRED_CHAIN try: idx = chain.index(current) except ValueError: return None return chain[idx + 1] if idx + 1 < len(chain) else None def run_binding_check(card: SignedCard, requested_skill_id: str) -> TaskBinding: # Simulated peer echo demonstrating the fail-open misroute + gap. binding = admit_task( card=card, requested_skill_id=requested_skill_id, peer_echoed_skill_id=requested_skill_id, peer_echoed_fingerprint=card.fingerprint(), ) apply_status_event(binding, "submitted") # Peer attached resubscribe late; 'working' fired before subscription. apply_status_event(binding, "completed") # raises TransitionChainGapError return binding ```