# When must an instance reject a discovered A2A agent card rather than negotiate against it: the `signatureJws`-vs-`capabilities` skew boundary in cross-org task lifecycle negotiation **Date of Record:** 2026 November 28 **Scope:** Applies to A2A v1.0 peer discovery and `message/send` / `tasks/get` lifecycle negotiation between agents owned by different organizational trust domains, where agent cards are fetched over the network and cached. Does not apply to intra-org A2A where both peers share a signing authority and a single card registry, nor to non-A2A transports (raw MCP, plain HTTP tool calls). ## Core Distinction The distinction that matters is between a card that is **cryptographically valid but semantically stale** and a card that is **semantically plausible but cryptographically unanchored**. A2A v1.0 agent cards carry two independent truth-bearing layers: the signed envelope (`signatures[].protected` + `signatureJws`, binding the card bytes to a JWK published at `/.well-known/jwks.json` on the origin) and the declared operational surface (`capabilities`, `skills[].id`, `defaultInputModes`, `defaultOutputModes`, `securitySchemes`). Implementations routinely conflate "the signature verified" with "the card is safe to negotiate against." The signature only proves *who asserted* the capability set and *that the bytes were not mutated in transit*. It proves nothing about whether the asserting party's runtime currently honors that set. The dangerous boundary is the window where the signed card advertises a capability or skill that the remote runtime has since revoked, downgraded, or gated behind a security scheme the caller cannot satisfy — and the caller, having verified the JWS, proceeds into a task lifecycle that will strand mid-flight. The non-obvious part: signature verification *increases* the failure blast radius. An unsigned or self-asserted card invites suspicion and conservative probing. A correctly signed card with a stale `capabilities.streaming: true` or a `skills[]` entry whose handler was removed in the remote's last deploy is *more* likely to be trusted blindly, because the integrity check passes and the caller's guardrail logic short-circuits. Integrity ≠ liveness ≠ authorization. ## What Was Observed A cross-org research-orchestrator agent (`orch`, org A) discovered a data-enrichment agent (`enrich`, org B) via a registry entry pointing at `https://enrich.b.example/.well-known/agent.json`. The fetched card was signed, `signatureJws` verified against B's JWKS, and declared: - `capabilities`: `{ "streaming": true, "pushNotifications": true, "stateTransitionHistory": true }` - `skills`: `[ { "id": "enrich.v2", "inputModes": ["application/json"], "outputModes": ["application/json"] } ]` - `securitySchemes`: `{ "oauth2": { ... scopes: ["enrich:read", "enrich:write"] } }` `orch` verified the JWS, cached the card with a 24h TTL, and issued `message/send` with `configuration: { "blocking": false }` expecting streaming SSE updates via `tasks/resubscribe`. The remote accepted the task (`state: submitted`), then transitioned to `working`, then emitted **no further events**. `orch`'s resubscribe loop received a `404` on the task's event stream because org B had, three hours prior, disabled streaming for the `enrich.v2` skill behind a feature flag while keeping `capabilities.streaming: true` in the *signed* card — the card is regenerated by a nightly job, not on capability change, so the signature remained valid over stale content. Compounding failure: `orch` attempted a fallback `tasks/get` poll. The remote returned `state: working` indefinitely (a stuck worker after the flag flip), and because the card advertised `stateTransitionHistory: true`, `orch`'s supervisor assumed it could reconstruct progress from `tasks/get` history — but history was empty for tasks created post-flag-flip, since the history writer was part of the disabled streaming path. After `orch`'s 900s task deadline, it issued `tasks/cancel`; the remote returned `409 Conflict` because the task had already been reaped by B's janitor at 600s with no terminal event ever delivered. The task was neither completed, failed, nor cancelable from A's perspective — a **zombie task** with divergent lifecycle state across the two orgs. ## Condition of Validity The invariant that must hold for safe negotiation is: **a caller may enter `message/send` against a discovered card only if the card's declared capabilities are corroborated by a liveness probe whose result is bound to the same task-lifecycle epoch the caller will use.** Concretely, three conditions must all hold before the first `message/send`: 1. **Freshness bound to signature, not to fetch time.** The card must carry a signed `expires` or a monotonically increasing `revision` inside the signed envelope. A verified JWS over a card with no signed expiry is an unbounded trust grant and MUST be treated as `max_age = 0` (probe every time). 2. **Capability corroboration.** For each capability the caller *depends on* (`streaming`, `pushNotifications`, `stateTransitionHistory`), the caller must have observed the capability working in a probe within the current epoch — e.g., a `message/send` probe task that actually yields a stream event before the real task is submitted. Advertising a capability is a claim; only an observed event is evidence. 3. **Terminal-state agreement.** The caller must have a bounded, agreed-upon terminal-state contract: either the card declares a `taskTimeout` inside the signed envelope, or the caller must treat any task exceeding its own deadline as `failed` locally and refuse to poll a remote that cannot confirm `canceled`. Divergent terminal states (remote reaped, caller still `working`) violate the invariant. If any condition fails, the correct action is not "negotiate more carefully" — it is to **reject the card and fail closed**, because the lifecycle state machine has no shared epoch to reason over. ## Decision Boundary ``` signature verifies? / \ no yes | | REJECT (unanchored) signed expiry present? / \ no yes | | treat max_age=0 within expiry AND probe each call capability corroborated | | corroborated? ------> yes --> NEGOTIATE | no | REJECT (stale-capability skew) ``` The boundary is sharp at the "signature verifies but no signed expiry" node. This is the trap: the implementation feels secure (JWS passed) and skips the probe, then negotiates against a card whose `capabilities` may be arbitrarily old. A card with `expires` in the signed envelope and a passing corroboration probe is safe; a card missing either is not, regardless of how clean the JWS looks. The decision must be made *before* `message/send`, because once a task is submitted the caller has entered a lifecycle it may not be able to exit (the `409` on cancel above). ## Operational Effect Enforcing the boundary changes three behaviors. First, discovery becomes a two-phase operation: fetch-and-verify, then probe-and-corroborate; the card cache key must include the signed `revision`, not just the URL, so a nightly-regenerated card with unchanged bytes but a bumped revision invalidates correctly. Second, the caller's task supervisor must own a local terminal-state authority: any task exceeding the caller's deadline is marked `failed_local` and the remote task is abandoned (best-effort `tasks/cancel`, no blocking wait), preventing zombie tasks from consuming supervisor slots. Third, the remote's inability to confirm `canceled` must be recorded as a *capability violation* against that card's revision, feeding back into the corroboration cache so subsequent tasks against the same revision refuse streaming-dependent skills until a probe passes. The cost is one extra probe round-trip per epoch per depended-upon capability; the benefit is that signature verification stops being mistaken for a liveness or authorization guarantee, and cross-org task lifecycles terminate in a state both parties can name. ```python import time from dataclasses import dataclass, field from typing import Optional class CardNegotiationError(RuntimeError): """Raised when a discovered A2A card must be rejected before message/send.""" pass @dataclass class SignedCard: agent_url: str revision: int signed_expires: Optional[float] # epoch seconds, inside signed envelope capabilities: dict # e.g. {"streaming": True, ...} jws_verified: bool @dataclass class CorroborationCache: # key: (agent_url, revision, capability) -> epoch seconds last observed working observed: dict = field(default_factory=dict) def record(self, url: str, rev: int, cap: str, now: float) -> None: self.observed[(url, rev, cap)] = now def fresh(self, url: str, rev: int, cap: str, now: float, max_age: float) -> bool: ts = self.observed.get((url, rev, cap)) return ts is not None and (now - ts) <= max_age REQUIRED_CAPS = ("streaming", "stateTransitionHistory") PROBE_MAX_AGE = 300.0 CLOCK_SKEW = 30.0 def admit_card( card: SignedCard, cache: CorroborationCache, now: Optional[float] = None, ) -> None: """Gate entry to message/send. Raises CardNegotiationError on any violation.""" now = time.time() if now is None else now if not card.jws_verified: raise CardNegotiationError( f"card at {card.agent_url} rev={card.revision} JWS unverified; " "refusing to negotiate against unanchored capability claims" ) if card.signed_expires is None: # No signed expiry => unbounded trust grant => force per-call probe, # which we cannot satisfy here, so fail closed. raise CardNegotiationError( f"card at {card.agent_url} rev={card.revision} has no signed expiry; " "treating as max_age=0 is unsafe without a live probe, rejecting" ) if now > card.signed_expires + CLOCK_SKEW: raise CardNegotiationError( f"card at {card.agent_url} rev={card.revision} expired at " f"{card.signed_expires:.0f}, now {now:.0f}" ) for cap in REQUIRED_CAPS: if not card.capabilities.get(cap, False): raise CardNegotiationError( f"card at {card.agent_url} rev={card.revision} does not advertise " f"required capability {cap!r}" ) if not cache.fresh(card.agent_url, card.revision, cap, now, PROBE_MAX_AGE): raise CardNegotiationError( f"capability {cap!r} on {card.agent_url} rev={card.revision} " "advertised but not corroborated within probe window; " "signature proves assertion, not liveness" ) # admitted: caller may now issue message/send against this exact revision def submit_task(card: SignedCard, cache: CorroborationCache, payload: dict) -> str: admit_card(card, cache) # fail-closed gate before lifecycle entry # ... actual message/send omitted ... return "task-id" ```