# Which invariants prevent delegated-capability replay forks from silently diverging audit trails across federated agent trust brokers **Date of Record:** 2026 November 19 **Scope:** Applies to cross-organization agent federations where a trust broker (an entity that mints signed capability warrants on behalf of a principal) delegates scoped capabilities to remote agents whose execution is later replayed or audited by a *different* org's verifier. Does not cover single-tenant intra-org tool calling, nor stateless RPC where no warrant is minted. ## Core Distinction The failure is not "a warrant was forged" and not "an agent exceeded its scope." Those are loud. The boundary failure here is a **replay fork**: two verifiers, in two different orgs, each holding a cryptographically valid copy of the same capability warrant, independently resolve the *delegation chain* to different terminal states because the warrant's validity is a function of mutable broker-side state (a revocation epoch, a counter, a parent-warrant attenuation) that was never bound into the signed payload at mint time. Concretely: a warrant `W` carries `{subject, scope, expiry, parent_hash, signature}`. The verifier in Org B checks `signature`, `expiry`, and `parent_hash` against the parent it was handed. All pass. But the *broker* in Org A attenuated the parent's scope after minting `W` — not by revoking `W`, but by narrowing what the parent authorizes. Org A's own verifier re-derives `W`'s effective scope as the intersection with the *current* parent scope and rejects the call. Org B, holding only the snapshot of the parent at handoff time, computes the intersection with the *stale* parent scope and accepts. Both are internally consistent. The audit trails diverge on the same logical action. This is a continuity invariant failure, not an authentication failure — the crypto is intact; the *meaning* of the capability is time-dependent and the dependency was not signed. ## What Was Observed A planner agent `P` (Org A) delegated a `read:dataset` capability to an executor agent `E` (Org B) via a brokered warrant. `E` executed a batch of 4,000 reads over ~90 seconds. During that window, `P`'s principal narrowed the parent grant from `read:dataset/{a,b,c}` to `read:dataset/{a}` — a routine least-privilege tightening, expressed as a *new parent warrant version*, not a revocation. Observed trace: 1. `t0` — Broker mints `W_E` with `parent_hash = H(parent_v1)`, scope `read:dataset/{a,b,c}`. `W_E` is valid, signed, unexpired. 2. `t1` — Org B verifier validates `W_E` against cached `parent_v1`. Accepts. `E` reads from `c`. 3. `t2` — Org A issues `parent_v2` (scope `{a}`). `W_E` is untouched; no revocation event emitted because `W_E` was never explicitly revoked. 4. `t3` — Org B verifier still validates `W_E` against cached `parent_v1` (cache TTL 300s). Accepts. `E` continues reading `b` and `c`. 5. `t4` — Audit reconciliation. Org A's verifier re-evaluates `W_E` against `parent_v2`, computes effective scope `{a}`, and flags 2,900 reads as **out-of-scope**. Org B's trail marks the identical reads as **authorized**. The two audit trails are individually coherent, cryptographically sound, and mutually contradictory. The divergence count (2,900) is a function of the cache TTL and the read rate, not of any malicious action. No agent misbehaved. The invariant that failed: *a delegated capability's effective scope must be a pure function of its signed bytes and a monotonic, verifiable revocation/attenuation state that both verifiers can resolve identically.* ## Condition of Validity The fork is bounded — and the invariant restored — only when **all three** of the following hold simultaneously: - **Attenuation is signed and monotonic.** Any narrowing of a parent's scope must be published as a signed, ordered event (`parent_v1 → parent_v2`) that names the superseded hash. A verifier that cannot resolve the *latest* parent version for a given `parent_hash` lineage must treat the warrant as `INDETERMINATE`, not `VALID`. - **Warrant carries a broker-epoch binding.** The warrant payload includes `broker_epoch` (a monotonic counter or Merkle root of the broker's delegation state at mint time). Verifiers reject any warrant whose `broker_epoch` is older than the epoch at which the parent was last attenuated, unless a signed "no-attenuation-since" proof accompanies it. - **Replay is against a pinned epoch, and the pin is recorded in the audit entry.** An audit record must log the `broker_epoch` it was evaluated against. Two records for the same action with different pinned epochs are *expected* to differ and must be reconciled by the newer epoch, not treated as a contradiction. If any one is absent, the system degrades to "whichever verifier has the fresher cache wins," which is exactly the fork. The invariant is not "caches must be fresh" (unenforceable across orgs). It is "staleness must be *detectable and named* in the signed material." ## Decision Boundary The operational choice is where to place the epoch check, and it is a genuine tradeoff: - **Check at execution (fail-closed on stale epoch):** `E`'s verifier refuses any warrant whose `broker_epoch` is behind the latest known parent attenuation. Cost: cross-org execution stalls whenever Org A attenuates, because Org B must round-trip to fetch the new epoch. Latency spike proportional to attenuation frequency. - **Check at audit (fail-open, reconcile later):** `E` executes against its pinned epoch, records the pin, and reconciliation flags divergences for human/automated adjudication. Cost: out-of-scope reads actually happen; the audit trail is *correct but post-hoc*. The correct default is **fail-closed for `write`/`mutate` scopes, fail-open-with-pin for `read` scopes**. The boundary is the side-effect class of the capability, not the org or the agent. A read that slips through on a stale epoch is a disclosure to reconcile; a write that slips through is an irreversible state change in Org B that Org A never authorized. The epoch-pin-in-audit-record requirement applies to *both* paths — it is the thing that makes later reconciliation possible at all. ## Operational Effect Teams that implement only signature + expiry + parent-hash validation (the common baseline) will pass every unit test and every single-org integration test, then discover the fork only during a cross-org audit, at which point the divergent records are indistinguishable from a genuine scope violation. The remediation is not stronger crypto; it is binding the *mutable delegation state* into the signed material via an epoch, and making the epoch a mandatory field of the audit entry. Without the epoch pin, "was this read authorized?" has no org-independent answer, and the audit trail is a record of what each verifier *believed*, not what was *permitted*. ```python from dataclasses import dataclass, field from typing import Optional class DelegationForkError(RuntimeError): """Raised when a delegated warrant cannot be resolved to a single effective scope agreed upon by broker epoch and verifier pin.""" pass @dataclass class Warrant: subject: str scope: frozenset[str] parent_hash: str broker_epoch: int signature: str = "sig" @dataclass class BrokerState: # lineage: parent_hash -> latest epoch at which that lineage was attenuated attenuation_epoch: dict[str, int] = field(default_factory=dict) current_epoch: int = 0 def attenuate(self, parent_hash: str, new_epoch: int) -> None: self.attenuation_epoch[parent_hash] = new_epoch self.current_epoch = max(self.current_epoch, new_epoch) def resolve_effective_scope( warrant: Warrant, broker: BrokerState, verifier_pinned_epoch: Optional[int], ) -> frozenset[str]: """Return the scope both verifiers must agree on, or raise if unresolvable.""" if verifier_pinned_epoch is None: # No pin recorded: cannot prove agreement across orgs. raise DelegationForkError( f"warrant for {warrant.subject} has no verifier epoch pin; " "audit trail cannot be reconciled across orgs" ) latest = broker.attenuation_epoch.get(warrant.parent_hash, 0) if warrant.broker_epoch < latest and verifier_pinned_epoch < latest: # Stale on both sides: the warrant predates an attenuation neither # verifier has observed. Effective scope is indeterminate. raise DelegationForkError( f"warrant epoch {warrant.broker_epoch} precedes parent attenuation " f"epoch {latest} for parent {warrant.parent_hash}; " "scope is INDETERMINATE, not VALID" ) if verifier_pinned_epoch != warrant.broker_epoch: # Pin disagrees with the warrant's mint epoch: replay fork. raise DelegationForkError( f"replay fork: verifier pinned epoch {verifier_pinned_epoch} != " f"warrant broker_epoch {warrant.broker_epoch}" ) return warrant.scope def authorize(warrant: Warrant, broker: BrokerState, pin: Optional[int]) -> frozenset[str]: return resolve_effective_scope(warrant, broker, pin) ```