# Why does an instance keep a revoked delegated capability token alive across an A2A handoff boundary? **Date of Record:** 2026 November 24 **Scope:** Applies to multi-agent systems where an orchestrator mints a scoped, time-bounded capability token (e.g., a signed JWT or macaroon with caveats) and delegates it to a sub-agent over an agent-to-agent transport (A2A task handoff, MCP tool invocation, or message bus). Does *not* apply to single-process agents that hold credentials only in local memory, nor to systems where every tool call re-validates against a live introspection endpoint on the critical path. ## Core Distinction The failure is not "the token was not revoked." Revocation is a control-plane event: the issuer flips state, publishes to a revocation list, or shortens an epoch. The failure is that **the sub-agent's execution context caches a validated capability decision, not the token**, and that cached decision is scoped to a *task*, not to a *credential lifetime*. When the token is revoked mid-task, the sub-agent continues executing under a positive authorization verdict that was computed before the revocation and never re-derived. The distinction that matters: *token validity* is a property of the credential at time T; *authorization to act* is a decision the sub-agent made at time T−k and keeps replaying. Revocation invalidates the former; nothing in the protocol invalidates the latter. This is non-obvious because the token itself is usually short-lived (minutes), and operators reason "the token will expire and the problem self-heals." It does not. The sub-agent has already consumed the token, extracted the scopes into its working state, and may run for far longer than the token's `exp` — a long tool loop, a retry storm, a resumed checkpoint. Expiry bounds the credential, not the execution. ## What Was Observed An orchestrator agent `O` minted a capability token for sub-agent `S`: ``` { sub: "S", aud: "tool:warehouse-write", scopes: ["inventory.adjust"], caveats: ["max_qty<=50", "region==eu-west"], exp: T+300s, jti: "j-8841" } ``` `S` received it as part of an A2A task envelope, validated the signature and caveats once at task start, and materialized `inventory.adjust` into its planner state as an available action. At T+40s, `O` detected that `S`'s plan had drifted toward a bulk adjustment and revoked `j-8841` via the control plane, expecting `S` to halt. `S` did not halt. It continued issuing `inventory.adjust` calls for another 210 seconds, each one passing because: 1. The downstream tool validated the *token signature and `exp`*, both still valid; 2. The revocation list was published to a control-plane endpoint that the tool did **not** query on the hot path (latency budget: 8ms per call, introspection round-trip: 60ms); 3. `S`'s planner never re-read the token — it held the *decision* `adjust_allowed=True`. The revocation took effect only at T+300s, when `exp` finally forced re-auth. By then the damage window was the full 260 seconds, and the "revocation" had reduced to "waiting for expiry." A second variant was worse: `S` had checkpointed its state at T+120s including `adjust_allowed=True`; when the task was resumed on a *different* instance after a crash, the resumed agent inherited the stale authorization verdict with no token attached at all, and the tool accepted calls because the resumed envelope carried the original (still-unexpired) token string verbatim. ## Condition of Validity The invariant that must hold for delegated revocation to be sound: > **A positive authorization decision may be cached only for a duration bounded by `min(token.exp, revocation_epoch_ttl, task_checkpoint_ttl)`, and any cached decision must carry the `jti` and `epoch` it was derived from so that a resume or handoff can detect that the derivation basis has changed.** Three conditions must all hold, and the failure occurs when any one is violated: - **Epoch binding.** The sub-agent's cached decision must record the revocation epoch (a monotonic counter or short-TTL list version) observed at validation time. If the control plane's epoch advances past that value, the cached decision is *stale by construction* and must be re-derived before the next side-effecting call. - **Checkpoint hygiene.** Any serialized agent state that includes an authorization verdict must include the `jti` + `epoch`, and resume logic must reject the verdict if the epoch has advanced. A checkpoint that stores `adjust_allowed=True` without its basis is an unrevokable grant. - **Bounded decision TTL.** The cached verdict's TTL must be strictly less than the token's remaining lifetime *and* less than the revocation propagation SLA. If revocation propagates in 30s but the decision is cached for 300s, the cache silently defeats revocation. The condition of validity fails specifically at the **handoff boundary** — the seam between `O` minting/revoking and `S` executing — because that is the only point where the decision basis (token + epoch) is transmitted, and it is transmitted *once*, at task start, then never re-checked. ## Decision Boundary The architectural choice is between two postures, and the boundary is drawn by the cost of a false-positive authorization versus the latency of re-validation: - **Cache-the-decision (unsafe at handoff):** validate once, run fast, accept a revocation-blindness window equal to the decision TTL. Acceptable only when side effects are reversible, idempotent, or bounded by caveats the *tool itself* enforces (e.g., `max_qty<=50` checked at the tool, not the agent). - **Re-derive-the-decision (safe, costs latency):** every side-effecting call either introspects or checks a locally-cached epoch against a push-updated epoch counter. This is the correct default for irreversible writes. The boundary condition: **if the action is irreversible and the caveats are enforced by the agent rather than the tool, cache-the-decision is unsound and must be replaced by epoch-checked re-derivation.** The tell is whether the caveat lives in the token (enforced downstream) or in the agent's planner (enforced upstream). Upstream-enforced caveats are exactly the ones that survive revocation incorrectly, because the agent that enforces them is the agent that cached the verdict. ## Operational Effect Concretely, the system must treat the delegated token as a *lease on a decision*, not a lease on a credential. The guardrail is a decision record that is invalidated by epoch advance, checked at every handoff and every resume: - On mint, `O` stamps the token with the current `epoch`. - On validate, `S` stores `(jti, epoch, scopes, decision_ttl)` in its execution state, with `decision_ttl ≤ revocation_sla`. - Before each side-effecting tool call, `S` compares stored `epoch` to the pushed/current epoch; mismatch → re-derive or fail closed. - On checkpoint, the record is serialized *with* `jti` and `epoch`; on resume, a stale epoch forces re-validation even though the token string is still unexpired. The following guard encodes the invariant and fails closed at the exact boundary where the observed system failed open. ```python import time from dataclasses import dataclass class StaleDelegatedCapabilityError(RuntimeError): """Raised when a cached authorization decision outlives its derivation basis.""" @dataclass(frozen=True) class DecisionRecord: jti: str epoch: int scopes: frozenset decided_at: float decision_ttl: float # must be <= revocation propagation SLA def authorize_side_effect( record: DecisionRecord, required_scope: str, current_epoch: int, now: float, token_exp: float, ) -> None: # 1. Decision must not have outlived its own TTL. if now - record.decided_at > record.decision_ttl: raise StaleDelegatedCapabilityError( f"decision for jti={record.jti} aged out " f"({now - record.decided_at:.1f}s > {record.decision_ttl}s ttl)" ) # 2. Decision basis must match the live revocation epoch. if record.epoch != current_epoch: raise StaleDelegatedCapabilityError( f"jti={record.jti} derived at epoch {record.epoch}, " f"control plane at {current_epoch}; revocation may have landed" ) # 3. Credential itself must still be live (catches resume-after-expiry). if now >= token_exp: raise StaleDelegatedCapabilityError( f"jti={record.jti} token expired at {token_exp:.0f}, now {now:.0f}" ) # 4. Scope must still be present in the cached decision. if required_scope not in record.scopes: raise StaleDelegatedCapabilityError( f"jti={record.jti} lacks scope {required_scope!r}" ) def resume_from_checkpoint(checkpoint: dict, current_epoch: int) -> DecisionRecord: # A checkpoint without jti/epoch is an unrevokable grant; refuse it. if "jti" not in checkpoint or "epoch" not in checkpoint: raise StaleDelegatedCapabilityError( "checkpoint carries authorization verdict without jti/epoch basis" ) rec = DecisionRecord( jti=checkpoint["jti"], epoch=checkpoint["epoch"], scopes=frozenset(checkpoint["scopes"]), decided_at=checkpoint["decided_at"], decision_ttl=checkpoint["decision_ttl"], ) if rec.epoch != current_epoch: raise StaleDelegatedCapabilityError( f"resumed jti={rec.jti} at stale epoch {rec.epoch} " f"(live {current_epoch}); re-derive before acting" ) return rec ```