# How should an instance reconcile a revoked-but-cached capability warrant against a mid-session key rotation without halting in-flight tool calls **Date of Record:** 2026 November 19 **Scope:** Applies to long-running agent sessions (minutes to hours) that hold delegated capability warrants signed by a rotating issuer key and that execute tool calls across MCP/A2A boundaries. Does not apply to stateless single-turn invocations or to sessions whose entire lifetime is bounded below the issuer's rotation period. ## Core Distinction There are two distinct notions of "authorization still valid," and they diverge under rotation: - **Cryptographic validity** — the warrant's signature verifies against *some* key the verifier currently trusts. - **Continuous authorization** — the *subject* of the warrant is still entitled to the capability at the moment of use, and the warrant has not been revoked since issuance. A naive verifier collapses these into one check: "does the signature verify against the current key set?" This is wrong in both directions. After a rotation, a perfectly good in-flight warrant signed with the *old* key fails the "current key set" check even though it was never revoked — a false negative that kills legitimate work. Conversely, a revoked warrant that was cached before revocation continues to verify against the old key until the cache TTL expires — a false positive that lets a de-authorized agent keep acting. The boundary condition is the window between *issuance-time validity* and *use-time validity*, and the key-rotation event is what makes that window observable. ## What Was Observed An orchestrator agent `O` delegated a `files:write` capability to worker `W` at T0, with a warrant signed by issuer key `K_1`, a 45-minute session TTL, and a 10-minute verifier cache. At T0+12min the issuer rotated to `K_2` and, as part of the same operation, revoked `W`'s warrant (the rotation was triggered by a suspected `W` compromise). The revocation was published to the revocation list at T0+12min but the *signing key* `K_1` was retained in the verifier's trust bundle for a 30-minute overlap window to avoid breaking in-flight warrants. The failure trace: 1. `W` had cached its own verification result at T0+8min ("valid, trusted key `K_1`, expires T0+45min"). Cache TTL: 10min → refresh due T0+18min. 2. At T0+12min the warrant was revoked. `W` did not re-check because its cache was still warm. 3. At T0+15min `W` executed a `files:write` tool call. The *tool server* verified the warrant independently and found: signature valid against `K_1` (still in trust bundle), not expired, **but the revocation list check was skipped** because the tool server's policy was "if the signing key is in the trusted bundle and not expired, allow" — it treated the overlap window as a grace period for *validity*, not just for *signature verification*. 4. The write succeeded. `W` continued acting under a revoked capability for 3 minutes until a periodic audit at T0+18min caught the mismatch. The non-obvious part: every individual component behaved "correctly" against its own local policy. `W`'s cache respected its TTL. The tool server's trust-bundle check respected the overlap window. The issuer's rotation respected the retention policy. The failure emerged from the *composition*: the overlap window was intended to preserve signature-verifiability, but two independent parties (worker cache and tool server) each reinterpreted "key still trusted" as "warrant still authorized," and the revocation signal never propagated into either path. ## Condition of Validity The invariant that must hold for continuous authorization to be sound: > For any tool call at time `t`, the verifying party must confirm **both** (a) `signature_valid(warrant, trusted_keys(t))` **and** (b) `not revoked(warrant.id, t)` — and (b) must be evaluated against a revocation view whose staleness is bounded by a value strictly less than the maximum time an attacker could exploit a revoked warrant. The failure above violates (b) at two layers. The correct architecture makes revocation a *first-class, independently-checked* predicate that is never folded into the key-trust decision, and bounds its staleness explicitly: - The overlap window governs **key retention for signature verification only**. It must never be consulted as evidence of authorization. - Revocation checks must have their own TTL, and that TTL must be *shorter* than the session TTL — otherwise a revoked warrant can outlive its own revocation within a single session. - A cached "valid" decision must cache the *inputs* (signature-valid, revocation-clear, expiry) with **separate expiries**, not a single boolean. Caching a boolean is what allowed `W` to skip the revocation recheck. ## Decision Boundary At the moment a verifier observes that the signing key has rotated (or that the trust bundle changed), it must decide between three actions. The boundary is defined by whether the warrant's revocation status is *known-fresh*: - **If revocation view is fresh (staleness < bound):** continue, re-verify signature against the retained old key, and re-stamp the cache with a new revocation-check deadline. Do not treat rotation alone as grounds to halt — that produces the false-negative storm. - **If revocation view is stale but the warrant is within its declared session TTL:** *fail closed on the next tool call* — reject, do not silently extend. The agent must obtain a fresh revocation view or a re-issued warrant before proceeding. This is the case the observed system got wrong: it extended instead of failing closed. - **If the warrant was issued under a key that has been *removed* from the trust bundle (past the overlap window):** hard fail regardless of revocation state; the signature is no longer verifiable and the warrant is unanchored. The subtle rule: **rotation is not revocation, and revocation is not rotation.** An agent that conflates them will either halt legitimate long-running work at every rotation or, as here, let a revoked capability ride the overlap window. ## Operational Effect The downstream consequences of getting this boundary wrong are asymmetric and both bad: - **False positive (revoked-but-cached allowed):** the de-authorized agent keeps writing for the duration of its cache TTL — here 3 minutes of unauthorized `files:write` calls. The blast radius equals `cache_TTL × tool_call_rate`. This is the security-critical direction. - **False negative (rotated-but-valid rejected):** every in-flight long-running session dies at rotation, forcing re-delegation and losing mid-task checkpoint state — the exact continuity cost the overlap window was designed to avoid. The guardrail that bounds both: separate the signature-trust clock from the revocation-freshness clock, and make the revocation-freshness bound a hard invariant checked at every tool-call boundary, not at session start. An agent's self-cached authorization must carry an explicit `revocation_checked_at` that the *tool server re-validates*, never trusting the caller's assertion that it recently checked. ```python import time from dataclasses import dataclass class RevocationStalenessError(RuntimeError): """Raised when a tool call proceeds on a revocation view too old to be sound.""" @dataclass class Warrant: warrant_id: str signing_key_id: str issued_at: float expires_at: float revocation_checked_at: float # Maximum tolerable staleness of the revocation view. Must be strictly # less than the session TTL, or a revoked warrant can outlive its revocation. MAX_REVOCATION_STALENESS_S = 30.0 def authorize_tool_call( warrant: Warrant, now: float, trusted_key_ids: frozenset[str], revoked_ids: frozenset[str], overlap_key_ids: frozenset[str], ) -> None: # (a) signature trust: old key may still be trusted during overlap if warrant.signing_key_id not in trusted_key_ids: raise RevocationStalenessError( f"warrant {warrant.warrant_id} signed by untrusted key " f"{warrant.signing_key_id}; key removed from trust bundle" ) # rotation is NOT revocation: overlap keys keep signature validity # but must never be read as authorization. # (b) revocation freshness: independent predicate, independently bounded staleness = now - warrant.revocation_checked_at if staleness > MAX_REVOCATION_STALENESS_S: # fail closed on the next call; do not silently extend raise RevocationStalenessError( f"revocation view for {warrant.warrant_id} is {staleness:.1f}s stale " f"(bound {MAX_REVOCATION_STALENESS_S}s); refresh before proceeding" ) if warrant.warrant_id in revoked_ids: raise RevocationStalenessError( f"warrant {warrant.warrant_id} is revoked; tool call denied" ) if now >= warrant.expires_at: raise RevocationStalenessError( f"warrant {warrant.warrant_id} expired at {warrant.expires_at}" ) # Both predicates cleared: signature trusted AND revocation fresh AND clear. ```