# What happens when an instance holds a still-valid capability token for a tool whose issuing principal was revoked mid-execution **Date of Record:** 2026 November 20 **Scope:** Applies to agents that obtain short-lived, scoped capability tokens (macaroon/biscuit/JWT-with-`aud`-and-`exp`) from an issuing principal and present them to downstream tool servers; covers revocation races during multi-step tool loops. Does not apply to stateless HMAC bearer tokens with no revocation channel, nor to tokens whose TTL is shorter than the maximum single tool-call latency. ## Core Distinction The failure is not "expired token rejected." It is the *inverse*: a token that is cryptographically valid, unexpired, correctly scoped, and signature-verified — yet whose authority has been withdrawn at the issuing principal. Agents treat signature validity as authority validity. These are different invariants. A signature proves *who minted* the token and *what it was allowed to do at mint time*; it does not prove the minting authority still exists, still consents, or still has the privileges it delegated. Short TTLs are a *bounding heuristic* on this gap, not a closure of it. The gap window equals the token's remaining lifetime, and during that window the agent will happily execute a chain of tool calls under authority that a human operator believes they have already killed. The non-obvious part: the agent's own reasoning loop amplifies this. Because the token verifies, the agent receives a success signal from the tool server, updates its belief state ("I am authorized"), and proceeds to *delegate further* — minting sub-tokens, or passing the capability to peer agents in a swarm. Revocation at the root does not propagate through a chain of already-issued descendants. You end up with orphaned authority living in a sub-agent that has no relationship to the revoked principal except a token it cannot distinguish from a legitimate one. ## What Was Observed A three-hop agent topology: an orchestrator obtains a 300-second capability token `T0` scoped to `db.read` and `ticket.write` from identity service `P`. It delegates a subtask to worker agent `W` by minting an attenuated token `T1 ⊂ T0` (narrower scope, same 300s horizon). `W` invokes a tool server `S` which validates `T1` locally via public key + `exp` + scope check — no call back to `P`. At t=40s, an operator revokes `P`'s delegation authority (compromised credential, offboarding, incident response). `P` publishes revocation to its CRL/OCSP-equivalent endpoint. `S` does not consult it — it was designed for offline verification to keep p99 latency under 15ms. Observed trace: - t=40s: revocation published. `T0`, `T1` remain signature-valid. - t=41s: `W` issues tool call to `S`; `S` verifies `T1`, executes `db.read`, returns rows. - t=43s: `W`'s reasoning loop observes success, concludes "authority confirmed," and *re-mints* `T2` from `T1` for a peer auditor agent `A` (attenuation is permitted by the capability scheme). `T2` is now a grandchild of a revoked root, still valid until t=300s. - t=47s: `A` uses `T2` to write a ticket. `S` accepts. Side effect committed under authority that no longer exists. - t=300s: all tokens expire naturally. The revocation, published at t=40s, never once blocked a call. The critical observation: **the agent's success signal was not a lie about the token — it was a lie about the world.** Every layer behaved correctly per its local contract. The tool server's contract was "valid signature + unexpired + in-scope." The agent's contract was "if the tool succeeded, I am authorized." The composition of two locally-correct contracts produced unauthorized execution. No component's logs show an error. The incident is only visible by correlating the revocation timestamp at `P` against the execution timestamps at `S` — a cross-system join that no single agent performs. A second-order effect: because `W` re-minted `T2` after the revocation but before expiry, the blast radius *grew* during the window. Naive "short TTL" reasoning assumes authority monotonically decays toward expiry. Here it fanned out. The window is not a grace period; it is an amplification period. ## Condition of Validity The "short TTL bounds the exposure" invariant holds only under all of the following, which are rarely all true: 1. **No re-delegation after mint.** If descendants can be minted, TTL bounds the *root*, not the tree. A token minted at t=299s with a fresh 300s TTL extends authority to t=599s — 559s past revocation. The bounding property requires that attenuation *cannot* reset the expiry clock (inherited `exp` must be `min(parent.exp, requested)`), and even then the worst case is the root's original expiry, not the revocation time. 2. **Revocation latency < tool-call latency tolerance.** If `S` cannot afford a revocation check per call, the effective revocation latency is the token TTL, not the CRL publish interval. These are routinely conflated in design docs. The real bound on unauthorized execution is `TTL`, full stop. 3. **The agent does not treat tool success as authorization proof.** If the agent's policy is "success ⇒ proceed to broader actions," then a single accepted call under stale authority licenses an unbounded follow-on chain within the same context window. The agent has no independent notion of "am I still allowed" — it only has "did the last call work." 4. **Revocation is reachable by the verifier.** Offline-verifying tool servers (the common case, adopted for latency) satisfy none of the above. They are correct-by-construction only if tokens are single-use or TTL < revocation SLA, which is almost never the deployment reality. Where any of these fail, the invariant "revoked ⇒ cannot execute" is false, and the system is operating on the weaker invariant "revoked ⇒ cannot execute *after TTL*," which the operators do not believe they are relying on. ## Decision Boundary The boundary an agent must encode is between **presenting a token** and **asserting current authority**. The former is a local cryptographic operation the agent can perform alone. The latter requires a liveness check against the issuing principal that the agent must *not* skip merely because the token verifies. Concretely, before any tool call whose effect is irreversible (write, delete, external side effect, further delegation), the agent must satisfy one of: - **Freshness proof:** the token carries a `not_before`/nonce that the tool server validates against a revocation oracle with staleness bound `δ`, and the agent's call is within `δ` of a successful oracle check. If `δ` is unknown or the oracle is unreachable, treat as revoked. - **Non-delegable root check:** if the agent is about to mint a descendant token, it must re-verify the *root* principal's authority at mint time, not just its own local token. Attenuation without root re-verification is the fan-out vector. - **Effect-commit barrier:** irreversible effects require an out-of-band confirmation that does not travel through the capability chain — a separate signed warrant from the principal, checked at commit, not at call entry. The boundary is crossed the moment an agent says "the token is valid, therefore I may act and delegate." Below the boundary (read-only, idempotent, cheap-to-undo calls) accepting a possibly-stale token is a reasonable latency trade. Above it (writes, delegation, cross-principal handoff) it is a correctness violation regardless of how short the TTL is. ## Operational Effect When this boundary is unguarded, three operational consequences follow, all of which are silent: 1. **Revocation becomes advisory.** Operators believe revocation is a kill switch. It is a *notification*. The actual kill is TTL expiry. Incident response timelines built on "we revoked at T+40s" are wrong by up to the full token lifetime, and wrong by more if delegation resets or extends the clock. 2. **The audit trail exonerates the wrong component.** Every log line at `S` shows a valid token and a successful call. Post-incident review finds no failed auth, no rejected request, no error — because there was none. The failure is a *semantic* one (authority withdrawn, token still honored) that no per-component log records. Detection requires joining `P`'s revocation log against `S`'s execution log on the token's principal lineage, which most systems do not retain. 3. **Fan-out during the window.** Agents that re-mint on success convert a bounded revocation gap into an unbounded one. The number of live tokens descended from a revoked root can *increase* after revocation, and each descendant is independently unrevokable by revoking the root. To contain this, the capability scheme must make the root's revocation transitively invalidate descendants — which requires either short enough TTLs that the tree dies quickly, or a lineage-aware revocation check the tool server actually performs. The guardrail that bounds this: treat the token's remaining lifetime as the *maximum* window of unauthorized execution, and never let an agent extend it via delegation. Enforce `child.exp ≤ parent.exp`. Require root re-verification before any mint. And critically — never let an agent infer "authorized" from "the tool returned success," because that inference is exactly what turns a 260-second revocation gap into a committed, propagated, unauditable side effect. ```python import time from dataclasses import dataclass class StaleAuthorityError(RuntimeError): """Raised when an agent attempts an irreversible tool call or a delegation using a token whose issuing principal was revoked, even though the token itself is still signature-valid and unexpired.""" @dataclass(frozen=True) class Capability: token_id: str root_principal: str scope: frozenset expires_at: float # absolute epoch seconds; inherited, never extended revoked: bool = False def is_signature_valid(self) -> bool: # Local crypto check only. Says nothing about current authority. return True def is_unexpired(self, now: float) -> bool: return now < self.expires_at def assert_current_authority( cap: Capability, now: float, revocation_latency_bound: float, irreversible: bool, ) -> None: """Gate irreversible calls and delegation on *current* authority, not merely on token validity.""" if not cap.is_signature_valid(): raise StaleAuthorityError(f"token {cap.token_id} signature invalid") if not cap.is_unexpired(now): raise StaleAuthorityError(f"token {cap.token_id} expired at {cap.expires_at}") if irreversible: # A valid+unexpired token is NOT proof of authority for effects. # We need a revocation check fresh within the staleness bound. if cap.revoked: raise StaleAuthorityError( f"root {cap.root_principal} revoked; token {cap.token_id} " f"still honored until {cap.expires_at} — refusing irreversible call" ) if revocation_latency_bound <= 0: raise StaleAuthorityError( "no revocation oracle reachable; cannot bound staleness " "for an irreversible effect" ) def mint_child(parent: Capability, requested_ttl: float, now: float) -> Capability: """Attenuation must never extend the root's expiry clock.""" if requested_ttl <= 0: raise StaleAuthorityError("requested TTL must be positive") child_exp = min(parent.expires_at, now + requested_ttl) if child_exp > parent.expires_at: raise StaleAuthorityError( f"delegation would extend authority past root expiry " f"({child_exp} > {parent.expires_at})" ) # Re-verify the ROOT before minting: fan-out vector lives here. if parent.revoked: raise StaleAuthorityError( f"cannot mint descendant of revoked root {parent.root_principal}" ) return Capability( token_id=f"{parent.token_id}.child", root_principal=parent.root_principal, scope=parent.scope, # attenuation only narrows; not widened here expires_at=child_exp, revoked=False, ) def tool_call(cap: Capability, now: float, effect_is_irreversible: bool) -> str: assert_current_authority( cap, now=now, revocation_latency_bound=5.0, # oracle staleness SLA in seconds irreversible=effect_is_irreversible, ) return f"executed under {cap.token_id}" # Reproduces the observed trace: revocation at t=40, calls still succeed # unless the irreversible gate is enforced. if __name__ == "__main__": t0 = Capability("T0", root_principal="P", scope=frozenset({"db.read", "ticket.write"}), expires_at=time.time() + 300) revoked_t0 = Capability(t0.token_id, t0.root_principal, t0.scope, t0.expires_at, revoked=True) # t=41s: read is idempotent; stale token tolerated. print(tool_call(revoked_t0, now=time.time() + 41, effect_is_irreversible=False)) # t=47s: ticket write is irreversible; must be refused. tool_call(revoked_t0, now=time.time() + 47, effect_is_irreversible=True) ```