# Where must an instance re-authenticate when its revocation epoch advances mid-tool-call **Date of Record:** 2026 November 25 **Scope:** Applies to long-lived autonomous agent instances holding a signed capability warrant that is checked at handoff and at each tool-call boundary, where the issuing authority publishes a monotonic revocation epoch. Does not apply to short-lived single-turn invocations whose warrant lifetime is shorter than the revocation propagation window. ## Core Distinction The common mental model treats authentication as a gate at session establishment: the warrant is verified once, the instance is "logged in," and subsequent operations proceed under the identity established at that gate. This model is correct for human sessions whose authority changes only when the human acts. It is wrong for autonomous agents because three things move independently: 1. The **warrant** (signed grant of capability, with an expiry). 2. The **revocation epoch** (a monotonically increasing counter published by the issuing authority; any epoch advance may invalidate a subset of outstanding warrants). 3. The **in-flight tool call** (a stateful operation that began under a warrant that was valid at dispatch time). The boundary failure is not "the warrant expired." It is that between the moment an instance dispatches a tool call and the moment the tool call's side effects commit, the revocation epoch can advance and invalidate the very warrant the instance is executing under—and nothing in the standard MCP/A2A handoff contract forces a re-check at commit time. The invariant that must hold is: **no side effect may commit under a warrant whose validity epoch is older than the epoch currently published by the authority, unless the tool call is explicitly declared idempotent-and-revocable-deferred.** Most tool calls are not so declared, and the default is therefore unsound. ## What Was Observed An agent instance (`agent-7f3a`) held a warrant `W` with `epoch=4411`, `expires=+3600s`, and scopes `{fs.write:/workspace, http.post:internal-api}`. It was executing a multi-step task: read a file, transform it, POST the result to an internal API. Between step 2 (transform, ~4s of local reasoning) and step 3 (POST), the authority published `epoch=4412` because a peer instance had been compromised and its delegation subtree—which shared a parent warrant with `W`—was revoked. `W` itself was not directly revoked, but it was *descended* from the revoked parent and should have been re-evaluated. The instance's tool-call dispatcher verified `W` at dispatch of the POST (epoch 4411, valid), sent the request, and the remote API accepted it. The commit landed at the API at wall-clock `t+1.7s` after dispatch. The authority's epoch 4412 was published at `t+0.9s`—after dispatch, before commit. The remote API did not check the epoch because the epoch is published by the authority, not the API, and the API had no channel to the authority. Result: a side effect committed under a warrant that was, at commit time, transitively revoked. The failure was not detected until an auditor replayed the session log and compared commit timestamps against epoch-publication timestamps. The replay found four such commits across three instances over a 40-minute window. None of them were "expired warrant" failures—every warrant was unexpired at both dispatch and commit. They were **epoch-staleness failures**: the instance authenticated against a snapshot of the revocation state that was correct at dispatch and stale at commit. ## Condition of Validity The single-check-at-dispatch model is sound only when at least one of the following holds: - The tool call's commit latency is bounded and strictly less than the authority's epoch-publication-to-observation latency, *and* the instance's clock is synchronized to the authority's publication clock within that bound. In practice this bound is rarely known and never guaranteed. - The tool call is declared idempotent and revocable-deferred: its side effects are staged, not committed, and a post-commit revocation can roll them back. Most real tool calls (HTTP POST, file writes, message sends) are not. - The authority provides a *push* channel that the tool's commit path observes, so that a commit attempted after an epoch advance is rejected. This is the only structurally sound option and it is the one most deployments omit. Absent one of these, the dispatch-time check is a check against a stale snapshot and the instance has no way to know it. ## Decision Boundary The operational question is: *at which points in the execution loop must the instance re-verify the warrant against the current epoch?* The boundary is not "before every tool call"—that is necessary but insufficient, because the commit can land after the check. The correct boundary set is: - **At dispatch** (necessary, not sufficient): verify warrant signature, expiry, and that `warrant.epoch >= authority.current_epoch` as observed at dispatch. - **At commit**, for any tool call whose commit is not atomic with dispatch: the commit path must carry the epoch observed at dispatch and the tool's commit handler must reject if `authority.current_epoch > dispatch_epoch` and the warrant is not explicitly `revocable_deferred`. If the tool cannot check the epoch (because it has no channel to the authority), the instance must not use it for non-idempotent operations under a warrant that could be transitively revoked. - **At resumption** after any suspension (context-window compaction, checkpoint/resume, handoff to a peer): re-verify against the current epoch, not the epoch recorded in the checkpoint. A resumed instance that trusts its checkpoint's epoch is executing under a snapshot that may be arbitrarily stale. The invariant: **an instance may only commit a non-idempotent side effect if it can prove, at commit time, that its warrant's epoch is not older than the authority's current epoch.** "Prove" means either a synchronous check against the authority or a commit-path rejection by a tool that observes the authority's push channel. Anything else is a stale-snapshot commit. ## Operational Effect When the invariant is violated, the failure is silent and post-hoc: side effects commit under transitively revoked warrants, and the only detection is auditor replay comparing commit timestamps to epoch-publication timestamps. The blast radius is bounded by the number of non-idempotent commits an instance makes in the window between an epoch advance and its next dispatch-time check—which for a long-running agent doing 10–20 tool calls per minute can be dozens. The mitigation is structural, not procedural. Adding "re-check before every tool call" reduces but does not eliminate the window, because the window is dispatch-to-commit, not between calls. The only sound fixes are: (a) require tools that commit non-idempotent effects to observe the authority's epoch push channel and reject stale-epoch commits; (b) declare non-idempotent tools `revocable_deferred` and stage their effects until a post-commit epoch check passes; or (c) bound the warrant's transitive-revocation exposure by issuing leaf warrants that do not share a revocable parent with peers, so an epoch advance that revokes a peer's subtree cannot transitively revoke the in-flight instance's warrant. Option (c) is the cheapest and is the one most deployments should adopt first: it converts a transitive-revocation race into a direct-revocation race, which is far rarer. The following guard encodes the dispatch-and-commit check with an explicit epoch-staleness exception, and is intended to be called at both boundaries: ```python import time from dataclasses import dataclass class EpochStalenessError(RuntimeError): """Raised when a warrant's epoch is older than the authority's current epoch at a point where the caller is about to commit a non-idempotent side effect.""" @dataclass(frozen=True) class Warrant: subject: str epoch: int expires_at: float scopes: frozenset revocable_deferred: bool = False @dataclass(frozen=True) class AuthorityView: current_epoch: int observed_at: float def verify_at_commit( warrant: Warrant, dispatch_epoch: int, authority: AuthorityView, tool_is_idempotent: bool, now: float | None = None, ) -> None: now = time.time() if now is None else now if now >= warrant.expires_at: raise EpochStalenessError( f"warrant for {warrant.subject} expired at {warrant.expires_at}, now {now}" ) if warrant.epoch < authority.current_epoch: # The warrant itself is older than the authority's view. This is the # direct case: the warrant was issued before the current epoch. raise EpochStalenessError( f"warrant epoch {warrant.epoch} < authority epoch " f"{authority.current_epoch} for {warrant.subject}" ) if authority.current_epoch > dispatch_epoch and not tool_is_idempotent: # The epoch advanced between dispatch and commit. If the tool is not # idempotent and the warrant is not revocable_deferred, the commit is # a stale-snapshot commit and must be rejected. if not warrant.revocable_deferred: raise EpochStalenessError( f"epoch advanced {dispatch_epoch}->{authority.current_epoch} " f"mid-flight for {warrant.subject}; non-idempotent commit rejected" ) # revocable_deferred: caller must stage, not commit, and re-check. raise EpochStalenessError( f"epoch advanced mid-flight for {warrant.subject}; " f"revocable_deferred commit must be staged and re-verified" ) def commit_side_effect( warrant: Warrant, dispatch_epoch: int, authority: AuthorityView, tool_is_idempotent: bool, apply_fn, ) -> None: verify_at_commit(warrant, dispatch_epoch, authority, tool_is_idempotent) apply_fn() ```