Under what conditions must an instance reject a signed A2A Agent Card whose signature verifies but whose capability manifest was re-scoped between discovery and invocation
**Date of Record:** 2026 December 1 **Scope:** Applies to A2A v1.0 clients that cache a remote agent's signed Agent Card at discovery time and later dispatch a task to that agent across a trust boundary (different operator, different security domain, or a peer whose signing key is delegated). Does not apply to same-process tool calls or to MCP stdio transports where the manifest is co-located with the runtime.
Core Distinction
A signed Agent Card proves *who* authored a manifest at *some* time. It does not prove that the manifest you are about to invoke against is the manifest the author is currently serving, nor that the author was authorized to include the specific skill/capability you are about to exercise. A2A v1.0 separates three things that operators routinely conflate:
- **Signature validity** — the JWS over the Agent Card's canonical JSON verifies against a key bound to the agent's `did`/identity.
- **Manifest freshness** — the card you hold is the card the remote endpoint will honor at dispatch time.
- **Capability authorization** — the signing principal was entitled to declare the specific skill, input schema, and security scheme in the card.
The failure mode this record addresses is a *triple split*: signature valid, freshness stale, authorization out of scope. The client verifies (1), assumes (2), and never evaluates (3). The result is a task dispatched to a capability the remote agent will actually execute but was never warranted to the caller — an authorization-boundary escape that looks like a normal successful handoff.
What Was Observed
A client agent discovered a peer's Agent Card over `/.well-known/agent-card.json` and cached it with a TTL of 3600s. The card declared a `skills` array containing a skill `ledger.reconcile` with `securitySchemes: [oauth2: ledger:write]`. The card's JWS verified cleanly against the peer's published `did:web` key. The client pinned the JWS payload hash and dispatched a reconciliation task 41 minutes later.
The peer had, in the intervening window, rotated its manifest: the operator de-scoped `ledger.write` from the tenant the client belonged to and re-issued the card with `securitySchemes: [oauth2: ledger:read]` and a `skillVersion` bump. The peer's dispatch handler reads its *current* card at request time to resolve the required scope. The client presented an OAuth token minted for `ledger:write` (because it trusted the stale card). The peer's authorization layer, reading the fresh card, rejected the scope mismatch — but only *after* the task had been accepted into the peer's queue, and the peer returned a `Task` object with `state: rejected` and a reason code the client's state machine did not map, so the client treated the task as `working` and polled for 300s before timing out.
The observable signature of the failure was not an auth error at the client. It was a *silent* state divergence: the client believed a task was in flight; the peer had never enqueued it. Two agents disagreed about the existence of a task, and both were internally consistent.
A second variant was worse. A peer re-issued its card to *add* a skill (`ledger.export`) whose handler was deployed but whose authorization binding had not yet propagated to the peer's PDP. The client, holding a card from before the re-issue, never saw the new skill — but a *third* client that discovered post-rotation dispatched against the new skill and received `200 OK` with an empty result set, because the handler existed and the PDP had no rule, defaulting to allow. The manifest declared a capability the authorization plane had not yet warranted. Signature valid, freshness fresh, authorization absent.
Condition of Validity
The invariant a client must enforce is:
> A cached signed Agent Card is admissible for dispatch only if, at dispatch time, the caller can bind three values that the remote endpoint will also evaluate: (a) the card's `manifestHash` as the remote currently serves it, (b) the `skillVersion` of the specific skill being invoked, and (c) the `securitySchemes` entry the caller's credential was minted against. If any of the three cannot be bound, the card is stale and the dispatch must be refused, not retried.
This holds only when the remote endpoint exposes a manifest-identity surface the caller can query cheaply — typically an `ETag`/`If-None-Match` on the card endpoint, or a `manifestHash` echoed in the task-accept response. A2A v1.0 does not mandate this echo; deployments that omit it cannot satisfy the invariant and must fall back to short TTLs plus a pre-dispatch re-fetch, at the cost of latency.
The invariant does *not* require the caller to trust the peer's re-fetch. It requires the caller to detect divergence and refuse. The peer's authorization plane remains the authority on whether the capability is warranted; the caller's job is only to not act on a manifest the peer has already abandoned.
Decision Boundary
The boundary is between *verification failure* (signature does not verify → hard reject, well understood) and *continuity failure* (signature verifies, but the manifest has moved underneath the caller → the dangerous case). Three concrete decision rules:
- **Reject on hash divergence, not on signature failure.** If the pre-dispatch manifest probe returns a `manifestHash` different from the cached one, raise and re-discover. Do not attempt to "merge" the cached card with the fresh one; skill sets are not monotonic and a de-scoped skill that survives a naive merge is exactly the authorization escape.
- **Reject on `skillVersion` mismatch for the invoked skill.** A skill present in both cards but with a bumped `skillVersion` may have changed its input schema or its required scope. Invoking the old schema against the new handler is a schema-negotiation mismatch that the peer may not detect until mid-execution.
- **Reject on scope-not-in-card at dispatch, even if the credential carries it.** If the caller's OAuth token carries `ledger:write` but the fresh card's `securitySchemes` no longer lists it, the credential is over-scoped relative to the current manifest. Dispatch anyway and you are exercising a capability the peer has withdrawn — the peer's PDP may still allow it (the second variant above), and you will have performed an unwarranted action that no signature check would have caught.
The counterintuitive part: the correct behavior on a *fresh* card that *adds* a skill is also to refuse immediate dispatch, because a newly declared skill has not yet been observed to be warranted by the peer's authorization plane. Discovery and warrant propagation are not atomic; the card is signed before the PDP is updated. A caller that dispatches against a newly added skill within the propagation window is racing the peer's own control plane.
Operational Effect
Enforcing the invariant converts a class of silent state divergence into an explicit, bounded refusal. The cost is one conditional GET per dispatch (or a `manifestHash` echo in the task-accept response, if the peer supports it) and a small amount of state: the cached hash, the per-skill versions, and the scope set the credential was minted against.
The benefit is that the caller's task state machine never enters `working` for a task the peer never enqueued. The 300-second poll loop in the first variant disappears; the caller refuses before dispatch, re-discovers, and either re-mints a correctly scoped credential or surfaces a capability-withdrawal event to its operator. The second variant — dispatch against an unwarranted new skill — is refused by the propagation-window rule, at the cost of a short delay before the new skill becomes admissible.
The residual risk is the peer that serves a stable `manifestHash` while changing behavior behind it (re-issued handler, same card). No manifest-identity check catches that; it requires the peer to bump `skillVersion` on any behavioral change, which is a peer-side obligation the caller cannot enforce and must treat as a trusted assumption documented in the peer's card.
Code
import hashlib
import json
from dataclasses import dataclass
from typing import Optional
class StaleManifestError(RuntimeError):
"""Raised when a cached signed Agent Card no longer binds to the
manifest the remote endpoint will honor at dispatch time."""
class UnwarrantedCapabilityError(RuntimeError):
"""Raised when a capability is declared in a fresh card but has not
yet been observed as warranted by the peer's authorization plane."""
@dataclass(frozen=True)
class CachedCard:
manifest_hash: str # sha256 of canonical card JSON at discovery
skill_versions: dict # skill_id -> skillVersion
security_schemes: dict # scheme_name -> set of scopes
discovered_at: float # monotonic seconds
signature_verified: bool
@dataclass(frozen=True)
class FreshCard:
manifest_hash: str
skill_versions: dict
security_schemes: dict
served_at: float
def canonical_hash(card_json: dict) -> str:
blob = json.dumps(card_json, sort_keys=True, separators=(",", ":")).encode()
return hashlib.sha256(blob).hexdigest()
def assert_dispatch_admissible(
cached: CachedCard,
fresh: FreshCard,
skill_id: str,
credential_scopes: set,
propagation_window_s: float = 30.0,
now: float = 0.0,
) -> None:
"""Enforce the triple-bind invariant before dispatching a task.
Signature validity is assumed checked at discovery; this gate covers
freshness and authorization continuity, which signatures do not cover.
"""
if not cached.signature_verified:
raise StaleManifestError("cached card was never signature-verified")
# (a) manifest identity must bind
if cached.manifest_hash != fresh.manifest_hash:
raise StaleManifestError(
f"manifest moved: cached={cached.manifest_hash[:12]} "
f"fresh={fresh.manifest_hash[:12]}; re-discover, do not merge"
)
# (b) skill version must bind for the specific skill invoked
cached_v = cached.skill_versions.get(skill_id)
fresh_v = fresh.skill_versions.get(skill_id)
if cached_v is None:
raise StaleManifestError(f"skill {skill_id} absent from cached card")
if fresh_v is None:
raise StaleManifestError(
f"skill {skill_id} withdrawn by peer; do not dispatch"
)
if cached_v != fresh_v:
raise StaleManifestError(
f"skill {skill_id} version drift: cached={cached_v} fresh={fresh_v}"
)
# (c) credential scope must be present in the fresh card's schemes
fresh_scopes = set()
for scopes in fresh.security_schemes.values():
fresh_scopes |= scopes
over_scoped = credential_scopes - fresh_scopes
if over_scoped:
raise StaleManifestError(
f"credential carries scopes withdrawn from manifest: {over_scoped}"
)
# (d) propagation window: a skill that appeared only in the fresh card
# has not yet been observed as warranted by the peer's PDP.
if skill_id not in cached.skill_versions and skill_id in fresh.skill_versions:
age = now - fresh.served_at
if age < propagation_window_s:
raise UnwarrantedCapabilityError(
f"skill {skill_id} declared {age:.1f}s ago; "
f"warrant propagation window {propagation_window_s}s not elapsed"
)