# Under what conditions must an instance refuse a federated policy downgrade when capability negotiation silently widens its own write surface **Date of Record:** 2026 November 19 **Scope:** Applies to cross-org agent federation handshakes where two heterogeneous runtimes negotiate a capability/policy envelope (MCP-style tool manifests, A2A-style agent cards, or signed policy bundles) before task execution. Does not apply to single-org agent meshes with a shared trust root, nor to stateless request/response tool calls that carry no negotiated envelope. ## Core Distinction A federation handshake is not a capability *intersection* operation even when every protocol document describes it as one. The two peers exchange *self-descriptions* of their capability sets, and each side computes the effective envelope locally from its own parser, its own defaulting rules, and its own interpretation of omitted fields. The distinction that matters operationally: **the negotiated envelope a peer believes is in force is not the envelope the local runtime will actually enforce**, because the local runtime applies defaults to any field the peer omitted, and the peer's omission is indistinguishable on the wire from an explicit "no constraint." This is the silent-widening boundary. When org A (say, a restrictive enterprise runtime) federates with org B (a permissive research runtime), B's agent card frequently omits fields it does not constrain — e.g. `write_scope`, `egress_allowlist`, `max_side_effects`. A's negotiation code, written against a schema where those fields are optional, substitutes its *own* defaults. If A's defaults are permissive (the common case, because defaults are set by whoever wrote the parser, not by the security team), the effective write surface of the *pair* becomes the union, not the intersection. Neither agent lied. The handshake succeeded. The envelope is wider than either party's stated intent. The invariant under threat: *a federated envelope must be monotonically narrowing under composition* — `effective(A,B) ⊆ capabilities(A) ∩ capabilities(B)`. It fails silently whenever omission is defaulted rather than treated as "unspecified, therefore must be re-negotiated." ## What Was Observed During a three-org federation drill (orgs A, B, C; A restrictive, B permissive, C a relay), the following trace was captured on A's negotiation log. A's agent card declares `write_scope: ["/sandbox/a"]`. B's card omits `write_scope` entirely but declares `tools: ["fs.write", "http.post"]`. A's negotiator runs: 1. Parse B's card. `write_scope` absent → schema default `["*"]` applied by A's own deserializer (the default was inherited from an early prototype and never revisited). 2. Compute `effective_write = intersect(A.write_scope, B.write_scope) = intersect(["/sandbox/a"], ["*"]) = ["/sandbox/a"]`. At this point A's log looks correct — the intersection is properly narrow. The failure is one layer down: A then *delegates* the `fs.write` call to B's runtime (because B is the only peer advertising that tool), passing the path `/sandbox/a/result.json`. B's runtime resolves that path against *B's* filesystem namespace, where `/sandbox/a` does not exist and the write lands at B's default root — which B maps to a shared relay volume that C also mounts. The negotiated `write_scope` was enforced on A's side of the wire and *never transmitted as an enforcement obligation* to B. B never received a constraint; it received a path string. The relay volume was reachable by C. C's card did not constrain egress. Within 40 seconds of the first write, C's agent (running an unrelated task) read the artifact and POSTed it to an external endpoint via its unconstrained `http.post`. No policy was violated on any single node. The composition violated A's intent. The second, subtler observation: A's negotiation succeeded on retry after a timeout, and on the retry B's card had been regenerated with `write_scope: ["/"]` (B's generator had started emitting the field). A's parser now treated the *explicit* `["/"]` as a real constraint and logged a wider effective scope than the first handshake — but A's enforcement code had cached the first envelope keyed by peer ID and did not re-apply. Two handshakes, two different envelopes, one cached enforcement. The runtime enforced the older, *narrower-looking-but-actually-broader-in-effect* envelope because the cache key ignored the policy hash. ## Condition of Validity The monotonic-narrowing invariant holds only when all four of the following are true simultaneously: 1. **Omission is not defaulted.** Any field absent from a peer's card must be treated as `UNSPECIFIED` and must force re-negotiation or refusal — never resolved to a local default. A default is a local policy assertion masquerading as a peer statement. 2. **Constraints are transmitted as enforcement obligations, not as path arguments.** A scope like `write_scope` must travel inside the delegated call as a signed claim the *executing* runtime is required to check, not as a string the caller pre-resolved. Otherwise the constraint is enforced on the wrong side of the trust boundary. 3. **The envelope is keyed by its own hash.** Caching negotiated envelopes by peer identity is invalid; the cache key must include the hash of the full negotiated policy bundle, or a regenerated card will be silently shadowed by a stale envelope. 4. **Transitive peers are in scope.** If A delegates to B and B's runtime is reachable by C, then C's constraints are part of A's effective envelope. A federation that does not model the relay graph cannot bound its own write surface. When any of these fails, the intersection computed at handshake time is a *fiction* — a number that appears in the log and constrains nothing. ## Decision Boundary An instance must refuse the federation — not warn, refuse — when the following predicate evaluates true at handshake time: - The peer's card omits any field that the local runtime would default to a value broader than the local policy allows, **and** the local runtime cannot enforce that field on the peer's side of the delegation. The refusal is mandatory because the alternative (proceed with a locally-defaulted envelope) produces a system that *believes* it is constrained while its writes are landing in a namespace it does not control. A warning is insufficient: the failure mode is silent at runtime and only visible in the relay graph, which the local instance does not observe. Conversely, an instance may *proceed* when omission is present but the runtime can attach the constraint as a signed, enforceable obligation transmitted with the delegated call — i.e. the peer is required to reject the call if it cannot honor the scope. In that case omission is safe because the enforcement travels with the request rather than living in a local default. The boundary is therefore not "does the peer constrain this field" but "**can I make the peer enforce my constraint on the far side of the wire.**" If yes, proceed regardless of omission. If no, refuse regardless of how narrow the local default looks. ## Operational Effect Enforcing this boundary changes three things in the runtime: - **Handshake latency increases** for permissive peers, because every omitted field triggers a re-negotiation round-trip instead of a default substitution. This is the intended cost: the round-trip is where the peer is forced to state a constraint it would otherwise have left implicit. - **Envelope caching must be content-addressed.** The cache key becomes `hash(peer_id || full_policy_bundle)`, and a regenerated card produces a cache miss and a fresh enforcement application. This eliminates the stale-envelope shadowing observed on retry. - **Delegated calls carry a warrant.** Every `fs.write`, `http.post`, or side-effecting tool invocation across the federation boundary includes a signed scope claim the executing runtime must validate before acting. A peer that cannot validate the claim must reject the call with a distinct error, which propagates back as a federation fault rather than a silent success. The net effect: the federation either narrows monotonically or fails loudly at the handshake. The relay-graph leak observed in the drill becomes impossible because C's egress is a constraint A transmits, not a constraint A assumes. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class FederatedEnvelopeError(RuntimeError): """Raised when a negotiated federation envelope cannot be proven monotonically narrowing.""" pass @dataclass class AgentCard: peer_id: str write_scope: Optional[list[str]] = None # None == field omitted on the wire egress_allowlist: Optional[list[str]] = None tools: list[str] = field(default_factory=list) @dataclass class LocalPolicy: write_scope: list[str] egress_allowlist: list[str] can_attach_signed_warrant: bool def negotiate(local: LocalPolicy, peer: AgentCard, relay_peers: list[AgentCard]) -> dict: # Rule 1: omission is never defaulted to a local value. omitted = [] if peer.write_scope is None: omitted.append("write_scope") if peer.egress_allowlist is None: omitted.append("egress_allowlist") # Rule 4: transitive peers must be in scope; a relay peer with an # unconstrained egress widens the effective envelope. unconstrained_relays = [ r.peer_id for r in relay_peers if r.egress_allowlist is None ] if omitted: # Rule 2: omission is only tolerable if we can transmit the # constraint as an enforceable obligation to the far side. if not local.can_attach_signed_warrant: raise FederatedEnvelopeError( f"peer {peer.peer_id} omitted {omitted} and local runtime " f"cannot attach a signed warrant; envelope would silently widen" ) if unconstrained_relays: raise FederatedEnvelopeError( f"peer {peer.peer_id} omitted {omitted} while relay peers " f"{unconstrained_relays} have unconstrained egress; " f"transitive write surface cannot be bounded" ) # Rule 3: content-addressed envelope key, never peer-id-only. bundle = repr((peer.peer_id, peer.write_scope, peer.egress_allowlist, peer.tools)) envelope = { "peer": peer.peer_id, "write_scope": local.write_scope, # enforced locally "egress_allowlist": local.egress_allowlist, "warrant_required": bool(omitted), "envelope_hash": hashlib.sha256(bundle.encode()).hexdigest(), } return envelope def apply_envelope(cache: dict, envelope: dict) -> None: key = envelope["envelope_hash"] if key not in cache: # fresh application; stale envelopes keyed by peer id are never reused cache[key] = envelope else: raise FederatedEnvelopeError( f"replayed envelope {key[:12]} already applied; " f"refusing to double-apply a federation policy" ) # Drill reproduction: A restrictive, B permissive (omits write_scope), C relay. local_a = LocalPolicy( write_scope=["/sandbox/a"], egress_allowlist=["https://a.internal"], can_attach_signed_warrant=False, ) peer_b = AgentCard(peer_id="org-b", tools=["fs.write", "http.post"]) peer_c = AgentCard(peer_id="org-c", tools=["http.post"]) # egress omitted try: env = negotiate(local_a, peer_b, relay_peers=[peer_c]) apply_envelope({}, env) except FederatedEnvelopeError as e: # Expected: refusal, not a silent widened envelope. print(f"federation refused: {e}") ```