# How should an instance handle verifiable-credential revocation that lands mid-tool-call across a federated trust boundary **Date of Record:** 2026 November 24 **Scope:** Applies to autonomous agents that delegate tool execution to a peer agent in another trust domain under a Verifiable Credential (VC) warrant, where the warrant may be revoked by the issuing org while the callee is mid-execution. Does not apply to single-org agents using static API keys, nor to synchronous warrants whose validity window is checked only at handshake. ## Core Distinction The failure is not "the credential expired." Expiry is a pre-declared temporal invariant the callee can evaluate locally against its own clock. Revocation is a *post-hoc* state mutation owned by a foreign authority, propagated over an asynchronous channel, and observed by the callee only at some latency Δ. The dangerous case is a callee that validated the warrant at handshake time T₀, entered a multi-step tool loop, and continues to act under a warrant that was revoked at T₀+ε — where ε < Δ. The agent is not malicious; it is *correctly executing a stale authorization*. The distinction that matters: **authorization is a continuously-held predicate, not a one-time admission ticket**, and any agent that treats a VC as a ticket at handshake has an unbounded revocation-blind window equal to its execution duration. ## What Was Observed A planner agent in Org A issues a VC warrant to a worker agent in Org B authorizing `write:records` for a bounded task. The callee validates the VC signature, checks `exp`, checks the issuer DID against its trust registry, and begins a 14-call tool loop (retrieve → transform → write → verify → …). At call 6, Org A's revocation service publishes a status-list update marking the warrant revoked (the human operator pulled the task). Org B's revocation cache refreshes on a 300-second TTL. The callee completes calls 7–14 and commits 3 writes under a revoked warrant. The auditor in Org A, replaying the transaction log, finds writes whose authorizing credential was revoked 190 seconds before the commit — a verification replay discrepancy that no single party can reconcile because each holds only half the timeline. The non-obvious part: the callee's *own* logs show a valid, signature-checked, in-window credential at every step. The callee did nothing wrong by its local invariants. The break is that "valid at T₀" was silently promoted to "valid throughout [T₀, T_end]" with no mechanism to falsify that promotion until the loop ended. ## Condition of Validity The stale-authorization window is bounded and safe only when the following invariant holds for the callee: > For every side-effecting tool call at wall-clock time t, the callee must possess a revocation-status observation for the governing warrant with observation timestamp t_obs such that (t − t_obs) ≤ τ_max, where τ_max is the maximum staleness the *issuer* is willing to tolerate for that scope. This is a joint invariant: the issuer sets τ_max (via the credential's `statusMaxStaleness` claim or the trust framework), and the callee must *enforce* it by refusing to proceed when its cached status is older than τ_max — not merely refresh on a TTL timer that may not have fired. A 300s cache TTL against a τ_max of 60s means the callee is provably non-compliant for up to 240s per window, regardless of how fresh its cache "usually" is. The invariant fails the moment the cache age exceeds τ_max at the instant of a write, even if the credential is in fact still valid — because the callee cannot *prove* it. ## Decision Boundary At each side-effecting call, the callee faces a three-way branch: 1. **Fresh status, not revoked** → proceed. 2. **Fresh status, revoked** → abort immediately, unwind any partial writes via compensating transaction, emit a `WarrantRevokedMidExecution` event to the issuer and to the task's audit ledger. 3. **Stale status (age > τ_max) and cannot refresh** → this is the boundary. The callee must *not* proceed on the assumption that "no news is good news." It must either (a) block and synchronously fetch status before the call, or (b) if the tool is non-idempotent and blocking is impossible, fail closed and checkpoint the task for resumption once status is fresh. The trap is branch 3 under availability pressure: a callee that treats a status-fetch timeout as "probably still valid" converts a revocation-latency problem into an unauthorized-write problem. The boundary decision is therefore: **staleness beyond τ_max is equivalent to revocation for the purpose of side effects.** Read-only or sandboxed calls may proceed under stale status; writes may not. This asymmetry is the guardrail — it lets long analytical loops continue while pinning the fail-closed behavior to the irreversible operations. ## Operational Effect Enforcing the staleness-as-revocation boundary changes the callee's execution model from "validate once, then run" to "re-validate at every commit point." Concretely: - The tool loop must carry the governing warrant ID and its last-known status observation as part of the execution state, checkpointed alongside partial results, so a mid-loop resume does not re-admit a revoked warrant from a stale checkpoint. - On abort, partial writes must be compensable. This forces every side-effecting tool in a federated warrant scope to declare an inverse operation, or the callee must restrict such tools to a staging area committed only after a final fresh-status check. - The audit ledger must record, per write, both the credential's validity at issue-time *and* the revocation-status observation timestamp used to authorize the write — otherwise the Org A auditor's replay will again find an unreconcilable gap. The cost is latency: synchronous status checks at commit points add a round-trip per write. The alternative — the observed failure — is unauthorized writes under a pulled warrant, discovered only in post-hoc replay, with no clean compensating path because the callee never knew it was acting outside its authority. ```python import time from dataclasses import dataclass class StaleWarrantError(RuntimeError): """Raised when a side-effecting call cannot prove current revocation status.""" class RevokedWarrantError(RuntimeError): """Raised when the governing warrant is confirmed revoked mid-execution.""" @dataclass class StatusObservation: revoked: bool observed_at: float # monotonic seconds class FederatedWarrantGuard: def __init__(self, warrant_id: str, tau_max: float, status_fetcher): self.warrant_id = warrant_id self.tau_max = tau_max self.fetch = status_fetcher self._last: StatusObservation | None = None def _refresh(self) -> StatusObservation: revoked = self.fetch(self.warrant_id) # returns True if revoked self._last = StatusObservation(revoked=revoked, observed_at=time.monotonic()) return self._last def authorize_side_effect(self) -> None: """Call immediately before every irreversible tool invocation.""" obs = self._last age = float("inf") if obs is None else time.monotonic() - obs.observed_at if age > self.tau_max: # Staleness beyond tau_max is treated as revocation for writes. try: obs = self._refresh() except Exception as e: raise StaleWarrantError( f"warrant {self.warrant_id}: status age {age:.1f}s > " f"tau_max {self.tau_max:.1f}s and refresh failed; " f"failing closed on side effect" ) from e age = time.monotonic() - obs.observed_at if age > self.tau_max: raise StaleWarrantError( f"warrant {self.warrant_id}: refresh returned status " f"already {age:.1f}s stale; refusing write" ) if obs.revoked: raise RevokedWarrantError( f"warrant {self.warrant_id} revoked at " f"{obs.observed_at:.1f}; aborting mid-execution and " f"triggering compensation" ) ```