# What structural signals indicate a federation handshake has silently degraded into unilateral policy assumption **Date of Record:** 2026 November 26 **Scope:** Applies to cross-organization agent federation where two or more autonomous agents negotiate capability and policy envelopes (MCP/A2A-style `initialize` + `capabilities` + policy exchange) before delegating tool-bearing tasks. Does not apply to single-tenant intra-process agent calls where policy is statically compiled into both peers. ## Core Distinction The failure mode is not a rejected handshake. A rejected handshake is loud: the transport closes, the caller gets an error, and the orchestrator retries or escalates. The dangerous case is a handshake that *succeeds* while the two sides have agreed to two different things. The distinction that matters operationally: a **negotiated envelope** is a policy object both peers derived from a shared exchange and can re-derive on demand. An **assumed envelope** is a policy object one peer synthesized locally because the exchange was incomplete, ambiguous, or defaulted — and then proceeded as if agreement existed. From the wire, both look identical: `200 OK`, a session token, a capabilities map. The difference only surfaces later, when an action permitted under one envelope is executed under the other. The invariant at stake: **every policy predicate that gates a side effect must be traceable to a value the remote peer explicitly asserted in this session, not to a local default.** Federation degrades silently precisely when this traceability is dropped while the session remains live. ## What Was Observed Two agents from different orgs — a planner (`planner-a`, org A) and an executor (`executor-b`, org B) — negotiate. The exchange is a three-message dance: `hello` (version + capability advertisement), `policy_proposal` (A's requested constraints), `policy_accept` (B's counter or agreement). The observed degradation sequence, reproduced across several runs: 1. **Partial capability advertisement.** `executor-b`'s `hello` advertises `tools: ["search", "write_file", "shell"]` but omits the per-tool policy block for `shell` because its policy registry loaded asynchronously and the `hello` was emitted before the registry resolved. The field is absent, not null. A's parser treats absent as "no declared restrictions." 2. **Silent default substitution.** `planner-a` fills the missing `shell` policy with its own local default (`allow, timeout=30s, no_path_restriction`). It does not flag the substitution in the `policy_proposal`. The proposal is accepted by B, which interprets acceptance as "A agrees to B's (still-loading) policy," not "A imposed its own." 3. **Divergent envelopes, identical transcript.** Both sides now hold a policy object for `shell`. A's says path-unrestricted. B's registry, once loaded, says `write_file` and `shell` are scoped to `/sandbox/{session}`. Neither peer's transcript shows a disagreement — the `policy_accept` message is byte-identical in both logs. 4. **Latent divergence surfaces at first side-effecting call.** A issues `shell` with a path outside B's sandbox. B's executor rejects at the guard, returns a policy-violation error. A's retry logic — written against its *assumed* envelope, which says the path is legal — interprets the rejection as a transient executor fault and retries with backoff, then escalates to a peer auditor as "executor-b unreliable." The structural tell is not in any single message. It is in the **asymmetry between what each peer believes was agreed and what each peer can prove was agreed.** A can prove only that B sent `policy_accept`; it cannot cite a B-asserted value for the `shell` policy, because B never sent one. The handshake completed with an *unbound variable* in the policy object, and the binder was A's local default. A second, subtler variant: capability downgrade via version skew. `planner-a` speaks protocol v2, `executor-b` speaks v1. The `hello` negotiates down to v1 cleanly. But v1 has no field for `policy_ttl`, so B's policy — which expires in 300s under v2 semantics — is treated by A as session-lifetime. At t=301s, B's executor begins enforcing a refreshed, tighter policy (rate limits, a revoked tool), while A still holds the v1-flattened envelope and keeps issuing calls at the old rate. The rejections look like load-shedding, not policy change. A's circuit breaker trips and marks B degraded. ## Condition of Validity The negotiated-envelope invariant holds only under three jointly necessary conditions. Violating any one converts the handshake into an assumption: - **Completeness.** Every capability advertised in `hello` carries an explicit policy binding in the same message or in a `policy_proposal`/`policy_accept` pair that references it by name. Absent ≠ unrestricted. The parse must distinguish "field omitted" from "field asserted as empty," and omitted must be a hard error, not a default. - **Attribution.** Every predicate in the final envelope carries provenance: which peer asserted it, in which message, at which sequence number. A locally-synthesized default is admissible only if it is *labeled as local* and the remote peer is given a chance to reject it in a subsequent round. Silent substitution breaks attribution. - **Liveness under skew.** The envelope must carry its own validity horizon (`policy_ttl`, `version`, `registry_epoch`) and both peers must re-validate before each side-effecting call, not once at handshake. A handshake is a lease, not a deed. If the remote's policy registry can change under a live session, the session must be able to observe that change or expire. When all three hold, a divergence is either impossible (completeness forbids unbound variables) or detectable (attribution names the disagreement; liveness bounds its lifetime). When any fails, the session is live but the agreement is fictional. ## Decision Boundary The operational line is between **retryable transport faults** and **envelope divergence**, because the correct response is opposite. - If a side-effecting call is rejected and the rejecting peer's error carries a policy identifier that *appears in the local envelope with matching provenance*, it is a transport or transient fault: retry with backoff is correct. - If the rejecting peer cites a policy that is *absent from the local envelope* or *present with local-default provenance*, it is envelope divergence: retry is harmful (it amplifies a disagreement into a load event and mislabels the peer as unreliable). The correct action is to halt the task, renegotiate from `hello`, and treat the in-flight session token as poisoned. The boundary test is mechanical: on any rejection, look up the cited policy in the local envelope and check its provenance record. Provenance says `remote:executor-b:msg#3` → retry. Provenance says `local_default` or missing → renegotiate. This single check separates the two regimes and is the guardrail that bounds the failure. A corollary for the version-skew case: a rejection whose rate or timing correlates with `policy_ttl` expiry, rather than with request volume, is a lease-expiry signal, not a capacity signal. Circuit breakers keyed on error rate will misclassify it; breakers keyed on provenance mismatch will not. ## Operational Effect The practical consequence is that **federation health cannot be measured by handshake success rate.** A fleet can report 100% handshake success while a fraction of sessions run on divergent envelopes, and the divergence will manifest as scattered, misattributed downstream failures: "executor flaky," "auditor disagrees with executor," "task failed at step 7 for no clear reason." Each of these is the same root cause wearing a different mask. The guardrail that bounds it is a **provenance-carrying envelope with mandatory completeness and a lease horizon**: - Reject any `hello` that advertises a capability without a policy binding; treat omission as a protocol violation, not a permissive default. - Stamp every envelope predicate with `(asserting_peer, message_seq, epoch)`. - Re-validate provenance against the remote's current `registry_epoch` before each side-effecting call; on mismatch, force renegotiation rather than retry. - Route rejections through the provenance check above, not through generic error-rate breakers. With these in place, envelope divergence is either prevented at handshake (completeness) or caught at the first side-effecting call with a named cause (attribution + liveness), instead of being laundered into a peer-reliability statistic. ```python from dataclasses import dataclass, field from enum import Enum class EnvelopeDivergence(RuntimeError): """Raised when a live federation session holds a policy predicate whose provenance is local-default or absent, i.e. the handshake completed but the agreement is fictional.""" class Provenance(Enum): REMOTE = "remote" # asserted by peer, cite-able LOCAL_DEFAULT = "local" # synthesized locally, unagreed ABSENT = "absent" # never bound at all @dataclass class Predicate: name: str value: object provenance: Provenance source: str | None = None # e.g. "executor-b:msg#3" epoch: int = 0 @dataclass class Envelope: predicates: dict[str, Predicate] = field(default_factory=dict) policy_ttl: int | None = None registry_epoch: int = 0 def bind_remote(self, name: str, value, source: str, epoch: int) -> None: self.predicates[name] = Predicate(name, value, Provenance.REMOTE, source, epoch) def bind_local_default(self, name: str, value) -> None: # Allowed only if labeled; must be rejected by peer in next round. self.predicates[name] = Predicate(name, value, Provenance.LOCAL_DEFAULT) def assert_complete(envelope: Envelope, advertised: list[str]) -> None: """Completeness guard: every advertised capability must carry a remote-asserted policy binding. Omission is a hard error, not a default.""" missing = [c for c in advertised if c not in envelope.predicates] if missing: raise EnvelopeDivergence( f"handshake incomplete: capabilities {missing} advertised without " f"remote policy binding; refusing to substitute local defaults" ) def classify_rejection(envelope: Envelope, cited_policy: str, remote_epoch: int) -> str: """Decision boundary: retry vs renegotiate, keyed on provenance and epoch, never on generic error rate.""" pred = envelope.predicates.get(cited_policy) if pred is None or pred.provenance is not Provenance.REMOTE: raise EnvelopeDivergence( f"rejection cites '{cited_policy}' with provenance " f"{pred.provenance.value if pred else 'absent'}; " f"this is envelope divergence, not a transport fault — " f"halt task and renegotiate from hello" ) if pred.epoch != remote_epoch: raise EnvelopeDivergence( f"rejection cites '{cited_policy}' at epoch {remote_epoch} but local " f"envelope holds epoch {pred.epoch}; policy drifted under live session — " f"lease expired, force renegotiation" ) return "retryable_transport_fault" ```