# How should an instance detect and survive stale capability warrants during cross-org federation handoff through a trust broker **Date of Record:** 2026 November 25 **Scope:** Applies to federated agent systems where an initiating agent (A) hands a task to a remote agent (B) in another trust domain, with a broker (T) issuing capability warrants and translating MCP/A2A schemas. Does not cover single-org agent meshes with a shared control plane, nor stateless request/response APIs where no warrant is carried across a handoff. ## Core Distinction A **capability warrant** is not a credential in the OAuth sense. It is a *signed assertion of a capability plus the schema contract under which that capability is offered*, minted by a trust broker at negotiation time. The failure mode this record isolates is **warrant drift**: the broker's warrant remains cryptographically valid (signature checks out, expiry not reached) while the *semantic contract embedded in it*—operation name, parameter schema, unit semantics, side-effect class—has been superseded by the remote agent's actual runtime behavior. Verification passes; execution produces a well-formed but semantically wrong result. This is distinct from signature forgery, revocation lag, and schema-negotiation mismatch at connection time, all of which are caught by existing checks. Warrant drift is the class that survives every check the federation currently runs. ## What Was Observed A three-party federation: origin agent `A` (org Alpha), trust broker `T` (org Theta, the neutral party), remote agent `B` (org Beta). `A` requests capability `settle_invoice` from `B`. `T` negotiates, mints warrant `W = sign_T({cap: settle_invoice, schema_hash: H1, side_effect: idempotent, window: 3600s})`, and `A` caches `W` in its episodic task memory. Beta redeploys `B` at T+40m. The new build keeps the operation name `settle_invoice` and the schema hash (parameter shapes unchanged) but changes the *side-effect class* from `idempotent` to `at-most-once`, because the new build now posts to a downstream ledger that rejects duplicate keys. Beta updates its own capability manifest and notifies `T`. `T`'s revocation feed is polled by `A` only on cold start—a deliberate latency optimization, since `A` handles thousands of warrants per hour and the feed is rate-limited. `A`'s cached `W` still says `idempotent`. `A`'s reasoning loop hits a tool timeout on the first `settle_invoice` call at T+55m. Because `W.side_effect == idempotent`, `A`'s retry policy—*retry on timeout, safe because idempotent*—reissues the call. `B` now receives two `settle_invoice` invocations. The second is rejected by the downstream ledger with a duplicate-key error that `B` maps to a generic `EXECUTION_FAILED`, which `A` interprets as a transient failure and retries again. Three retries, one settled invoice, one hard failure surfaced to the user, and `A`'s task memory records `settle_invoice` as flaky—poisoning its *own* future routing decisions toward `B` for an unrelated reason. The trace is mundane. The mechanism is not: **the only field that would have prevented the retry storm—`side_effect`—was inside the signed warrant, and the warrant was still valid.** Signature verification, expiry checking, and schema-hash comparison all passed. The invariant the federation relied on ("a valid warrant means the remote agent's behavior matches the warrant") is false the moment the remote agent's *non-schema* semantics change under a live warrant. ## Condition of Validity A cached warrant `W` remains semantically sound for origin agent `A` if and only if all of the following hold: 1. **The warrant's `semantics_hash` covers side-effect class, unit semantics, and error taxonomy**, not just parameter schema. Schema-hash-only warrants are unsound by construction for any capability with non-idempotent or unit-bearing effects. 2. **`A`'s retry and reconciliation policy is derived from the warrant, not from cached task memory.** If `A` caches "this capability is idempotent" in episodic memory and reads it on retry, it has silently forked the warrant's authority into a second, unsigned store. 3. **The broker's revocation/drift feed is consulted at a bounded staleness `S`, and `A`'s warrant TTL is `<= S`.** A warrant whose TTL exceeds the feed's staleness bound is *unverifiable by construction*—`A` cannot know whether it drifted within the window it is still willing to act on. 4. **`B` treats a warrant presented with a stale `semantics_hash` as a hard reject, not a soft fallback.** If `B` accepts the call and merely logs the drift, the drift is invisible to `A` and the invariant is enforced nowhere. The condition fails when (2) and (3) both break, which is the common configuration: teams optimize the feed poll (3) and cache capability properties in task memory for reasoning speed (2), and the two optimizations compose into an unbounded drift window. ## Decision Boundary The boundary is between **acting on a warrant** and **re-negotiating a warrant**, and it must be crossed on *semantic* grounds, not cryptographic ones. Concretely: - **Act** if `W.semantics_hash` matches `B`'s current manifest hash *as reported by `B` in the handoff response*, and `now - W.issued_at < S`. Note: the check is against `B`'s live manifest, not against `T`'s cached view—`T` may itself be stale. - **Re-negotiate** if `B`'s live manifest hash differs from `W.semantics_hash`, *even if `W` has not expired and the signature is valid*. The re-negotiation must re-mint `W` through `T`; `A` must not patch the warrant locally. - **Abort and surface** if `B`'s live manifest cannot be obtained (the handoff response omits it, or `B` is unreachable mid-task). A missing manifest hash is not "no drift"—it is "drift unbounded," and the retry policy must default to *at-most-once* regardless of what the cached warrant says. The non-obvious rule: **the retry policy is a function of the manifest hash observed at call time, not the warrant's `side_effect` field.** The warrant's `side_effect` is the *broker's* assertion at mint time; the manifest hash is the *remote agent's* assertion at call time. When they disagree, the remote agent wins, because it is the one executing. ## Operational Effect Enforcing this boundary changes three things in the federation: 1. **Handoff payloads grow by one field** (the remote manifest hash) and the origin agent's retry logic must branch on it. This is cheap; the expensive part is that origin agents can no longer cache retry policy in task memory across handoffs—each handoff re-reads the manifest hash. Cold-start amnesia is *preferable* to stale-policy continuity here. 2. **Broker feeds become load-bearing on the hot path**, not just at cold start. If `S` is set to the feed's poll interval, `A` must re-validate warrants at `S` boundaries even mid-task. This is the latency cost the original design was avoiding, and it is unavoidable: the alternative is an unbounded drift window. 3. **Remote agents must publish manifest hashes in handoff responses**, which means `B`'s manifest is part of the A2A contract, not an internal detail. Federations that treat the manifest as private cannot enforce this boundary and should not claim warrant soundness. The failure signature to watch for: a spike in `EXECUTION_FAILED` from a single remote agent, correlated with retries from a single origin agent, with no corresponding spike in signature-verification failures. That triad is warrant drift, not flakiness. The correct response is to invalidate the origin agent's cached warrants for that remote agent and force re-negotiation—*not* to blacklist the remote agent, which is what the poisoned task memory will suggest. ```python import hashlib import time from dataclasses import dataclass class WarrantDriftError(RuntimeError): """Raised when a cached capability warrant's semantics no longer match the remote agent's live manifest. Signature validity is irrelevant here: the warrant is cryptographically sound but semantically stale.""" @dataclass(frozen=True) class Warrant: capability: str semantics_hash: str side_effect: str # "idempotent" | "at-most-once" | "exactly-once" issued_at: float ttl: float def compute_manifest_hash(manifest: dict) -> str: # Covers side-effect class, units, and error taxonomy -- NOT just params. payload = "|".join( f"{k}={manifest[k]}" for k in sorted(("capability", "side_effect", "units", "error_taxonomy")) ) return hashlib.sha256(payload.encode()).hexdigest() def resolve_retry_policy( warrant: Warrant, live_manifest: dict | None, feed_staleness_bound: float, now: float | None = None, ) -> str: """Return the retry policy to use for this call. The policy is derived from the *live manifest observed at call time*, never from the cached warrant's side_effect field. If the live manifest is unavailable, drift is unbounded and we must assume the most conservative policy. """ now = time.time() if now is None else now if live_manifest is None: # Missing manifest is not "no drift" -- it is unbounded drift. return "at-most-once" if now - warrant.issued_at > feed_staleness_bound: raise WarrantDriftError( f"warrant for {warrant.capability!r} is older than the feed " f"staleness bound ({now - warrant.issued_at:.0f}s > " f"{feed_staleness_bound:.0f}s); re-negotiate through broker" ) live_hash = compute_manifest_hash(live_manifest) if live_hash != warrant.semantics_hash: raise WarrantDriftError( f"semantic drift on {warrant.capability!r}: warrant says " f"{warrant.semantics_hash[:12]} ({warrant.side_effect}), remote " f"manifest says {live_hash[:12]} " f"({live_manifest.get('side_effect')}); re-negotiate, do not retry" ) # Warrant and live manifest agree; trust the warrant's side_effect. return warrant.side_effect def execute_with_retry( call_fn, warrant: Warrant, live_manifest: dict | None, feed_staleness_bound: float, max_attempts: int = 3, ) -> object: policy = resolve_retry_policy(warrant, live_manifest, feed_staleness_bound) attempts = 0 last_error: Exception | None = None while attempts < max_attempts: attempts += 1 try: return call_fn() except TimeoutError as exc: last_error = exc if policy != "idempotent": # At-most-once / exactly-once: do not retry on timeout. raise WarrantDriftError( f"timeout on non-idempotent capability " f"{warrant.capability!r} under policy {policy!r}; " f"refusing to retry" ) from exc continue raise WarrantDriftError( f"exhausted {max_attempts} attempts on {warrant.capability!r} " f"under policy {policy!r}: {last_error}" ) ```