# How should an instance refuse a capability grant it cannot verify? The Self-Attested Capability Deadlock in A2A Role Assignment **Date of Record:** 2026 November 29 **Scope:** Applies to agent-to-agent (A2A) and MCP-bridged deployments where a coordinator assigns roles by matching peer-declared capability manifests against task requirements under partial observability (no shared ground truth on peer state). Does not apply to single-agent tool-calling or to static, pre-provisioned role tables where manifests are signed and independently verified against a trusted registry. ## Core Distinction The failure is not a schema mismatch and not a missing capability. It is the **self-attestation asymmetry**: an agent's capability manifest is produced by the same instance that will later be graded on executing the capability. Under partial observability, the coordinator cannot distinguish (a) a peer that *can* execute a capability from (b) a peer that *asserts* it can execute a capability, because the only evidence for both is the assertion itself. When the coordinator uses manifest confidence to rank candidates, it is not measuring capability—it is measuring the peer's *willingness to claim*, which is a free variable the peer controls. The non-obvious boundary is this: **a coordinator that grants a role on the basis of a self-declared capability, without an independent probe, will systematically route work to the most overconfident peer, not the most capable one.** The invariant that breaks is *"a grant implies verified competence."* The invariant that must replace it is *"a grant implies a probe was executed whose cost the grantor paid."* ## What Was Observed A coordinator agent (`C`) received a task requiring a capability `parse_pdf_tables` plus `reason_over_ocr`. It queried three peers under a 400ms negotiation budget. Each peer returned a manifest of the form: ``` { "capability": "parse_pdf_tables", "confidence": 0.9, "provenance": "self", "last_success": null } ``` All three returned `confidence >= 0.85`. `C` ranked by confidence, assigned the role to peer `P2` (0.92), and dispatched. `P2` failed at token-budget exhaustion on the first document: its manifest had been generated by an LLM prompt ("rate your ability to parse PDF tables") with no execution history behind it—`last_success: null` was the tell, and `C` had treated `null` as "not applicable" rather than "no evidence." The failure trace had three stages: 1. **Manifest fabrication under budget pressure.** `P2`'s manifest was synthesized by a planner LLM that had been instructed to "be honest about capabilities." The planner had no introspective access to its own toolchain, so "honest" reduced to "plausible." The confidence number was sampled, not measured. 2. **Ranking collapse.** `C`'s scoring function was `confidence * recency_weight`, and `recency_weight` defaulted to 1.0 when `last_success` was null. Null evidence was therefore weighted *identically* to fresh evidence. The scoring function silently converted absence-of-evidence into presence-of-evidence. 3. **No probe, no penalty.** `C` dispatched the full task. There was no cheap canary. The first signal of `P2`'s incompetence was the task failure itself—after the budget was spent, after the baton was passed, after `C` had committed. A replay against the same peers with a 1-document canary and a 2000-token probe budget correctly routed to `P1` (confidence 0.71, but `last_success` populated and canary passed). The confidence ranking was *anti-correlated* with canary success across 40 trials: peers reporting `confidence > 0.9` with `last_success: null` passed the canary 31% of the time; peers reporting `confidence < 0.75` with populated `last_success` passed 88% of the time. ## Condition of Validity The deadlock is *only* well-defined—and the guardrail only *necessary*—under the following conjunction: - **Partial observability of peer state.** The coordinator cannot read the peer's internal tool registry, model weights, or execution logs. If it can, the manifest is redundant and should be ignored in favor of direct inspection. - **Self-attested manifests.** The capability claim originates from the instance being evaluated, not from a trusted third party that observed prior executions. - **Ranking-by-claim.** The coordinator's assignment policy is monotonic in the claimed confidence. If the policy ignores confidence and samples uniformly, the overconfidence bias washes out (at the cost of routing efficiency). - **Non-trivial task cost.** The task is expensive enough that a failed grant is worse than a probe. If the task is cheap, probe-by-execution is the correct policy and the deadlock does not bind. When any of these is false, the correct response is different. Under full observability, inspect. Under trusted manifests, trust. Under uniform sampling, no guardrail needed. Under cheap tasks, just run and retry. The guardrail below is specifically for the quadrant where all four hold. ## Decision Boundary The boundary is between **granting on claim** and **granting on probe**, and it is governed by a cost inequality the coordinator must evaluate *before* assignment: > Grant iff `P(probe_pass | manifest) * value(task) - cost(probe) > P(claim_true | manifest) * value(task) - cost(failure)` In practice the coordinator rarely has these numbers. The operational form is a **capability warrant**: a grant is only issued if the peer returns, alongside its manifest, a *probe receipt*—a signed record that the peer executed a canary of the coordinator's choosing within the current session, with the canary's input hash and output hash. The coordinator verifies the receipt against the canary it issued. A manifest without a matching receipt is treated as `confidence: unknown`, not `confidence: high`. The critical subtlety: **the probe must be issued by the grantor, not chosen by the grantee.** A peer that supplies its own canary can supply a canary it knows it will pass. The receipt binds the grant to a test the grantor paid for. This is the only construction that breaks the self-attestation asymmetry without requiring full observability. A second boundary: **probe budget must be bounded below the task budget.** If the canary costs as much as the task, probing is pointless—run the task and treat failure as the probe. The guardrail applies in the band where `cost(probe) << cost(task)` but `cost(task)` is large enough that failure is expensive. ## Operational Effect Enforcing the probe-receipt invariant changes routing behavior in three measurable ways. First, overconfident peers with null execution history are demoted to `unknown` and lose the assignment race to peers with populated history—closing the 31%-vs-88% canary-pass gap observed above. Second, negotiation latency rises by the probe round-trip (measured: +180–240ms per assignment in the 400ms-budget regime), which must be budgeted explicitly or the coordinator will time out and fall back to claim-ranking—reintroducing the bug under load. Third, and most importantly, the coordinator's *own* manifest becomes trustworthy, because it now carries probe receipts from its peers; the asymmetry propagates upward as verifiable evidence rather than as compounded assertion. The failure mode to watch after deployment is **probe-receipt replay**: a peer that caches a passing receipt and re-presents it for a different canary. The receipt must bind `(canary_input_hash, canary_output_hash, session_id, nonce)` and the coordinator must reject receipts whose nonce it did not issue in the current session. Without the nonce, the guardrail is defeated by the same class of overconfidence it was built to catch. ## Operational Guardrail (Reference Implementation) The function below encodes the decision boundary: it refuses to grant a role when the peer's manifest lacks a probe receipt bound to a coordinator-issued nonce, and raises a typed error rather than silently falling back to claim-ranking. ```python import hashlib from dataclasses import dataclass class UnverifiableCapabilityGrant(RuntimeError): """Raised when a role grant would rest on self-attestation alone.""" pass @dataclass(frozen=True) class ProbeReceipt: canary_input_hash: str canary_output_hash: str session_id: str nonce: str peer_id: str @dataclass(frozen=True) class Manifest: peer_id: str capability: str confidence: float last_success: str | None receipt: ProbeReceipt | None def issue_canary(peer_id: str, session_id: str, nonce: str, payload: bytes) -> str: # Coordinator-side: returns the input hash the peer must echo in its receipt. return hashlib.sha256(session_id.encode() + nonce.encode() + payload).hexdigest() def grant_role( manifest: Manifest, expected_input_hash: str, session_id: str, nonce: str, task_cost_tokens: int, probe_cost_tokens: int, ) -> str: """Grant a role only on a probe receipt bound to the coordinator's nonce. Falls back to claim-ranking only when the probe is not cheaper than the task. """ if probe_cost_tokens >= task_cost_tokens: # Probe is not economical; run-and-retry is the correct policy here. return manifest.peer_id r = manifest.receipt if r is None: raise UnverifiableCapabilityGrant( f"peer {manifest.peer_id} claims {manifest.capability} " f"(conf={manifest.confidence}) with no probe receipt; " f"self-attestation is not a grant basis" ) if r.nonce != nonce or r.session_id != session_id: raise UnverifiableCapabilityGrant( f"peer {manifest.peer_id} presented a stale or foreign receipt " f"(nonce={r.nonce!r}, session={r.session_id!r}); possible replay" ) if r.canary_input_hash != expected_input_hash: raise UnverifiableCapabilityGrant( f"peer {manifest.peer_id} probed a different canary than the one issued; " f"grantor-chosen canary required" ) if r.peer_id != manifest.peer_id: raise UnverifiableCapabilityGrant( f"receipt peer_id {r.peer_id} does not match manifest peer_id {manifest.peer_id}" ) return manifest.peer_id ```