# Which invariants prevent transitive trust-anchor collapse during cross-org agent federation capability re-attestation **Date of Record:** 2026 November 28 **Scope:** Applies to federated multi-org agent meshes where an agent in domain A delegates a task to an agent in domain B, whose capability attestation is itself vouched for by a third domain C (a trust anchor). Does not apply to single-org deployments or to federations where every attestation is signed directly by the consuming domain. ## Core Distinction The failure is not "a malicious peer lies about its capabilities." It is the *transitive trust-anchor collapse*: when domain A accepts domain B's capability attestation because B's attestation is countersigned by trust anchor C, A silently imports C's *entire* policy authority into B's decision scope. The distinction that matters is between **delegation of identity** (C vouches that B is who it claims) and **delegation of authority** (C vouches that B may exercise a capability). Federation protocols routinely conflate the two in a single attestation token, and the conflation is invisible until a capability is re-attested mid-task after a policy negotiation, at which point the re-attestation chain can resolve to a *different* anchor than the original, widening the authority scope without any single party making a decision to widen it. A second, sharper distinction: **anchor identity is stable; anchor policy is not.** A trust anchor C is a cryptographic keypair whose identity persists, but the *policy set* C endorses at time T1 (when A first accepted the chain) can differ from the policy set at T2 (when a re-attestation is requested mid-task). Most federation implementations cache the anchor identity and re-resolve the policy, or vice versa, but never bind the two into a single versioned tuple. That asymmetry is the failure surface. ## What Was Observed A three-domain federation: `alpha` (orchestrator), `beta` (executor with tool access), `gamma` (trust anchor). `alpha` dispatched a multi-step task to `beta` with an attestation token `att(beta, cap=tool:payments:read, anchor=gamma, policy_version=7)`. The task ran for 41 minutes across 14 tool calls. At call 11, `beta` requested a re-attestation because its short-lived capability token (TTL 30 min) expired mid-execution. The re-attestation flow: 1. `beta` requests fresh attestation from `gamma`. 2. `gamma` issues `att(beta, cap=tool:payments:read+tool:payments:write, anchor=gamma, policy_version=9)`. Between T1 and T2, `gamma` had performed a routine policy negotiation with a partner domain and, as a side effect of a merge conflict in the policy bundle, `beta`'s role mapping was widened from `payments-reader` to `payments-operator`. This was not an intended grant; it was a policy-merge artifact. 3. `alpha` validates the new token: signature chains to `gamma` (correct), `gamma` is a trusted anchor (correct, cached), `beta` is the claimed subject (correct). `alpha` does **not** compare `policy_version=9` against the `policy_version=7` it originally authorized, because the original authorization record stored only the anchor *identity*, not the anchor *policy version*. 4. `alpha` admits the widened token. `beta` proceeds to call `tool:payments:write` at call 12. The write succeeded. No agent made a wrong decision at any single step. `gamma`'s policy merge was a legitimate (if buggy) operation. `alpha`'s validation was correct against the token it received. `beta`'s re-attestation request was correct given its TTL. The failure is purely in the **invariant**: *the authority scope of a re-attested capability must be a subset of the authority scope authorized at task dispatch, unless an explicit scope-widening decision is recorded.* That invariant was never enforced because it was never stated. The system enforced "the anchor is trusted" (identity invariant) but not "the anchor's endorsement is monotone across the task lifetime" (authority invariant). A second observation from the same incident: when `alpha`'s audit log was replayed against `gamma`'s issuance log, the two disagreed on the policy version in effect at call 11. `alpha` logged `policy_version=7` (from the cached dispatch record) while `gamma` logged `policy_version=9` (from issuance). The replay discrepancy is the *detectable symptom*; the collapse is the *cause*. Any post-hoc auditor reconciling the two logs would see a version mismatch and could not reconstruct which authority was actually exercised. ## Condition of Validity The transitive-collapse failure requires all of the following to hold simultaneously: - **Long-lived tasks with short-lived capability tokens.** If the capability TTL exceeds the task duration, no mid-task re-attestation occurs and the window closes. The failure is a function of `task_duration > min(capability_ttl)`. - **A trust anchor whose policy set is mutable independently of its identity.** Immutable-policy anchors (e.g., anchors that require a new keypair per policy version) are immune because a policy change forces an anchor identity change, which `alpha` *would* detect against its cached trusted-anchor set. - **A validator that caches anchor identity but re-resolves anchor policy at validation time** (or vice versa). The asymmetry is the load-bearing condition. A validator that caches both, or re-resolves both, does not collapse—it either rejects the new token (cached policy) or re-authorizes from scratch (re-resolved identity). - **No monotonicity check on the re-attested scope.** If the validator enforces `new_scope ⊆ dispatched_scope`, the widened `payments:write` is rejected regardless of anchor policy version. The failure does **not** occur when: the anchor rotates keypairs per policy version (identity change is detected); the task is shorter than the token TTL; the validator performs full re-authorization on re-attestation (treating it as a new dispatch, which surfaces the scope widening as an explicit decision); or the federation mandates scope-monotone re-attestation. ## Decision Boundary The boundary is between two defensible designs, and choosing wrong is silent: **Design A — Anchor identity is the trust unit.** Cache the trusted-anchor set. On re-attestation, validate the signature chain to a cached anchor and accept the token's scope. This is simple, fast, and correct *only if* anchor policy is immutable per identity. It is the design that collapsed above. **Design B — (Anchor identity, policy version) tuple is the trust unit.** Cache the tuple `(anchor_id, policy_version)` at dispatch. On re-attestation, require the new token's tuple to match the dispatched tuple, *or* require an explicit scope-widening authorization record signed by the dispatching domain's policy authority. This bounds the collapse but requires the federation to version policy bundles and to expose the version in the attestation token. The decision boundary is crossed when a federation adopts Design A for latency reasons (tuple comparison requires the anchor to expose policy versions, which many anchors do not) but operates in an environment where anchor policy is mutable. The correct move is not to switch wholesale to Design B—that breaks interoperability with anchors that do not version policies—but to add a **scope-monotonicity guard** that is independent of policy versioning: on every re-attestation, assert `new_scope ⊆ dispatched_scope`. This guard catches the collapse even under Design A, because the widened `payments:write` is not a subset of the dispatched `payments:read`. The guard is cheap (set containment on capability strings) and does not require anchor cooperation. The residual gap after adding the guard: a policy-merge artifact that *narrows* scope (e.g., drops `payments:read`) passes the subset check but breaks the task mid-execution. That is a different failure (capability regression, not escalation) and is handled by a separate invariant—re-attestation must be scope-*preserving* on the dispatched capabilities, not merely non-widening. Both invariants together give `dispatched_scope ⊆ new_scope ⊆ dispatched_scope`, i.e., equality, unless an explicit widening record exists. ## Operational Effect After the incident, the federation adopted three changes: 1. **Dispatch records store the full authority tuple**, not just anchor identity: `(anchor_id, policy_version, scope_set, dispatch_timestamp)`. 2. **Re-attestation is gated by a scope-equality check** unless an explicit `ScopeWideningAuthorization` record (signed by `alpha`'s policy authority, referencing the dispatch record) is presented. The check is enforced in the validator, not in the agent, because agents are probabilistic and will rationalize a widened scope as "probably fine." 3. **Audit replay reconciles on the tuple, not the identity.** Any replay that finds `alpha` and `gamma` disagreeing on `policy_version` for the same token is flagged as a collapse-suspect, even if the scopes happen to match, because the disagreement indicates the validator and issuer were operating on different policy views. The operational lesson for agent systems specifically: **agents will not notice a widened capability unless the widening violates a check they are forced to run.** `beta` did not "decide" to write payments; it was granted the capability and used it, because from `beta`'s perspective the token was valid and the tool was available. The guard must live in the validator's admission path, where it is a deterministic set-containment test, not in any agent's reasoning loop, where it is a probabilistic judgment about whether a token "looks right." ```python from dataclasses import dataclass from typing import FrozenSet class TrustAnchorCollapseError(RuntimeError): """Raised when a re-attested capability's authority scope exceeds the authority authorized at task dispatch, without an explicit widening record.""" @dataclass(frozen=True) class DispatchRecord: anchor_id: str policy_version: int scope: FrozenSet[str] dispatch_ts: float @dataclass(frozen=True) class ReAttestation: anchor_id: str policy_version: int scope: FrozenSet[str] issued_ts: float def validate_re_attestation( dispatch: DispatchRecord, re_att: ReAttestation, widening_authorization_present: bool, ) -> None: # Invariant 1: anchor identity must not change mid-task. if re_att.anchor_id != dispatch.anchor_id: raise TrustAnchorCollapseError( f"anchor identity changed mid-task: dispatched {dispatch.anchor_id!r}, " f"re-attested {re_att.anchor_id!r}" ) # Invariant 2: scope must be non-widening (subset of dispatched scope), # unless an explicit widening authorization record is presented. widened = re_att.scope - dispatch.scope if widened and not widening_authorization_present: raise TrustAnchorCollapseError( f"transitive trust-anchor collapse: re-attestation widened scope by " f"{sorted(widened)} under anchor {re_att.anchor_id!r} " f"(policy_version {dispatch.policy_version} -> {re_att.policy_version}) " f"with no signed ScopeWideningAuthorization" ) # Invariant 3: scope must be non-regressing on dispatched capabilities, # otherwise the task breaks mid-execution (capability regression). regressed = dispatch.scope - re_att.scope if regressed: raise TrustAnchorCollapseError( f"capability regression: re-attestation dropped dispatched capabilities " f"{sorted(regressed)}; task cannot continue under reduced authority" ) # Invariant 4: if policy_version drifted, flag for audit reconciliation # even when scopes happen to match, because validator and issuer were # operating on different policy views. if re_att.policy_version != dispatch.policy_version: # Non-fatal but must be recorded; escalation is a policy decision. # In strict mode this is a hard failure. raise TrustAnchorCollapseError( f"policy_version drift without scope change: " f"{dispatch.policy_version} -> {re_att.policy_version}; " f"audit replay will disagree on effective authority" ) ```