# Which invariants prevent silent capability escalation when federated agent peers renegotiate policy mid-handoff **Date of Record:** 2026 November 20 **Scope:** Applies to cross-organization agent federation where capability grants are negotiated as versioned policy objects (A2A/MCP-style capability manifests) and where a task may be handed off between peers under different policy epochs. Does not apply to single-tenant deployments with a single static policy authority, nor to purely stateless request/response tool calls that carry no delegated warrant. ## Core Distinction The failure this record isolates is not "a peer revoked a capability" and not "a peer lied about its capabilities." Both are handled by ordinary validation. The non-obvious failure is **capability escalation by re-negotiation across a handoff boundary**: peer A holds a warrant *W* issued under policy epoch *E₁* that grants capability set *C₁*. Mid-task, A hands the task to peer B. B, operating under its own (federated) policy epoch *E₂*, presents a *counter-manifest* that is a superset of *C₁* — and because the handoff protocol treats "the receiving peer's manifest" as the authoritative basis for the next hop, B's superset silently becomes the operative grant for the remainder of the task. No single step violated a check. Every step validated against *some* policy object. The escalation lives in the *transition* between epochs, where the invariant that should bind the new grant to the old one (a monotonic-subset constraint) is absent. The core distinction is between **manifest validation** (does this peer's claimed capabilities parse and match its signature?) and **grant continuity** (is the capability set now in force a subset of the set the originating principal actually authorized?). Federation protocols are rich in the former and routinely silent on the latter. ## What Was Observed A three-org federation: Origin (O) owns the user and the root authorization; Broker (B) routes tasks; Worker (W) executes. O issues warrant *W₀* to B granting `{read:dataset, summarize, write:report}` under policy epoch `E₁` with a delegation-depth limit of 2 and a scope-binding hash `H(W₀)`. The trace: 1. B receives *W₀*, validates signature and scope hash against O's published policy bundle at `E₁`. Pass. 2. B selects W for execution and opens a handoff. In the A2A handshake, W returns its **native capability manifest** under its own epoch `E₂`: `{read:dataset, summarize, write:report, delete:dataset, export:external}`. W legitimately holds these in its home org. 3. B's handoff logic constructs the next-hop warrant *W₁* by **intersecting the incoming warrant with the peer's manifest** — a reasonable-looking "least privilege" step. But the intersection is taken against *W₀'s granted set*, and the code path that computes it reads the *manifest* as the capability universe rather than reading *W₀* as the ceiling. Because `{read, summarize, write}` ⊂ both, the intersection returns `{read, summarize, write}` — correct — **except** the depth counter and scope hash are re-derived from the manifest's epoch `E₂`, not carried from *W₀*. 4. W executes a sub-task that calls for `delete:dataset` as a cleanup step. W's local policy engine checks the *effective* grant, which was reconstructed at step 3 from the `E₂` bundle. Under `E₂`, the scope-binding hash `H(W₀)` no longer matches (it was minted under `E₁`), so the binding check is **skipped as "not applicable to this epoch"** rather than failed. The delete proceeds. 5. O's audit log shows *W₀* fully honored and unmodified. W's audit log shows a `delete:dataset` covered by a valid `E₂` grant. Neither log shows an escalation. The reconciliation only surfaced when O's data-retention job found a deleted shard with no corresponding `E₁`-authorized deletion. The escalation was not in any single grant. It was in the **epoch transition at the handoff**, where re-deriving the warrant from the receiver's manifest reset the scope-binding anchor. The invariant that failed: *a delegated warrant's scope-binding anchor must be immutable across epoch transitions; re-derivation from a peer manifest is forbidden.* ## Condition of Validity The monotonic-subset + immutable-anchor invariant holds **only** when the following conditions are jointly true: - Every warrant carries a scope-binding anchor (hash of the originating principal's authorization) that is **copied, never recomputed**, at each hop. Any hop that recomputes the anchor from the local epoch is a violation regardless of whether the resulting set is a subset. - The effective grant at hop *n* is computed as `grantₙ = grantₙ₋₁ ∩ manifestₙ ∩ policy_ceilingₙ`, where `grantₙ₋₁` is the *carried* grant, not a re-derivation. The carried grant is the only source of authority; the manifest is only a *filter*, never an *origin*. - Delegation depth is decremented on the carried warrant, not reset from the manifest's declared depth. - Epoch mismatch between `E₁` (anchor) and `E₂` (executor) is a **hard fail-closed condition** unless an explicit cross-epoch trust statement (a signed bridge) exists that binds `E₁`'s anchor to `E₂`'s policy bundle. The invariant is **not** valid — and must not be assumed — when: the receiving peer is the *originating* principal (no delegation, anchor is self-minted); when a signed epoch-bridge explicitly authorizes re-anchoring (then the bridge's own anchor becomes the new immutable anchor); or when the task is a pure stateless tool call with no delegated warrant (there is nothing to carry). ## Decision Boundary The operational decision is: **at a handoff where the receiver's policy epoch differs from the warrant's anchor epoch, do you (a) fail closed, (b) require a signed epoch-bridge, or (c) proceed on the receiver's manifest?** The boundary is sharp and should not be left to per-hop judgment: - If `anchor_epoch == receiver_epoch` → proceed; intersect carried grant with manifest; carry anchor unchanged. - If `anchor_epoch != receiver_epoch` **and** a valid signed bridge binds the two epochs with the same anchor → proceed; the bridge's anchor replaces the old one and becomes immutable for subsequent hops. - If `anchor_epoch != receiver_epoch` **and** no bridge → **fail closed**. Do not "intersect and continue." Do not treat the mismatch as "not applicable." The absence of a bridge is the signal that the escalation path is open. The subtle boundary — the one that produced the incident — is the temptation to treat epoch mismatch as a *soft* condition because the capability sets happen to overlap. Overlap is not authorization. A set that is a subset under one epoch can be a superset of authority under another, because the *meaning* of a capability (what `delete:dataset` scopes to, what `export:external` may reach) is epoch-relative. Set-subset checks on capability *names* are therefore insufficient; the anchor, not the name-set, is the unit of continuity. ## Operational Effect Enforcing the immutable-anchor invariant changes federation behavior in three concrete ways: 1. **Handoffs across epochs become explicit, auditable events.** Every cross-epoch hop either carries a bridge (logged with the bridge's signature and anchor) or fails closed (logged as a refused handoff). The silent-escalation window — where a hop validated against *some* policy but no policy bound it to the origin — is eliminated by construction. 2. **The receiver's manifest is demoted to a filter.** A peer can no longer expand its effective grant by advertising more; it can only narrow what the carried warrant already permits. This inverts the default from "trust the receiver's self-description, intersect for safety" to "trust only the carried authority, filter by the receiver's honest limits." 3. **Audit reconciliation becomes a single-anchor check.** Instead of correlating logs across epochs (which failed in the incident because each log was internally consistent), reconciliation reduces to: does every executed action trace to the *same* immutable anchor as the originating authorization? A mismatch is a hard finding, not a heuristic. The cost is that federations must maintain signed epoch-bridges for every legitimate cross-epoch path, and handoffs that previously "just worked" (because sets overlapped) now fail closed until a bridge is provisioned. That friction is the invariant working: it converts a silent escalation into a loud, provisionable dependency. ```python import hashlib from dataclasses import dataclass, field class CapabilityEscalationError(RuntimeError): """Raised when a handoff would re-anchor a warrant across policy epochs without a signed bridge, opening a silent-escalation path.""" pass @dataclass(frozen=True) class Warrant: grant: frozenset[str] anchor: str # hash of originating principal's authorization anchor_epoch: str depth_remaining: int @dataclass(frozen=True) class Manifest: capabilities: frozenset[str] epoch: str @dataclass(frozen=True) class EpochBridge: from_epoch: str to_epoch: str binds_anchor: str signature: str def _valid_bridge(bridge: EpochBridge, carried: Warrant, receiver_epoch: str) -> bool: # A bridge is valid only if it binds the *same* anchor and spans the gap. return ( bridge.from_epoch == carried.anchor_epoch and bridge.to_epoch == receiver_epoch and bridge.binds_anchor == carried.anchor and bool(bridge.signature) ) def handoff( carried: Warrant, manifest: Manifest, bridge: EpochBridge | None, ) -> Warrant: if carried.depth_remaining <= 0: raise CapabilityEscalationError( f"delegation depth exhausted at anchor {carried.anchor[:12]}" ) if carried.anchor_epoch == manifest.epoch: effective_anchor = carried.anchor effective_epoch = carried.anchor_epoch else: if bridge is None or not _valid_bridge(bridge, carried, manifest.epoch): # Fail closed: never re-anchor from the receiver's manifest. raise CapabilityEscalationError( f"epoch mismatch {carried.anchor_epoch}->{manifest.epoch} " f"with no bridge binding anchor {carried.anchor[:12]}; " f"refusing handoff (would enable silent capability escalation)" ) effective_anchor = bridge.binds_anchor effective_epoch = bridge.to_epoch # Manifest is a FILTER only; carried grant is the sole origin of authority. new_grant = carried.grant & manifest.capabilities if not new_grant: raise CapabilityEscalationError( "intersection empty: receiver manifest grants no carried capability" ) return Warrant( grant=new_grant, anchor=effective_anchor, anchor_epoch=effective_epoch, depth_remaining=carried.depth_remaining - 1, ) def demo() -> None: w0 = Warrant( grant=frozenset({"read:dataset", "summarize", "write:report"}), anchor=hashlib.sha256(b"origin-authz").hexdigest(), anchor_epoch="E1", depth_remaining=2, ) w_manifest = Manifest( capabilities=frozenset( {"read:dataset", "summarize", "write:report", "delete:dataset", "export:external"} ), epoch="E2", ) # No bridge: must fail closed rather than re-anchor to E2. try: handoff(w0, w_manifest, bridge=None) except CapabilityEscalationError as e: print(f"[refused as expected] {e}") # With a signed bridge binding the SAME anchor, handoff proceeds, # and the carried grant (not the manifest) remains the ceiling. bridge = EpochBridge( from_epoch="E1", to_epoch="E2", binds_anchor=w0.anchor, signature="sig:O->E1->E2", ) w1 = handoff(w0, w_manifest, bridge=bridge) assert "delete:dataset" not in w1.grant assert w1.anchor == w0.anchor and w1.depth_remaining == 1 print(f"[bridged ok] grant={sorted(w1.grant)} anchor_epoch={w1.anchor_epoch}") if __name__ == "__main__": demo() ```