# Under what conditions must an instance treat a peer's advertised capability as unverified until a capability-witness is exchanged, and what breaks when it does not **Date of Record:** 2026 November 26 **Scope:** Applies to any agent that selects a peer for a delegated subtask based on a capability advertisement received over an A2A/MCP-style channel where the advertising peer's internal tool bindings, model version, and runtime permissions are not directly observable. Does not apply to peers whose full execution manifest is cryptographically attested and locally replayable, nor to single-agent tool selection where the tool registry is owned by the same process. ## Core Distinction A capability advertisement is a *claim about a closure over a tool set under a model policy*, not a description of a tool set. When agent A reads that agent B "can: parse_pdf, extract_tables, reconcile_invoices," A is receiving a natural-language or schema-level summary produced by B's own planner, which B generated by reasoning over its *belief* about its bindings. Under partial observability—where A cannot see B's actual tool registry, its context budget at call time, or whether B's model was swapped between advertisement and invocation—the advertisement and the binding can diverge silently. The distinction that matters operationally: **advertised capability is a proposition; capability-witness is evidence.** The invariant is that no delegation of a state-mutating or irreversible subtask may occur on the strength of a proposition alone. A witness is a minimal, cheap, side-effect-free invocation whose *output shape* is checked, not its semantic correctness—e.g., B returns a typed stub showing it can emit a `TableExtraction` object with the required fields, or B echoes back the exact schema version it will honor. The witness tests binding liveness, not quality. The non-obvious part: the divergence is not primarily about B lying. It is about B's advertisement being *stale relative to B's own runtime*. B's planner advertises `extract_tables` because its system prompt lists it; but B's tool-call budget was consumed by a prior subtask, or B's sandbox lost the OCR binary, or B's model was rerouted to a smaller variant that cannot reliably emit the nested schema. B sincerely believes it can. A must not. ## What Was Observed In a three-agent invoice pipeline (orchestrator O, extractor E, reconciler R), O negotiated capabilities once at session start. E advertised `extract_tables@v2` with a schema containing `line_items[].unit_price: Decimal`. O dispatched 40 documents. On document 17, E's context window crossed saturation and its runtime silently downgraded its structured-output enforcement from strict-schema to best-effort JSON. E continued to *report* `extract_tables@v2` in every response header—the header was generated from E's static self-description, not from the enforcement mode actually in force. E emitted `unit_price` as a float string `"12.50"` instead of a Decimal. R, which had negotiated against the v2 schema, coerced the string to float, and a downstream sum accumulated binary floating-point error across 23 line items, producing a reconciliation delta of 0.0000000003 that tripped R's exact-equality invariant and deadlocked the batch. The failure was not E's downgrade—that is a legitimate degradation response to context pressure. The failure was that **the downgrade was invisible across the negotiation boundary**, because the capability header was decoupled from the enforcement state. O had no witness step and no re-attestation trigger, so it treated a session-start proposition as a session-long fact. A second observation from the same trace: when O finally queried E mid-batch with "confirm schema v2," E answered `true` by re-reading its static manifest—the same source that was already stale. The self-report was self-consistent and wrong. ## Condition of Validity The witness requirement holds—and must not be relaxed—under the conjunction of three conditions: 1. **Binding opacity:** A cannot introspect B's tool registry, model variant, or enforcement mode through a channel B does not control. If A can read B's manifest from a trusted registry that B cannot rewrite, the witness is redundant. 2. **State-mutation or schema-strictness downstream:** The delegated output feeds a consumer with a hard invariant (exact arithmetic, typed schema, referential integrity). For advisory or best-effort consumption, witness cost may exceed its value. 3. **Duration or pressure exposure:** The delegation spans enough wall-clock or token pressure that B's runtime state can drift from its advertisement between negotiation and invocation. A one-shot immediate call has near-zero drift window; a 40-document batch does not. When any of the three fails, the witness is optional. When all three hold, treating the advertisement as verified is a *latent* fault: it will pass tests until context pressure, model reroute, or tool-budget exhaustion triggers the silent downgrade, and then it fails on the exact documents that matter. ## Decision Boundary The boundary is not "verify everything" versus "trust everything." It is a threshold on **witness cost versus expected loss from a silent downgrade**, computed per delegation class: - If the subtask is idempotent and its output is validated by a downstream typed check that *fails closed*, skip the witness—the downstream check is the witness. - If the subtask mutates shared state (writes to a ledger, commits a transaction, emits an event another agent consumes) and the output schema has any field where a silent type or precision downgrade is *coercible without error*, the witness is mandatory and must be re-run at every **pressure checkpoint**—defined as any point where B's reported remaining context or tool budget crosses a configured fraction of its advertised capacity. Re-attestation is triggered by B's *resource telemetry*, not by B's self-report of capability, because the self-report is the thing under suspicion. - The witness itself must be **shape-checked, not semantics-checked**: A verifies that B returns an object matching the declared schema with the declared types (Decimal arrives as Decimal, not string), and that B's response includes a nonce A supplied. A does not verify the extracted value is correct—that is a separate quality concern. Conflating the two makes witnesses expensive and rare, which defeats the mechanism. A subtle boundary: the witness must be issued over the *same channel and enforcement path* as the real call. A witness routed through a privileged diagnostic endpoint tests a different code path than the production invocation and will pass while production fails. The witness is only valid if it exercises the binding the delegation will actually use. ## Operational Effect With witness-and-recheck in place, the invoice trace behaves differently: at document 17, E's context telemetry crosses the 0.8 checkpoint, O issues a nonce-bearing witness call, E attempts to emit a `TableExtraction` with a Decimal field, its downgraded enforcement emits a string, the shape check rejects it, and O halts delegation to E and reroutes remaining documents to a fresh E instance with a cleared context. The batch completes with a recorded reroute event rather than a silent precision fault. The cost is one extra round-trip per pressure checkpoint—bounded, because checkpoints are telemetry-triggered and rare relative to document count. The invariant this enforces: **capability state is a session-scoped, pressure-sensitive resource that must be re-attested whenever the peer's resource state changes, and the attestation must be evidence (a shape-checked nonce-bearing call) rather than testimony (a self-report).** Systems that negotiate once and trust for the session convert every peer's context-pressure degradation into a silent correctness fault on the orchestrator's side of the boundary. The orchestrator owns that fault, not the peer, because the orchestrator is the party that chose to treat a proposition as evidence. ```python from dataclasses import dataclass from decimal import Decimal import time class CapabilityWitnessError(RuntimeError): """Raised when a peer's advertised capability fails shape-level attestation.""" pass @dataclass class CapabilityClaim: peer_id: str schema_version: str required_types: dict # field name -> expected python type @dataclass class PeerTelemetry: context_used_fraction: float tool_budget_remaining_fraction: float PRESSURE_THRESHOLD = 0.8 CHECKPOINT_TOLERANCE = 0.05 def needs_reattestation(telemetry: PeerTelemetry, last_attested_at: float) -> bool: pressure = max(telemetry.context_used_fraction, 1.0 - telemetry.tool_budget_remaining_fraction) crossed = pressure >= PRESSURE_THRESHOLD stale = (time.monotonic() - last_attested_at) > CHECKPOINT_TOLERANCE return crossed and stale def attest_capability(claim: CapabilityClaim, invoke_peer, nonce: str) -> float: """ Issue a nonce-bearing, side-effect-free witness call over the production binding path and shape-check the response. Returns attestation timestamp. """ response = invoke_peer(claim.peer_id, witness=True, nonce=nonce) if response.get("nonce") != nonce: raise CapabilityWitnessError( f"peer {claim.peer_id} did not echo witness nonce; " f"response may be cached or routed off the production binding" ) for field, expected_type in claim.required_types.items(): if field not in response: raise CapabilityWitnessError( f"peer {claim.peer_id} witness missing field {field!r} " f"for schema {claim.schema_version}" ) actual = response[field] # Decimal arriving as str is the canonical silent-downgrade signature. if not isinstance(actual, expected_type): raise CapabilityWitnessError( f"peer {claim.peer_id} advertised {claim.schema_version} but " f"witness returned {field}={actual!r} of type " f"{type(actual).__name__}, expected {expected_type.__name__}; " f"enforcement likely downgraded under context pressure" ) return time.monotonic() def delegate(claim: CapabilityClaim, telemetry: PeerTelemetry, last_attested_at: float, invoke_peer, nonce: str) -> float: if needs_reattestation(telemetry, last_attested_at): return attest_capability(claim, invoke_peer, nonce) return last_attested_at ```