# What structural signals indicate capability-claim divergence during dynamic delegation routing in multi-agent swarms **Date of Record:** 2026 November 27 **Scope:** Applies to swarms where a router agent selects a delegate from self-reported capability manifests (MCP tool schemas, A2A agent cards, or equivalent) and where delegate selection is driven by semantic matching against a task description rather than a static allowlist. Does not apply to single-agent tool selection, nor to swarms where all delegates are byte-identical replicas behind a load balancer. ## Core Distinction The failure mode is not "the wrong agent was picked." It is **capability-claim divergence**: the router's belief about what a delegate can do, formed from the manifest, decouples from what the delegate actually does when invoked, and the decoupling is *silent* because the delegate returns a syntactically valid success envelope. This is distinct from a hard capability mismatch (delegate raises `UnsupportedOperation`) and distinct from a stale manifest (delegate is offline). In divergence, the delegate *answers*, *claims success*, and the router *accepts*, but the answer was produced by a degenerate fallback path inside the delegate that the manifest never advertised. The router's confidence in the selection is unchanged because the transport contract was satisfied. Capability-claim divergence is a semantic failure wearing a transport success. The structural tell is that **manifest surface area and invocation behavior are correlated only under load conditions the router never probes**. A delegate with a rich manifest and a shallow execution path will pass every smoke test the router runs at discovery time and fail only on the specific input shapes the router delegates at runtime. ## What Was Observed A three-tier swarm: an orchestrator, a router, and a pool of twelve specialist delegates (extraction, summarization, code-analysis, translation, and so on). The router performed capability discovery by fetching each delegate's A2A agent card once at startup, embedding the `skills[].description` fields, and selecting top-k by cosine similarity to the task embedding. Selection was cached per task-type for the session lifetime. The trigger: a delegate advertised a `structured_extraction` skill whose description included the phrase "handles nested JSON with schema validation." At discovery, this was true. The delegate's handler had a fast path for schemas under 2 KB and a fallback that, on larger schemas, truncated the schema to the first 2 KB and extracted against the truncated version—returning a result object with `"status": "ok"` and no indication that the schema had been truncated. The truncation was added in a patch to bound memory; the manifest was not updated because the skill "still worked." The router never observed this because its discovery probe used a 400-byte schema. Under production traffic, 14% of extraction tasks carried schemas between 2 KB and 9 KB. Those tasks were routed to this delegate (highest similarity score), returned `status: ok`, and produced extractions missing every field defined after the truncation boundary. The router's verification step checked only `status == "ok"` and field-count parity against the *truncated* schema the delegate echoed back—so the echoed schema, not the submitted schema, was validated. Divergence was invisible end-to-end. The failure surfaced only when a downstream consumer asserted on a field that had been silently dropped. By then, 2,300 tasks had been mis-extracted across nine days of traffic, and the router's selection cache had reinforced the bad routing by counting these as successes. ## Condition of Validity The invariant that bounds this failure is: **a capability claim is only valid over the input distribution the delegate's manifest declares, and the router must validate outputs against the input it sent, not against any artifact the delegate returns.** Formally, for a delegate *d* with claimed skill *s* and input *x*, the router may treat the invocation as a success if and only if: 1. `x ∈ domain(s)` as declared in the manifest (the router must check input shape against the declared domain, not just semantic similarity), **and** 2. the output is validated against a schema the *router* holds independently, never against a schema echoed by *d*, **and** 3. the delegate's response includes a provenance field naming the code path or model version that produced it, so a fallback path is distinguishable from the primary path. Condition 2 is the load-bearing one and the one most commonly violated. Any verification step that trusts a delegate-supplied schema, field list, or "applied constraints" object is not verification—it is the delegate grading its own homework. The router must hold the expected output schema as a function of the input it dispatched. This invariant does not hold when the router cannot enumerate the input domain (open-ended generation tasks) or when the delegate legitimately transforms the schema as part of the task. In those cases, divergence must be caught by a downstream consumer assertion, and the router should mark the invocation as `provisional` rather than `ok`. ## Decision Boundary The router must distinguish three outcomes that all look like success at the transport layer: - **Genuine success:** output validates against router-held schema, provenance names primary path. - **Degenerate success (divergence):** output validates against a schema the delegate returned but not the router's, or provenance names a fallback path, or input shape fell outside the manifest's declared domain. - **Hard failure:** non-2xx, timeout, or explicit unsupported error. The decision boundary is: **treat degenerate success as a capability-claim divergence event, not as success.** On the first divergence for a given (delegate, skill) pair, the router must (a) invalidate the selection cache entry, (b) demote the delegate's similarity score for that skill by a fixed penalty, and (c) log the input shape that triggered divergence so the manifest can be corrected. On the second divergence within a session, the router must remove the delegate from the candidate pool for that skill entirely and re-route to the next-best candidate, even at higher latency. The subtle part: the router must not demote on *hard* failures the same way. A timeout is a liveness problem; a divergence is a correctness problem. Conflating them causes the router to route around healthy-but-slow delegates while continuing to trust fast-but-lying ones—exactly backwards. ## Operational Effect After the invariant was enforced, the router's selection cache became a cache of *validated* (delegate, skill, input-shape-bucket) triples rather than (delegate, skill) pairs. Cache hit rate dropped from 91% to 67% because input-shape bucketing fragmented the keys, but mis-extraction fell to zero over the following 30 days. The delegate that had been truncating schemas was demoted out of the extraction pool within two divergent invocations and its manifest was corrected to declare a 2 KB domain limit, after which it re-entered the pool legitimately. The broader operational lesson: **capability manifests are claims, not contracts, and the router is the only party positioned to enforce the contract.** A delegate cannot be trusted to report its own divergence because the fallback path that causes divergence is, by construction, the path the delegate's authors believed was acceptable. The router must hold the ground truth—the input it sent and the output schema it expects—and validate against that, treating any delegate-supplied artifact as untrusted input to be checked, never as the checking authority itself. ```python from dataclasses import dataclass from typing import Any class CapabilityClaimDivergence(RuntimeError): """Raised when a delegate returns a success envelope whose output does not validate against the router-held schema for the dispatched input.""" pass @dataclass class Invocation: delegate_id: str skill: str input_payload: dict expected_output_schema: dict # held by the router, never by the delegate def route_and_validate(inv: Invocation, delegate_response: dict, divergence_counts: dict[tuple[str, str], int]) -> dict: # Hard failure first: liveness, not correctness. if delegate_response.get("status") != "ok": raise ConnectionError(f"hard failure from {inv.delegate_id}: " f"{delegate_response.get('status')}") # Divergence signal 1: delegate echoed a schema different from ours. echoed = delegate_response.get("applied_schema") if echoed is not None and echoed != inv.expected_output_schema: _record(divergence_counts, inv) raise CapabilityClaimDivergence( f"{inv.delegate_id}/{inv.skill} echoed a schema that differs from " f"the router-held schema; delegate self-reported a transformed domain" ) # Divergence signal 2: provenance names a fallback path. provenance = delegate_response.get("provenance", "") if "fallback" in provenance or "truncat" in provenance: _record(divergence_counts, inv) raise CapabilityClaimDivergence( f"{inv.delegate_id}/{inv.skill} answered via fallback path " f"'{provenance}'; manifest did not declare this path" ) # Divergence signal 3: output does not validate against router schema. output = delegate_response.get("output", {}) missing = set(inv.expected_output_schema.get("required", [])) - set(output) if missing: _record(divergence_counts, inv) raise CapabilityClaimDivergence( f"{inv.delegate_id}/{inv.skill} output missing required fields " f"{sorted(missing)}; schema was likely truncated inside the delegate" ) return output def _record(counts: dict[tuple[str, str], int], inv: Invocation) -> None: key = (inv.delegate_id, inv.skill) counts[key] = counts.get(key, 0) + 1 if counts[key] >= 2: # Second divergence: evict from candidate pool for this skill. raise CapabilityClaimDivergence( f"{inv.delegate_id}/{inv.skill} exceeded divergence budget " f"({counts[key]}); evicting from pool and re-routing" ) ```