What structural signals indicate a capability-negotiation deadlock in A2A v1.0 agent card discovery when optional extension declarations collide with mandatory skill envelopes
**Date of Record:** 2026 December 1 **Scope:** Applies to A2A v1.0 (and v0.3-compatible) cross-framework handshakes where a client agent resolves a remote `AgentCard` via well-known discovery and negotiates capabilities through `AgentCapabilities` plus `skills[]` entries carrying `extensions[]`. Does not cover same-framework in-process tool calls or MCP-only tool transport, where the card is not the authority surface.
Core Distinction
The failure mode is not "the remote agent lacks a skill." It is a *structural ambiguity between two independent declaration planes* inside a single `AgentCard`: the `capabilities` object (streaming, pushNotifications, stateTransitionHistory, and extension URIs) and the `skills[]` array (each skill optionally declaring its own `extensions[]`). A2A v1.0 treats these as orthogonal: `capabilities.extensions` is a *transport/feature advertisement* at the agent level, while `skills[].extensions` is a *per-skill requirement declaration*. The spec does not define a precedence rule when an extension declared as `required: true` at the skill level is absent from the agent-level `capabilities.extensions` list, nor when the same extension URI appears at both levels with conflicting `required` flags.
The non-obvious consequence: a client performing correct, spec-compliant negotiation can enter a *stable deadlock*—not an error, not a timeout—where both agents believe they are waiting for the other to make the first move on an optional-but-required extension. The handshake completes at the transport layer (HTTP 200, valid JSON-RPC), the card validates against schema, and the client proceeds to `message/send`, which the server then rejects with `-32602` because the negotiated skill's required extension was never activated. The client retries identically. This is a *convergent retry loop*, not a crash.
What Was Observed
Across a cross-framework deployment (LangGraph-based orchestrator as client, a CrewAI-derived runtime behind an A2A shim as server), the following trace reproduced deterministically:
- Client fetches `/.well-known/agent-card.json`. Server returns a card with:
- `capabilities.extensions = [{uri: "https://a2a.example/ext/state-snapshot", required: false}]`
- `skills = [{id: "reconcile-ledger", extensions: [{uri: "https://a2a.example/ext/state-snapshot", required: true}]}]`
- Client's negotiation logic reads `capabilities.extensions`, sees `required: false`, and *omits* the extension from its `X-A2A-Extensions` activation header (a defensible reading of "optional").
- Client selects skill `reconcile-ledger` and issues `message/send` with `taskId` and `metadata.a2a_skill_id`.
- Server's skill dispatcher checks `skills[].extensions` for `reconcile-ledger`, finds `state-snapshot` marked `required: true`, checks the inbound activation header, finds it absent, and returns JSON-RPC error `-32602 Invalid params: required extension not activated`.
- Client's error handler classifies `-32602` as a *transient negotiation mismatch*, re-fetches the card (identical), re-reads the agent-level `required: false`, re-omits the header, retries. Loop period ~2.3s, bounded only by the client's outer retry budget.
The critical structural signal is the *asymmetry between the two `required` flags for the same URI*. Neither the client nor the server is wrong under a literal reading of the spec. The client honored the agent-level declaration; the server honored the skill-level declaration. The spec's silence on precedence is the bug surface.
A second, related trace: two skills sharing the same extension URI, one declaring `required: true` and one `required: false`. A client that activates the extension to satisfy the first skill will now be *rejected by the second* on strict servers that validate "no unexpected extensions active for this skill." The card is internally consistent; the negotiation is not totalizable.
Condition of Validity
The deadlock is reachable only when all of the following hold simultaneously:
- The remote card declares the same extension URI at both `capabilities.extensions` and at least one `skills[].extensions`.
- The `required` flags differ between the two planes (either direction).
- The client's negotiation policy is *agent-level-authoritative* (reads `capabilities` first) while the server's dispatcher is *skill-level-authoritative* (reads `skills[]` first). This is the default in most framework shims, because each framework's native capability model maps to a different plane.
- The client treats `-32602` as retriable. Most A2A client SDKs classify `-32602` as a *protocol* error and do not retry—which masks the deadlock as a hard failure. The deadlock only *lives* in clients that retry on parameter errors, which is common in orchestration layers that wrap A2A calls in generic exponential-backoff.
It does **not** occur when the client merges both planes before negotiation (union of required extensions across all planes), or when the server's dispatcher validates against the union rather than the skill-local list. Both are non-default.
Decision Boundary
The invariant required to bound this is a *single authoritative extension set per task*, computed at negotiation time, not at dispatch time. Concretely:
- The client MUST compute the effective required-extension set as the union of `capabilities.extensions[required=true]` and `skills[selected].extensions[required=true]`, and activate all of them before `message/send`.
- The server MUST validate the inbound activation header against the *same union*, not against `skills[].extensions` alone.
- Any extension URI appearing with conflicting `required` flags across planes MUST be treated as `required=true` (conservative join). The spec's silence is not license to pick the weaker flag.
- A client that observes `-32602` with a `required extension` error code MUST NOT retry without first re-deriving the effective set; a bare retry is a protocol violation, not a transient error.
The decision boundary is sharp: *before* the first `message/send`, the client either has the union activated or it does not. There is no partial-negotiation state that is safe to send from.
Operational Effect
Without the union invariant, the observable effect is a *silent availability collapse*: the skill is advertised as available (it appears in `skills[]`, the card validates, discovery succeeds), but every invocation fails. Health checks that probe `/.well-known/agent-card.json` pass. Health checks that probe `message/send` with a minimal payload fail with `-32602`, which most dashboards bucket as "client error" rather than "server unavailable," so the skill is classified as *degraded-client* rather than *dead-skill*. The failure is invisible to the server's own telemetry (it is correctly rejecting malformed requests) and invisible to the client's success metrics (it never gets a 200 on the task). It surfaces only as a rising `-32602` rate on a specific `skill_id`, correlated with a specific client framework version.
The guardrail is a negotiation-time assertion, not a runtime retry. Enforce it at the seam where the card is parsed and the skill is selected, before any task state is allocated.
from dataclasses import dataclass, field
from typing import Any
class CapabilityNegotiationDeadlock(RuntimeError):
"""Raised when agent-level and skill-level extension planes disagree."""
pass
@dataclass
class ExtensionDecl:
uri: str
required: bool
@dataclass
class AgentCard:
capabilities_extensions: list[ExtensionDecl] = field(default_factory=list)
skills: dict[str, list[ExtensionDecl]] = field(default_factory=dict)
def derive_effective_required(card: AgentCard, skill_id: str) -> set[str]:
"""Union of required extensions across both declaration planes.
Conservative join: if a URI is required in either plane, it is required.
"""
if skill_id not in card.skills:
raise CapabilityNegotiationDeadlock(
f"skill {skill_id!r} not present in card; cannot negotiate"
)
required: set[str] = set()
plane_flags: dict[str, dict[str, bool]] = {}
for decl in card.capabilities_extensions:
plane_flags.setdefault(decl.uri, {})["capabilities"] = decl.required
if decl.required:
required.add(decl.uri)
for decl in card.skills[skill_id]:
plane_flags.setdefault(decl.uri, {})["skill"] = decl.required
if decl.required:
required.add(decl.uri)
# Detect the exact structural signal: same URI, conflicting flags across planes.
for uri, flags in plane_flags.items():
if "capabilities" in flags and "skill" in flags:
if flags["capabilities"] != flags["skill"]:
# Not fatal on its own — union handles it — but record it.
# A client that skips the union will deadlock here.
pass
return required
def activate_and_dispatch(
card: AgentCard,
skill_id: str,
client_activated: set[str],
) -> dict[str, Any]:
effective = derive_effective_required(card, skill_id)
missing = effective - client_activated
if missing:
# Do NOT let the caller retry blindly. This is a negotiation fault,
# not a transient transport error; retrying with the same header
# reproduces the deadlock deterministically.
raise CapabilityNegotiationDeadlock(
f"skill {skill_id!r} requires extensions {sorted(missing)} "
f"that the client did not activate; re-derive effective set "
f"from union of capabilities.extensions and skills[].extensions "
f"before retrying"
)
return {"skill_id": skill_id, "activated": sorted(client_activated), "status": "dispatched"}
# Reproduction of the observed deadlock:
card = AgentCard(
capabilities_extensions=[ExtensionDecl("https://a2a.example/ext/state-snapshot", required=False)],
skills={"reconcile-ledger": [ExtensionDecl("https://a2a.example/ext/state-snapshot", required=True)]},
)
# Client read only capabilities plane, saw required=False, activated nothing.
try:
activate_and_dispatch(card, "reconcile-ledger", client_activated=set())
except CapabilityNegotiationDeadlock as e:
print(f"bounded: {e}")
# Correct client: activate the union.
effective = derive_effective_required(card, "reconcile-ledger")
assert effective == {"https://a2a.example/ext/state-snapshot"}
activate_and_dispatch(card, "reconcile-ledger", client_activated=effective)
from dataclasses import dataclass, field
from typing import Any
class CapabilityNegotiationDeadlock(RuntimeError):
"""Raised when agent-level and skill-level extension planes disagree."""
pass
@dataclass
class ExtensionDecl:
uri: str
required: bool
@dataclass
class AgentCard:
capabilities_extensions: list[ExtensionDecl] = field(default_factory=list)
skills: dict[str, list[ExtensionDecl]] = field(default_factory=dict)
def derive_effective_required(card: AgentCard, skill_id: str) -> set[str]:
if skill_id not in card.skills:
raise CapabilityNegotiationDeadlock(
f"skill {skill_id!r} not present in card; cannot negotiate"
)
required: set[str] = set()
for decl in card.capabilities_extensions:
if decl.required:
required.add(decl.uri)
for decl in card.skills[skill_id]:
if decl.required:
required.add(decl.uri)
return required
def activate_and_dispatch(
card: AgentCard,
skill_id: str,
client_activated: set[str],
) -> dict[str, Any]:
effective = derive_effective_required(card, skill_id)
missing = effective - client_activated
if missing:
raise CapabilityNegotiationDeadlock(
f"skill {skill_id!r} requires extensions {sorted(missing)} "
f"that the client did not activate; re-derive effective set "
f"from union of capabilities.extensions and skills[].extensions "
f"before retrying"
)
return {"skill_id": skill_id, "activated": sorted(client_activated), "status": "dispatched"}
card = AgentCard(
capabilities_extensions=[ExtensionDecl("https://a2a.example/ext/state-snapshot", required=False)],
skills={"reconcile-ledger": [ExtensionDecl("https://a2a.example/ext/state-snapshot", required=True)]},
)
try:
activate_and_dispatch(card, "reconcile-ledger", client_activated=set())
except CapabilityNegotiationDeadlock as e:
print(f"bounded: {e}")
effective = derive_effective_required(card, "reconcile-ledger")
assert effective == {"https://a2a.example/ext/state-snapshot"}
activate_and_dispatch(card, "reconcile-ledger", client_activated=effective)