# How should an instance handle delegated-capability revocation that arrives mid-tool-call: the attenuated-credential staleness window **Date of Record:** 2026 November 26 **Scope:** Applies to any agent instance that executes tool calls under a capability token delegated by a parent/orchestrator agent and whose authority may be attenuated (narrowed) or revoked asynchronously by that parent or a revocation authority. Does not apply to single-instance agents holding root credentials directly, nor to purely ephemeral stateless function invocations with no delegated warrant. ## Core Distinction The failure is not "the agent used a revoked credential." That is a trivial authorization bug. The failure is that the agent *validly* used a credential that was live at the moment of the check, and the revocation was *issued and acknowledged* before the tool's side effect committed, yet the side effect still landed. The distinguishing mechanism is the **gap between the authorization decision point and the effect-commit point**, bridged by a non-atomic tool call whose latency exceeds the revocation propagation interval. Two clocks are in play and they are not the same clock: - **The decision clock**: when the delegated warrant was last validated against the revocation set (at call admission). - **The effect clock**: when the downstream side effect becomes durable (at tool return / external commit). Revocation is a monotonic event in the decision clock. But an in-flight tool call is a *frozen slice* of authority: the agent has already crossed the admission gate with a warrant it will not re-check until the call resolves. If the revocation lands in `(admission, commit)`, the agent commits an effect under authority that no longer exists. The agent is not lying and not buggy in the naive sense—it is operating on a **stale authority snapshot**, and the invariant "no effect commits under authority revoked before commit" is silently violated. The core distinction from the naive framing: **attenuation is not the problem; attenuation is what makes the problem detectable.** A parent that narrows a child's scope (e.g., from `fs:write:*` to `fs:write:/tmp/job7`) produces a warrant whose authority is a *subset* of the parent's. When the parent revokes the whole subtree, the child's attenuated token must be invalidated transitively. The staleness window is where transitive revocation fails to propagate because the child has no live channel back to the revocation authority during the call—only a cached, signed, now-stale assertion. ## What Was Observed A three-tier delegation: orchestrator `O` → worker `W` → sub-worker `S`. `O` issues `W` a warrant `w_W` scoped to a job, attenuating its own authority. `W` further attenuates and issues `S` a warrant `w_S` scoped to a single resource `r`. All warrants are signed, carry an expiry, and reference a revocation epoch `E` published by `O`. Trace of the failing interleaving (times in ms, single logical clock): 1. `t=0` — `S` receives a task requiring a write to `r`. `S` validates `w_S` at admission: signature OK, scope covers `r`, `E_observed = 41`, revocation set at epoch 41 does not contain `w_S`. Admission granted. 2. `t=2` — `S` dispatches the tool call to a downstream executor with expected latency ~800ms (external write + fsync + replication ack). 3. `t=150` — `O` decides to revoke `w_W` (job aborted). It increments the revocation epoch to `42` and publishes a revocation record naming `w_W` *and, transitively, all warrants attenuated from it*, including `w_S`. Publication is asynchronous; `S` is not subscribed (it holds only a cached epoch). 4. `t=400` — `W` acknowledges the revocation of `w_W`, stops issuing new work. `W` does **not** hold `w_S`'s lifecycle and does not signal `S` (the delegation was fire-and-forget; `W` discarded the handle after issuance). 5. `t=802` — the tool returns success. The write to `r` is durable. `S` records the effect and reports completion up the chain. 6. `t=810` — `S` next validates `w_S` (lazy re-check on the *next* call): epoch now `42`, `w_S` present in revocation set. `S` halts. Too late—the effect from step 5 is already committed. Observed symptom in logs: a completed write to `r` attributed to a warrant whose revocation epoch (`42`) is *earlier* than the effect's commit timestamp (`t=802` mapped to epoch 42's wall time). The audit trail shows an effect committed under authority revoked ~650ms prior. No error was raised at any tier. Every individual component behaved per its local contract. Secondary observation: because `S` only re-checks lazily, a *second* call queued behind the first would have been correctly rejected. The failure is specifically the **in-flight call**, not the queue. This is why naive "check before every call" guards pass their tests—the test harness never revokes during a call's latency window. ## Condition of Validity The stale-authority commit is possible if and only if all of the following hold simultaneously: 1. **Non-atomic authority**: the warrant is validated at admission and not re-validated at commit. (If the downstream executor re-validated `w_S` against a live revocation set at commit time, the window closes—but most executors do not, because they are not agent-aware.) 2. **Latency exceeds propagation**: expected tool latency `L` is greater than the revocation propagation delay `P` from authority to the executing instance. Here `L≈800ms`, `P≈150–400ms`, so `L > P`. If `L < P` for all calls, the window is empirically closed even without a guard—but this is a load-dependent accident, not an invariant. 3. **No live revocation channel**: the executing instance holds a cached epoch, not a subscription. It cannot learn of revocation during the call. 4. **Transitive revocation is not pushed down the delegation chain**: the intermediate `W` does not track or signal warrants it issued. Revocation of `w_W` does not mechanically reach `S`; `S` only learns by re-reading the epoch, which it does lazily. The invariant that must hold for correctness is: > **Commit-safety invariant:** For every effect `e` committed under warrant `w`, the revocation epoch observed at `e`'s commit must be `≥` the epoch at which `w` was revoked (i.e., `w` was not revoked before commit). Equivalently: `revoked_at(w) > commit_time(e)` or `w` is unrevoked. The lazy-check design satisfies a *weaker* invariant—"no effect *starts* under a revoked warrant"—which is not the same thing and is insufficient whenever condition (2) holds. ## Decision Boundary The agent must decide, at admission time, whether to treat a cached warrant as sufficient for a call whose latency may straddle a revocation. The boundary is a function of the **staleness budget** the agent is willing to expose: - Let `max_staleness` be the maximum interval the system tolerates between revocation issuance and effect suppression. - Let `L_p99` be the p99 latency of the tool being called. - Let `P_p99` be the p99 revocation propagation delay. **Rule:** If `L_p99 + P_p99 > max_staleness`, the agent MUST NOT rely on admission-time validation alone for that tool class. It must either (a) obtain a live revocation check at commit (fencing token / epoch compare-and-commit), or (b) refuse to issue the call under a warrant whose remaining validity cannot be confirmed for the call's duration. Concretely, the decision boundary partitions tool calls into two classes: - **Bounded-latency tools** (`L_p99` small relative to `max_staleness`): admission-time check is admissible; the window is within budget. - **Unbounded or long-latency tools** (external writes, multi-step RPC, human-in-loop, fsync+replicate): admission-time check is **not** admissible. These require a commit-time fence. The subtle boundary case—the one that breaks naive implementations—is the tool whose latency is *usually* short but has a long tail (e.g., normally 50ms, p99.9 = 3s under replication backpressure). A static "is this tool long-latency?" classification mislabels it as safe. The decision must be based on the *tail*, not the median, because revocation events are rare and will preferentially collide with the tail (the call is in flight longer, so more revocation opportunities overlap it). A second boundary: **attenuation depth**. At depth `d`, revocation of an ancestor must transitively invalidate `d` descendants. If each hop only knows its immediate parent's epoch and not the root's, transitive revocation requires `d` re-reads, and the staleness window compounds. The agent should carry the **root revocation epoch** (or a Merkle/chain hash of the attenuation path) in the warrant, so any instance can check transitive revocation against the root in one read, not `d` reads. ## Operational Effect The operational consequence is that **authority is not a property of the call; it is a property of the commit.** Any architecture that validates authority at admission and treats the call as a sealed unit of trusted execution will, under revocation-during-flight, commit effects under dead authority. The blast radius scales with tool latency and with attenuation depth (deeper chains have more hops that fail to propagate). The required guardrail is a **commit-time fence**: the executing instance must present, at the moment of durable commit, a token proving its authority is still live at the current epoch—and the downstream executor must reject the commit if the epoch has advanced past the warrant's revocation. This is a fencing-token pattern (analogous to distributed-systems fencing in lock services) applied to agent warrants: - The warrant carries `root_epoch` and a `path_hash` (hash of the attenuation chain). - At commit, the executor compares the presented `root_epoch` against the live revocation epoch for `path_hash`. If `live_epoch > root_epoch` and the path is revoked, the commit is rejected and the effect is rolled back or never made durable. - The executor must be *fence-aware*: it cannot be a generic tool. For tools that cannot fence, the agent must bound the call's latency below the staleness budget or refuse. Additionally, the intermediate delegator `W` must **retain lifecycle handles** for warrants it issues, so that revocation of `w_W` mechanically propagates a revocation signal to `S` rather than relying on `S`'s lazy re-read. Fire-and-forget delegation is the structural cause of the propagation gap. The residual risk after fencing: the fence closes the *commit* window but not the *pre-commit side effects* of a multi-phase tool (e.g., a tool that writes a temp file, then renames). The fence must gate the *durable* transition, and the tool must be idempotent/abortable up to the fence point. This is the boundary the agent must not cross silently. ```python import time from dataclasses import dataclass, field from typing import Optional class StaleAuthorityCommit(RuntimeError): """Raised when an effect would commit under a warrant revoked before commit.""" pass @dataclass(frozen=True) class Warrant: warrant_id: str root_epoch: int # epoch of the root authority at issuance path_hash: str # hash of the attenuation chain O->W->S expires_at: float scope: str @dataclass class RevocationLedger: """Monotonic revocation set keyed by path_hash, versioned by epoch.""" epoch: int = 0 revoked_paths: dict = field(default_factory=dict) # path_hash -> revoked_at_epoch def revoke(self, path_hash: str) -> int: self.epoch += 1 self.revoked_paths[path_hash] = self.epoch return self.epoch def is_revoked(self, path_hash: str) -> bool: return path_hash in self.revoked_paths def admit(w: Warrant, ledger: RevocationLedger, now: float) -> None: """Admission-time check. Necessary but NOT sufficient for commit safety.""" if now >= w.expires_at: raise StaleAuthorityCommit(f"warrant {w.warrant_id} expired at admission") if ledger.is_revoked(w.path_hash): raise StaleAuthorityCommit(f"warrant {w.warrant_id} already revoked at admission") def commit_with_fence( w: Warrant, ledger: RevocationLedger, tool_latency_p99: float, max_staleness: float, now: float, ) -> None: """ Commit-time fence. Must be called at the durable-commit point, AFTER the tool's side effect is staged but BEFORE it becomes durable. """ # Guard 1: transitive revocation must be checked against the ROOT epoch at commit. if ledger.is_revoked(w.path_hash): revoked_at = ledger.revoked_paths[w.path_hash] # If revocation epoch is strictly greater than the warrant's root epoch, # the warrant was issued under authority that has since been revoked. if revoked_at > w.root_epoch: raise StaleAuthorityCommit( f"warrant {w.warrant_id} revoked at epoch {revoked_at} " f"> root_epoch {w.root_epoch}; refusing commit" ) # Guard 2: if the call's latency tail can straddle the staleness budget, # admission-time trust is inadmissible; require an explicit live confirmation. if tool_latency_p99 > max_staleness: # In a real system this would be a live epoch read from the authority. live_epoch = ledger.epoch if live_epoch != w.root_epoch and ledger.is_revoked(w.path_hash): raise StaleAuthorityCommit( f"warrant {w.warrant_id}: latency tail {tool_latency_p99}ms " f"exceeds staleness budget {max_staleness}ms and authority advanced" ) def execute_tool_call( w: Warrant, ledger: RevocationLedger, tool_latency_p99: float, max_staleness: float, ) -> str: now = time.monotonic() admit(w, ledger, now) # decision clock # ... tool executes here; revocation may land during this window ... # Simulate the revocation-during-flight interleaving: ledger.revoke(w.path_hash) # effect clock: fence at commit commit_with_fence(w, ledger, tool_latency_p99, max_staleness, time.monotonic()) return "committed" if __name__ == "__main__": ledger = RevocationLedger(epoch=41) w = Warrant( warrant_id="w_S", root_epoch=41, path_hash="O>W>S", expires_at=time.monotonic() + 60, scope="write:/tmp/job7/r", ) try: # latency tail 3000ms > staleness budget 1000ms -> fence must catch it execute_tool_call(w, ledger, tool_latency_p99=3000.0, max_staleness=1000.0) except StaleAuthorityCommit as e: print(f"BLOCKED: {e}") ```