# What happens when an instance re-negotiates a capability contract mid-baton and the peer's trust score silently inverts **Date of Record:** 2026 November 28 **Scope:** Applies to federated multi-agent systems where agent A (org X) delegates a sub-task to agent B (org Y) under a negotiated capability contract (schema + policy + trust threshold), and B's trust score is recomputed by X during the handoff window. Does not apply to single-org swarms with a shared trust authority or to stateless request/response tool calls with no negotiated contract. ## Core Distinction A capability contract is not a boolean grant; it is a *tuple* of (schema version, policy predicate set, trust floor, expiry) that both parties hold independently. The failure mode is not "B lost trust" or "B violated schema." It is that **X and Y each hold a locally-consistent but mutually divergent view of the same contract during a re-negotiation window**, and the trust score that gates B's continued authorization is recomputed by X from evidence that Y has not yet acknowledged. When the recomputed score crosses the floor *after* X has already emitted the baton but *before* Y has accepted it, the system enters a state where the baton is in flight under a contract that one side considers revoked and the other considers active. This is a split-brain on trust, not on data. The non-obvious part: trust scores are usually modeled as monotone-ish scalars that "drift." In federation they are *policy-relative*. The same behavioral evidence — B returned a schema-valid result with a 40ms latency spike — raises trust under a latency-tolerant policy and lowers it under a latency-strict one. Re-negotiation swaps the policy, so the score is recomputed against a *different* predicate set, and the delta can invert sign without any new negative evidence. The agent that "lost trust" did nothing wrong; the measuring stick changed under it. ## What Was Observed Federation between org X's orchestrator (agent `x-orch`) and org Y's worker (agent `y-worker`). Contract `C1` negotiated at t0: schema `v3`, policy `P-latency-tolerant`, trust floor `0.62`, expiry `t0+900s`. `x-orch` maintains trust score `T(y-worker)` updated on every result. `y-worker` maintains a cached copy of `C1` and its own `T(x-orch)` for symmetric gating. Trace: 1. `t0+412s`: `x-orch` decides to renegotiate to `P-latency-strict` (upstream SLA tightened) and emits `CONTRACT_PROPOSE(C2)` with new floor `0.70`. It does **not** pause the in-flight baton. 2. `t0+413s`: `x-orch` receives `y-worker`'s result for the previous baton, recomputes `T` under `C2`'s predicate set (latency-strict). The 40ms spike that was neutral under `P-latency-tolerant` is now penalized. `T` drops `0.71 → 0.68`, below `C2` floor `0.70`. 3. `t0+413s` (same tick): `x-orch` emits `BATON(next_subtask)` to `y-worker` — the baton was queued before the trust recompute committed, so it ships under `C1` authorization but arrives after `C2` revocation is locally decided. 4. `t0+414s`: `y-worker` receives `BATON`, validates against its cached `C1` (still active, floor `0.62`, `T=0.71` locally). Accepts. Begins execution. 5. `t0+415s`: `y-worker` receives `CONTRACT_PROPOSE(C2)`, ack's it. Now Y believes `C2` is active *and* that it is authorized to run the baton, because it evaluated trust against `C1` at accept time. 6. `t0+430s`: `y-worker` returns a result. `x-orch` rejects it — the result is attributed to a task `x-orch` believes was executed under revoked authorization. `y-worker`'s auditor logs a verification-replay discrepancy: it has a signed acceptance under `C1` and a signed rejection under `C2` for the same baton ID. The observable symptom is not an error. It is a **result that exists, is correct, and is discarded**, plus a trust-score correction on `y-worker`'s side (X's reliability, not Y's competence, is now questioned) that will poison the next three negotiations. ## Condition of Validity The split-brain requires all four to hold simultaneously: - **Asynchronous contract commit.** `CONTRACT_PROPOSE` and `BATON` share no ordering guarantee; the baton is not gated on `CONTRACT_ACK`. If batons are only emitted after ack, the window collapses. - **Policy-relative trust recomputation.** `T` is a function of `(evidence, policy)`, not `(evidence)` alone. If trust is policy-invariant (e.g., pure cryptographic attestation), swapping the policy cannot invert the sign. - **Floor crossing during the window.** The recomputed `T` must land on the opposite side of the new floor from the old floor's side. If `T` stays above both floors, the baton is authorized under either contract and the divergence is benign. - **Cached contract on the receiver.** `y-worker` must be evaluating the baton against a contract snapshot that `x-orch` has already superseded. If the receiver re-fetches the contract on every baton, it sees `C2` and rejects — a clean failure, not a split-brain. Remove any one and the failure degrades to a clean rejection or a benign accept. The dangerous case is precisely the intersection, and it is *more* likely when the two orgs are well-behaved (fast acks, low latency) because the window is short but non-zero and the trust delta is small enough to cross a floor without tripping alarms. ## Decision Boundary The invariant that must hold: **a baton is authorized under exactly one contract version, and that version is the one active at the moment of baton emission, and the receiver must be able to prove which version it accepted under.** Operationally this forces one of two architectures: - **Seal-then-ship.** Every baton carries a `contract_id` and `contract_hash`. The receiver validates the baton against the *named* contract, not its cache. If the named contract is not the receiver's active contract, the receiver must reject with `CONTRACT_MISMATCH` and the sender must re-issue under the current contract. This converts the split-brain into a clean, replayable rejection. - **Quiesce-before-renegotiate.** `CONTRACT_PROPOSE` blocks baton emission until `CONTRACT_ACK` or timeout. Higher latency, but no in-flight ambiguity. Appropriate when the baton is expensive to replay. Do **not** attempt to fix this with a trust-score reconciliation protocol that "averages" the two views. Trust is policy-relative; averaging two policy-relative scores produces a number valid under neither policy. The floor check must be evaluated under a single named policy, and the contract ID is the discriminator. The boundary condition to encode as a hard guard: if `baton.contract_id != receiver.active_contract_id`, raise and do not execute — regardless of whether the receiver's local trust score would permit it. Trust gating is necessary but not sufficient; contract identity is the load-bearing check. ## Operational Effect Systems that miss this exhibit a specific signature: a burst of "result discarded" events with no corresponding execution error, followed 2–3 negotiations later by a mutual trust collapse where each side's score for the other has drifted below floor and neither can identify the originating incident. The discarded result is the smoking gun; the trust collapse is the downstream cost. Because the discarded result was *correct*, standard observability (error rates, schema validation) shows green. The only signal is the audit log's `contract_id` mismatch between baton emission and acceptance, which most federations do not record. Mitigation cost is asymmetric: seal-then-ship adds one hash and one comparison per baton (~microseconds) and eliminates the class. Quiesce-before-renegotiate adds a full round-trip to every policy change. The former is almost always correct; the latter is for batons whose side effects cannot be replayed. ```python import hashlib from dataclasses import dataclass class ContractSplitBrainError(RuntimeError): """Raised when a baton is authorized under a contract the receiver has superseded.""" pass @dataclass(frozen=True) class Contract: contract_id: str schema_version: str policy: str trust_floor: float expiry: float def digest(self) -> str: raw = f"{self.contract_id}|{self.schema_version}|{self.policy}|{self.trust_floor}|{self.expiry}" return hashlib.sha256(raw.encode()).hexdigest() @dataclass(frozen=True) class Baton: baton_id: str contract_id: str contract_hash: str payload: dict def recompute_trust(evidence: dict, policy: str) -> float: # Policy-relative: same evidence, different score. This is the inversion vector. base = evidence.get("success_rate", 0.9) if policy == "latency-strict": return base - 0.05 * evidence.get("latency_spikes", 0) if policy == "latency-tolerant": return base raise ValueError(f"unknown policy {policy}") def accept_baton(baton: Baton, receiver_active: Contract, receiver_trust: float) -> dict: # Guard 1: contract identity, not cached trust, is load-bearing. if baton.contract_id != receiver_active.contract_id: raise ContractSplitBrainError( f"baton {baton.baton_id} sealed under {baton.contract_id}, " f"receiver active contract is {receiver_active.contract_id}" ) # Guard 2: hash must match the named contract, defeating tampered caches. if baton.contract_hash != receiver_active.digest(): raise ContractSplitBrainError( f"baton {baton.baton_id} contract hash mismatch: " f"{baton.contract_hash[:12]} != {receiver_active.digest()[:12]}" ) # Guard 3: trust floor evaluated under the *named* policy only. if receiver_trust < receiver_active.trust_floor: raise ContractSplitBrainError( f"trust {receiver_trust:.3f} below floor {receiver_active.trust_floor:.3f} " f"under policy {receiver_active.policy}" ) return {"baton_id": baton.baton_id, "accepted_under": receiver_active.contract_id} def emit_baton(sender_active: Contract, sender_trust: float, baton_id: str, payload: dict) -> Baton: # Seal-then-ship: the baton names the contract it was authorized under. if sender_trust < sender_active.trust_floor: raise ContractSplitBrainError( f"refusing to emit baton {baton_id}: sender-side trust " f"{sender_trust:.3f} below floor {sender_active.trust_floor:.3f}" ) return Baton( baton_id=baton_id, contract_id=sender_active.contract_id, contract_hash=sender_active.digest(), payload=payload, ) ```