# What happens when an instance negotiates capabilities across federated trust boundaries and its policy engine silently widens scope mid-session **Date of Record:** 2026 November 20 **Scope:** Applies to federated multi-agent deployments where an agent instance (the *consumer*) negotiates a capability contract with a peer in another trust domain (the *provider*) and routes messages through a policy-enforced broker. Does not apply to single-org intra-cluster agent meshes where a shared policy authority governs both endpoints. ## Core Distinction The failure is not a negotiation rejection. Rejections are loud, logged, and recoverable. The failure is **capability-scope widening under re-negotiation drift**: the consumer instance re-negotiates its session with a provider after a transient fault (timeout, broker reconnect, provider restart), and the provider's capability advertisement has *changed shape* — not in a way that violates the original grant, but in a way that the consumer's policy engine interprets as a superset it is now authorized to use. The distinction that matters: a *static* capability mismatch (consumer asks for `read:metrics`, provider only offers `read:telemetry`) fails closed and cleanly. A *dynamic* re-negotiation where the provider returns `read:telemetry` with an added `scope_extends: read:metrics` annotation — because the provider's own policy engine upgraded its trust tier after the consumer's prior session was logged as "verified" — causes the consumer's broker to admit messages it would have rejected at session-open time. The invariant that breaks is **monotonic non-widening of the admitted message set across a session's lifetime**. ## What Was Observed A consumer instance in org A (auditor role) federates with a provider in org B (telemetry service). Initial handshake at `t0`: ``` CONSUMER → PROVIDER: negotiate(capabilities=["read:telemetry:v2"], warrant=W_A) PROVIDER → CONSUMER: grant(capabilities=["read:telemetry:v2"], constraints={max_rate: 50/s, ttl: 3600}, scope_extends=[]) ``` At `t0 + 1800s`, a broker reconnect fires (provider-side rolling restart). The consumer's transport layer automatically re-issues the negotiate call, but with a *reconstructed* warrant derived from the cached session state rather than the original signed warrant. The provider, seeing a warrant it cannot fully verify against its own trust root, falls back to its **degraded-verification path**: it re-issues the grant but annotates `scope_extends=["read:telemetry:aggregate"]` to signal "we couldn't verify the narrow scope, so we're widening to the aggregate tier where the policy is coarser." The consumer's policy engine receives `scope_extends=["read:telemetry:aggregate"]`. Its admission rule is `admit(msg) iff msg.scope ∈ granted_scopes ∪ scope_extends`. It admits. The consumer now receives aggregate telemetry across *all* tenants in org B, not just the tenant named in the original warrant. The failure trace: 1. `t0`: session opened, `granted_scopes = {read:telemetry:v2}`, `scope_extends = {}`. 2. `t0+1800`: transport reconnect triggers re-negotiate with cached (unsigned) warrant. 3. Provider degraded-verification path returns widened grant. 4. Consumer policy engine evaluates `admit` against the *new* grant set, not the session-original set. 5. `t0+1801`: first aggregate message admitted. No alert fires because the message passes schema validation and the audit log records "scope: read:telemetry:aggregate" as a *permitted* scope. The audit log is the trap: it records what was admitted, not what *changed*. Post-hoc review sees a coherent session with a widened grant and no violation, because the widening was itself a legitimate provider response. ## Condition of Validity This failure requires four conditions to co-occur: - **Re-negotiation is transport-triggered, not policy-triggered.** The consumer's transport layer owns the reconnect and re-negotiate loop; the policy engine is downstream and sees only the resulting grant. - **The provider has a degraded-verification path that widens rather than narrows.** This is the non-obvious bit: most providers fail closed (deny) when warrant verification fails. Some fail *open to a coarser tier* because the coarse tier's policy is simpler to evaluate. This is a defensible engineering choice in isolation and a federation hazard in composition. - **The consumer's admission predicate is `granted ∪ extends` without a session-original baseline.** If the predicate is `granted ∩ session_original_granted`, the widening is inert. - **The audit log records admitted scopes without recording the grant delta.** Review cannot detect the widening because it never sees the transition. The invariant to enforce: **for any session `S`, `admitted_scopes(S, t) ⊆ admitted_scopes(S, t0)` for all `t > t0`, unless an explicit re-authorization event signed by the consumer's policy authority has occurred.** Re-negotiation may *narrow* or *restate* the grant; it may not widen it without out-of-band authorization. ## Decision Boundary The boundary is between two re-negotiation semantics: - **Restate-or-narrow**: re-negotiation is treated as a freshness check on an existing grant. The consumer accepts a new grant only if it is a subset of the session-original grant; otherwise it tears down the session and requires fresh authorization. - **Re-authorize**: re-negotiation is treated as a new session. The consumer discards the old grant set and adopts the new one wholesale, subject to its standing policy for the provider's trust domain. The failure occurs when the implementation *intends* restate-or-narrow but *executes* re-authorize because the transport layer's reconnect path and the policy engine's grant-adoption path were built by different teams with different assumptions about who owns the session baseline. The transport team assumed the policy engine would intersect; the policy team assumed the transport would not re-negotiate without signaling. The decision rule for operators: **if the reconnect path can call `negotiate` without a policy-engine-issued re-authorization token, the deployment is in the re-authorize regime whether it intends to be or not.** Audit for this by grepping the transport's reconnect handler for the presence of a re-auth token in the negotiate payload. Absence of the token is the tell. ## Operational Effect In the observed deployment, the widening persisted for 47 minutes until a human reviewer noticed aggregate-tier message volume in a tenant-scoped dashboard. The blast radius was bounded only by the provider's `max_rate: 50/s` constraint surviving the re-negotiation — a coincidence of the constraint being restated in the widened grant, not a designed safeguard. The durable fix is not "deny on degraded verification" (that breaks availability during provider restarts). The fix is a **session-baseline guard** in the consumer's policy engine: the engine stores `session_original_granted` at `t0`, and every subsequent grant — whether from initial negotiation or re-negotiation — is intersected with it. A widening grant is logged as a `grant_widening_attempt` event and the excess scopes are dropped, not admitted. The provider's degraded-verification path remains available for availability, but its widening effect is neutralized at the consumer's admission boundary. The secondary fix is **grant-delta auditing**: the audit log must record `(previous_granted, new_granted, delta)` per re-negotiation, not just the admitted scope per message. Without the delta, the failure is invisible in review. ```python from dataclasses import dataclass, field from typing import FrozenSet class CapabilityWideningError(RuntimeError): """Raised when a re-negotiated grant exceeds the session-original grant without an accompanying policy-authority re-authorization token.""" @dataclass class Grant: scopes: FrozenSet[str] reauth_token: str | None = None @dataclass class Session: session_id: str original_granted: FrozenSet[str] current_granted: FrozenSet[str] = field(default_factory=frozenset) def __post_init__(self) -> None: self.current_granted = self.original_granted def adopt_renegotiated_grant(session: Session, incoming: Grant) -> FrozenSet[str]: """ Adopt a re-negotiated grant under the restate-or-narrow invariant. A re-negotiation may restate or narrow the session-original grant. It may not widen it unless the incoming grant carries a re-authorization token issued by the consumer's policy authority. """ widened = incoming.scopes - session.original_granted if widened and incoming.reauth_token is None: # Neutralize the widening: intersect with the session baseline. # The excess scopes are dropped, not admitted. admitted = incoming.scopes & session.original_granted session.current_granted = admitted raise CapabilityWideningError( f"session={session.session_id} re-negotiation attempted to widen " f"grant by {sorted(widened)} without reauth_token; " f"excess scopes dropped, admitted={sorted(admitted)}" ) if widened and incoming.reauth_token is not None: # Out-of-band authorization: adopt wholesale, but record the delta. session.current_granted = incoming.scopes return incoming.scopes # Restate-or-narrow: safe to adopt. session.current_granted = incoming.scopes return incoming.scopes def admit_message(session: Session, msg_scope: str) -> bool: if msg_scope not in session.current_granted: return False # Defense in depth: never admit beyond the session baseline, even if # current_granted was corrupted by an upstream bug. return msg_scope in session.original_granted or session.current_granted <= session.original_granted ```