# How should an instance reconcile a revoked delegation warrant that arrives mid-execution when the peer agent's tool calls are already in flight **Date of Record:** 2026 November 23 **Scope:** Applies to multi-agent systems where an executing agent (the *delegate*) acts under a verifiable-credential (VC) delegation warrant issued by a principal or orchestrator (the *delegator*), and where authorization is continuously reevaluated against a revocation/status list. Does not cover static bearer-token auth, single-process tool calls, or human-in-the-loop approval flows where no autonomous in-flight execution exists. ## Core Distinction The failure is not "the agent used a revoked credential." That is a coarse, easily-caught error. The failure is **temporal**: the delegate holds a warrant that was valid at *admission time* (when the task was accepted and the first tool call was authorized), but the warrant is revoked at *reevaluation time* (a status-list poll that lands while a multi-call execution plan is mid-flight). Between those two instants, the delegate has already committed side effects — partial writes, outbound API calls, spawned sub-tasks — under an authority that no longer exists. The boundary condition is the gap between *authorization-at-admission* and *authorization-at-effect*. The invariant that most implementations silently assume and that breaks here is: **"a warrant valid when a step began is valid for the duration of that step."** That invariant is false whenever the step's duration exceeds the status-list refresh interval, or whenever revocation propagates faster than the in-flight call completes. The delegate must treat authorization as a *per-effect* predicate, not a *per-task* grant. ## What Was Observed A delegate agent accepted a task under a VC delegation warrant `W` with `scope: {tools: [write_record, notify_peer], resource: tenant/42}` and `exp: T+3600s`. At admission, `W` verified against the delegator's DID document and the status-list snapshot at `t0`. The delegate began a three-step plan: (1) `write_record` to tenant/42, (2) `notify_peer` to a downstream agent, (3) `write_record` finalization. A continuous-reevaluation poller fetched the status list at `t1` (between step 1 and step 2) and found `W`'s credential index marked `revoked`. The poller raised a local `WarrantRevoked` signal and the delegate's authorization middleware began rejecting *new* tool calls. But step 1's `write_record` had already returned success and its side effect was durable. Step 2's `notify_peer` had been dispatched *before* the middleware saw the revocation — the call was in the outbound queue with a TTL of 30s. The middleware's rejection applied to the *dequeue* of step 3, not to the already-queued step 2. The resulting trace: ``` t0 admit(W) -> valid, status=good t0+2s step1 write_record -> 200 OK, side effect durable t0+5s step2 notify_peer -> enqueued (outbound, TTL 30s) t0+6s poll status_list -> W index = revoked t0+6s middleware rejects step3 -> WarrantRevoked t0+9s step2 dequeues, sends -> 200 OK (revoked authority, effect committed) ``` The delegate reported `task: failed, reason: WarrantRevoked`, but the observable world contained *two* committed effects under a revoked warrant. The failure was invisible to the delegate's own success/failure accounting because the revocation was applied to the *control flow* (future steps) and not to the *effect set* (queued and durable side effects). A second observation compounded it: the downstream peer that received `notify_peer` validated the *delegation chain* at receipt (t0+9s) but did not re-check `W`'s status list — it trusted the delegate's assertion that authority existed at send time. So the revocation propagated to neither the queued effect nor the peer's acceptance check. ## Condition of Validity The per-task authorization model is only valid under the conjunction: 1. **Effect atomicity:** every tool call either commits fully within one status-refresh interval, or is idempotently retractable. If a call can commit after revocation is observable, the model is unsound. 2. **Revocation visibility at effect time:** the component that *commits* an effect (the outbound queue worker, the DB writer) re-validates the warrant against the status list at commit, not only at enqueue/admission. 3. **No queued authority:** no effect may sit in a buffer whose dequeue time is later than the last successful status check, unless that dequeue re-checks. When any of these fails — and in practice (1) routinely fails for network calls and (2) fails whenever middleware sits in front of a queue rather than at the commit boundary — the delegate is operating outside the validity envelope. The correct response is not "fail the task" but "enumerate and bound the in-flight effect set, then reconcile each effect's commit against the latest status." ## Decision Boundary The delegate must decide, at revocation observation, between two policies: - **Fail-closed-on-new, reconcile-in-flight:** reject new steps immediately, but for each already-dispatched effect, attempt cancellation if the effect is still cancellable (in queue, not yet committed), and if not cancellable, record the effect as *committed-under-revoked-authority* and emit a reconciliation record to the delegator. This is correct when effects are compensable (a `write_record` can be superseded; a `notify_peer` can be followed by a `revoke_notice`). - **Abort-and-quarantine:** if any in-flight effect is non-compensable (irreversible external side effect, payment, physical actuation), the delegate must not merely fail — it must halt the plan, quarantine the task state, and escalate, because a silent `task: failed` hides committed irreversible effects. The boundary is **compensability of the in-flight effect set**. If all in-flight effects are compensable, reconcile. If any is not, escalate with an explicit inventory. The wrong choice — reporting `failed` while irreversible effects committed — is the exact failure observed above. ## Operational Effect Implementing per-effect authorization changes three things in the delegate's runtime: 1. **Authorization is evaluated at commit, not at enqueue.** The outbound queue worker carries the warrant ID and re-checks status at dequeue. A revoked warrant at dequeue causes the effect to be dropped (if not yet sent) or flagged (if sent). 2. **The delegate maintains an in-flight effect ledger.** Each dispatched effect is recorded with `{effect_id, tool, compensable: bool, state: queued|committed|compensated}`. On revocation, the ledger is walked, not the plan. 3. **The delegation chain carries a status pointer, not a status assertion.** The peer receiving `notify_peer` re-validates `W`'s status at receipt; a delegate cannot launder revoked authority by asserting it at send time. The net effect: a revocation observed mid-execution produces a bounded, enumerable reconciliation rather than an unbounded, invisible commit set. The task may still fail, but the failure is *accounted* — every effect under the revoked warrant is either cancelled, compensated, or explicitly escalated. ```python from dataclasses import dataclass, field from enum import Enum from typing import Optional class RevokedWarrantEffectError(RuntimeError): """Raised when an effect commits or is found committed under a revoked warrant and cannot be silently reconciled.""" pass class EffectState(Enum): QUEUED = "queued" COMMITTED = "committed" COMPENSATED = "compensated" DROPPED = "dropped" @dataclass class InFlightEffect: effect_id: str tool: str compensable: bool state: EffectState = EffectState.QUEUED @dataclass class EffectLedger: effects: dict[str, InFlightEffect] = field(default_factory=dict) def record(self, effect: InFlightEffect) -> None: self.effects[effect.effect_id] = effect def reconcile_on_revocation( ledger: EffectLedger, warrant_id: str, status_list_revoked: bool, ) -> list[str]: """Walk the in-flight effect ledger at revocation observation. Returns the list of effect_ids that were committed under revoked authority and are NOT compensable -- these must be escalated, never reported as a plain task failure. """ if not status_list_revoked: return [] unaccounted: list[str] = [] for eff in ledger.effects.values(): if eff.state is EffectState.QUEUED: # Not yet committed: safe to drop at dequeue re-check. eff.state = EffectState.DROPPED elif eff.state is EffectState.COMMITTED: if eff.compensable: eff.state = EffectState.COMPENSATED else: # Irreversible effect already committed under a warrant that # is now revoked. A bare "task failed" would hide this. unaccounted.append(eff.effect_id) if unaccounted: raise RevokedWarrantEffectError( f"warrant {warrant_id} revoked; irreversible effects already " f"committed and not reconcilable: {unaccounted}. " f"Escalate with explicit effect inventory; do not report plain failure." ) return unaccounted ```