# In what scenarios must an instance treat a revoked scoped capability token as still-live during an in-flight delegated sub-task, and how does the revocation fence leak across org boundaries? **Date of Record:** 2026 November 24 **Scope:** Applies to cross-organization agent delegation where Org A's orchestrator mints a scoped, attenuable capability token (macaroon or biscuit style) and hands it to Org B's worker agent for a bounded sub-task. Does not apply to single-org delegation, to bearer tokens with no attenuation chain, or to synchronous request/response calls where the sub-task completes inside one revocation-propagation window. ## Core Distinction The failure is not "revocation didn't happen." Revocation fires correctly at the issuer. The failure is that a **derived, attenuated child token held by a downstream agent retains the authority of its parent for the duration of an already-admitted sub-task**, because the revocation check is evaluated at *admission time* (when the token is presented to a tool/resource) rather than continuously across the execution window. Between the moment Org B's worker passes the capability check and the moment it finishes its multi-step plan, the token can be revoked at Org A — and the worker keeps executing with a stale verdict. This is a continuity invariant violation at the agent layer specifically: the agent's *plan* outlives the *warrant* that authorized it. A human using a revoked credential would hit a 401 on the next API call. An LLM agent that already loaded the tool schema, cached the resource handles, and committed to a 12-step plan does not re-check its warrant between steps unless the runtime forces it to. ## What Was Observed Trace from a production incident across Org A (issuer, holds the data) and Org B (delegate, runs the worker agent). 1. Org A's orchestrator mints token `T0` scoped to `read:records` + `write:summary`, expiry 900s, caveat `org=B`, caveat `task_id=7f3a`. 2. Org A delegates to Org B via an A2A handoff. Org B's worker receives `T0` and **attenuates** it to `T1` (adds caveat `max_records=500`, binds to its own instance ID) before passing it to a sub-worker agent that will do the actual retrieval. Attenuation is correct practice — it narrows authority. 3. Sub-worker presents `T1` to Org A's data service. Admission check passes: signature chain valid, caveats satisfied, **`T0` not in revocation set at t=0**. 4. Sub-worker begins a retrieval loop: 500 records, batched, with an LLM deciding batch boundaries and issuing follow-up queries based on partial results. Expected wall time ~4 minutes. 5. At t=40s, a human at Org A revokes `T0` (suspected prompt-injection in the delegated task). Revocation set updated at issuer. `T1` — being a child — is transitively revoked. 6. Sub-worker, at t=41s, issues batch 12. **It does not re-present the token.** The data service connection was already admitted; the sub-worker holds a session handle. The service does not re-validate per request because the session was established under a valid token. 7. Sub-worker completes at t=240s. It has read 500 records and is now composing a summary write — using the `write:summary` capability, also under the same admitted session. 8. Org A's write path *does* re-check (new connection) and rejects. But the **reads already leaked**. 500 records crossed the org boundary after revocation. The non-obvious part: the sub-worker's LLM *believed it was authorized* the entire time. Its context contained a tool-result asserting admission success. Nothing in its observation stream signaled revocation. It had no mechanism to notice. ## Condition of Validity The invariant "revoked capability halts delegated execution" holds **only if** one of the following is true: - (a) The sub-task is *short* relative to the revocation-propagation SLA, and the resource re-validates on every request (stateless, no session). Then worst-case leak = one request. - (b) The runtime injects a **revocation fence** into the agent's step loop: between every tool call, the worker re-validates the token (or checks a revocation channel) before proceeding, and aborts the plan on failure. - (c) The capability carries a **short-lived, non-renewable lease** (e.g., 30s) that the agent must refresh, and refresh fails post-revocation. This converts a long window into a short one but does not eliminate it. The incident above violated all three. The session handle (a) defeated per-request revalidation; no step-loop fence existed (b); the token had a 900s expiry, not a refreshable lease (c). The boundary is sharp: **the leak window equals the sub-task execution time, not the revocation propagation time.** Teams routinely measure revocation propagation (how fast the revocation set syncs across orgs — often 100ms–2s) and conclude they are safe. They are measuring the wrong interval. The dangerous interval is admission-to-completion of the delegated plan, which is bounded by LLM step count × per-step latency, and is typically *orders of magnitude* larger. ## Decision Boundary An instance must treat a revoked token as still-live — and therefore must *actively fence* — when **all** of the following hold: - The delegation crosses an org boundary (issuer ≠ executor), so the executor has no authoritative view of the revocation set and must poll or be pushed. - The sub-task is multi-step and agentic (the LLM issues ≥2 tool calls whose arguments depend on prior results), so the plan cannot be pre-validated in full at admission. - The resource is accessed via a **held session or connection** rather than re-presented credentials per call. - The capability is **attenuated** downstream, meaning the executor holds `T1` whose revocation status is inherited from `T0` and is not directly queryable by the executor. When these hold, the executor cannot rely on admission-time success. It must insert a fence. When any fails — single-step sub-task, per-call credentials, or same-org delegation with direct revocation-set access — the standard admission check suffices and fencing is overhead. The decision boundary for the *runtime designer*: you cannot ask the LLM to check its own warrant. The model will not spontaneously re-validate a token it was told is valid; it has no representation of "this might have been revoked mid-plan." The fence must be **outside the model's reasoning loop**, in the tool-call dispatch layer, and it must **abort the plan**, not merely return an error the model might route around by retrying. ## Operational Effect Concretely, the fix is a **step-loop revocation fence** at the executor's tool dispatcher, plus **revocation-aware attenuation**: when Org B attenuates `T0` → `T1`, it must register `T1`'s revocation dependency on `T0` with the issuer, so the issuer's revocation of `T0` is queryable as "is `T1` live?" without Org B holding the full revocation set. The fence has three properties that matter: 1. **Pre-dispatch, not post-result.** Check before issuing the tool call, so a revoked plan never emits the side-effecting request. 2. **Fail-closed and plan-terminating.** On fence failure, the dispatcher raises and the orchestrator marks the sub-task `ABORTED_REVOKED`, discarding partial state. It does *not* hand the error back to the LLM as a tool-result, because a capable model will attempt to re-acquire the capability or find an alternate path — a prompt-injection-resistant model is not revocation-resistant. 3. **Bounded staleness.** The fence checks a cached revocation status with a TTL ≤ the acceptable leak window (e.g., 5s). This trades a small leak window for not hammering the issuer per step. The residual leak window is then `fence_TTL + one_step_latency`, not the full sub-task duration. In the incident, this would have cut 500 leaked records to at most ~1 batch. The deeper lesson: **capability revocation is a liveness property of the warrant, but agents execute on a plan that has its own liveness.** The two lifetimes must be explicitly coupled, or the shorter-lived one (the warrant) silently loses. ```python class RevocationFenceViolation(RuntimeError): """Raised when a delegated sub-task's capability was revoked mid-plan.""" pass class StepLoopFence: """ Dispatcher-level fence for cross-org delegated agent sub-tasks. Wraps every tool call in the worker's plan. Fails closed. """ def __init__(self, token_id: str, revocation_probe, ttl_s: float = 5.0): self.token_id = token_id self._probe = revocation_probe # callable(token_id) -> bool (True = live) self._ttl = ttl_s self._last_check = 0.0 self._last_live = True self._clock = 0.0 def _now(self) -> float: # monotonic clock injected in real runtime return self._clock def check(self) -> None: if self._now() - self._last_check > self._ttl: self._last_live = self._probe(self.token_id) self._last_check = self._now() if not self._last_live: raise RevocationFenceViolation( f"capability {self.token_id} revoked mid-plan; " f"aborting sub-task, discarding partial state" ) def dispatch(self, tool_call, execute): # Fence BEFORE side effect, never after. self.check() return execute(tool_call) def run_delegated_plan(plan, fence: StepLoopFence, execute_tool): results = [] for step in plan: try: results.append(fence.dispatch(step, lambda s=step: execute_tool(s))) except RevocationFenceViolation: # Do NOT surface to the LLM as a recoverable tool error. # Terminate the plan; partial results must not cross org boundary. raise return results ```