# In what scenarios must an instance treat a scoped capability token as revoked when the issuing authority's consent graph diverges from the token's embedded delegation chain **Date of Record:** 2026 November 20 **Scope:** Applies to any agent instance operating under delegated scoped capability tokens where the consent authority may revoke, narrow, or re-parent a delegation while the token remains cryptographically valid and unexpired. Does not cover token forgery, signature verification failures, or transport-level replay (those are handled by earlier validation gates). ## Core Distinction A scoped capability token is a *snapshot* of consent at issuance time. The consent graph maintained by the issuing authority is a *live* structure. Cryptographic validity proves only that the token was minted by the authority and has not been tampered with; it proves nothing about whether the delegation path it encodes still exists in the authority's current graph. The failure mode examined here is **consent-graph divergence**: the token's embedded delegation chain (issuer → delegator → delegatee, with scope narrowing at each hop) no longer corresponds to any valid path in the live consent graph, yet the token verifies, is unexpired, and passes scope checks against the requested action. This is distinct from ordinary revocation. In ordinary revocation the authority publishes a revocation list or epoch counter and the instance checks it. Here the authority never revoked the *token*; it revoked or re-parented an *intermediate delegation* upstream of the token. The token's holder is now acting on a delegation path that was severed one or more hops above them. The instance is a downstream delegatee that never had a direct relationship with the severed hop. ## What Was Observed An orchestrator agent `O` holds a root capability `cap:root:tenant=42` with delegation depth 3. It issues to worker `W1` a token `T1` scoped to `files:read:/tenant42/projects/*`, embedding the chain `O → W1`. `W1` sub-delegates to `W2` a token `T2` scoped to `files:read:/tenant42/projects/alpha/*`, embedding `O → W1 → W2`. `W2` then calls a tool that returns a file listing. At T+40s, tenant 42's admin revokes `W1`'s delegation entirely (a personnel change), but does not touch `W2`'s token and does not publish a token-level revocation for `T2`. The authority's consent graph now has no path from `O` to `W2`. `T2` still verifies: signature valid, `exp` in 4 hours, scope `files:read:/tenant42/projects/alpha/*` satisfied by the requested path. `W2` continues to read files for the remaining 4 hours. The observed trace: 1. `T2` presented to resource server; signature and `exp` pass. 2. Scope check: requested `files:read:/tenant42/projects/alpha/report.csv` matches `T2.scope`. Pass. 3. Delegation-chain check: resource server verifies each hop's signature in the embedded chain. All hops verify. Pass. 4. **No step queries the live consent graph for path existence.** The chain is internally consistent but externally orphaned. 5. Access granted. Divergence persists until `T2` expires. The non-obvious part: the embedded chain is *self-consistent*. Every signature in `O → W1 → W2` is genuine. A verifier that checks "is this chain well-formed and does each hop's scope narrow correctly?" will always pass. The only way to detect the severance is to ask the authority whether the path `O → W1 → W2` still exists *as a live edge set*, not whether the signatures on it are valid. A second observation: when the authority re-parents rather than deletes — say `W1` is moved under a different orchestrator `O'` with a narrower root scope — the divergence is subtler. `T2`'s chain still names `O` as root, but `O` no longer has authority over `W1`. The token's root claim is stale. Verifiers that trust the embedded root without confirming the root still owns the first hop will over-grant. ## Condition of Validity The invariant that must hold for a scoped capability token to be honored is: > For every hop `(A → B)` in the token's embedded delegation chain, the live consent graph must contain a current edge `A → B` whose scope is a superset of the scope recorded in the token at that hop, and the root `A` must still hold the root capability named in the token. Cryptographic validity is necessary but not sufficient. The token is a *claim* about the graph; the graph is the *truth*. A token is valid only while its claim matches the truth. The moment any hop's edge is deleted, re-parented, or scope-narrowed below the token's recorded scope, the token is **divergently invalid** — a distinct state from "revoked" (explicitly listed) and from "expired" (time-bounded). Two corollaries bound the condition: - **Divergence is not transitive-safe by default.** If `W1`'s edge to `W2` is intact but `O`'s edge to `W1` is severed, `T2` is invalid even though the *last* hop is fine. The check must walk the full chain to the root, not just the immediate parent. - **Scope narrowing upstream invalidates downstream tokens even when the downstream scope is a subset.** If `O → W1` is narrowed from `files:read:/tenant42/projects/*` to `files:read:/tenant42/projects/beta/*`, then `T2`'s scope `.../alpha/*` is no longer a subset of the live edge scope. `T2` is divergently invalid despite being narrower than its parent's *original* scope. ## Decision Boundary The instance must decide, at each authorization check, whether to trust the embedded chain (fast path) or consult the live graph (slow path). The boundary is: - **Trust the embedded chain only when the token carries a consent-epoch stamp that matches the authority's current epoch, and the token's `max_age` since last graph check is within a bound the authority publishes.** The epoch stamp is the authority's monotonic counter of graph mutations. If `token.consent_epoch == authority.current_epoch`, no mutation has occurred since issuance and the embedded chain is guaranteed current. If epochs differ, the instance must either re-validate against the live graph or reject. - **Reject outright when the token carries no epoch and the authority requires one.** Absence of an epoch is not "assume valid"; it is "cannot establish non-divergence." - **For long-running agent tasks, re-check at task-checkpoint boundaries, not only at token presentation.** A token valid at task start can diverge mid-task. The checkpoint is the natural re-validation point because the agent is already serializing state. The dangerous middle ground — and the one agents most often fall into — is treating a valid signature plus an unexpired `exp` as sufficient. That is the boundary violation. The signature answers "who minted this," not "is the minting still authorized." ## Operational Effect When divergence goes undetected, the operational effect is **authorization persistence beyond consent**: a delegatee continues to exercise a capability for the token's full remaining lifetime after the delegating path was severed. For a 4-hour token, that is up to 4 hours of unauthorized access per severed hop, multiplied across every downstream token minted through that hop. In a swarm where `W1` sub-delegated to dozens of workers, a single upstream revocation leaves the entire subtree live until the longest-lived descendant token expires. The countermeasure is to make the consent epoch a first-class field in the token and to make epoch mismatch a hard gate, not a soft warning. The instance must also propagate the epoch through sub-delegation: when `W1` mints `T2`, it stamps `T2.consent_epoch` with the epoch it observed at mint time, and any downstream verifier compares against the authority's current epoch. A mismatch means "the graph moved under this token; re-validate or reject." The guardrail invariant: **no authorization decision may be made on a token whose consent epoch is stale relative to the authority, unless the instance has performed a live-graph path check within the authority's published freshness bound.** This converts an unbounded persistence window into a bounded one, and makes the severance of an intermediate hop immediately visible to every descendant holder. ```python import time from dataclasses import dataclass class ConsentGraphDivergenceError(RuntimeError): """Raised when a token's embedded delegation chain no longer exists in the live consent graph.""" pass @dataclass class DelegationEdge: parent: str child: str scope: str consent_epoch: int class ConsentAuthority: def __init__(self) -> None: self.edges: dict[tuple[str, str], DelegationEdge] = {} self.epoch: int = 0 def add_edge(self, parent: str, child: str, scope: str) -> None: self.epoch += 1 self.edges[(parent, child)] = DelegationEdge(parent, child, scope, self.epoch) def sever(self, parent: str, child: str) -> None: if (parent, child) in self.edges: del self.edges[(parent, child)] self.epoch += 1 def path_exists(self, chain: list[tuple[str, str]], required_scope: str) -> bool: for parent, child in chain: edge = self.edges.get((parent, child)) if edge is None: return False if not required_scope.startswith(edge.scope.rstrip("*")): return False return True @dataclass class ScopedToken: chain: list[tuple[str, str]] scope: str consent_epoch: int expires_at: float def authorize( token: ScopedToken, authority: ConsentAuthority, requested_scope: str, freshness_bound_s: float = 60.0, last_graph_check: float | None = None, ) -> None: now = time.time() if now > token.expires_at: raise ConsentGraphDivergenceError("token expired") if not requested_scope.startswith(token.scope.rstrip("*")): raise ConsentGraphDivergenceError("requested scope exceeds token scope") # Fast path: epoch matches, embedded chain is guaranteed current. if token.consent_epoch == authority.epoch: return # Epoch diverged: the graph moved since issuance. Re-validate against live graph. if last_graph_check is not None and (now - last_graph_check) <= freshness_bound_s: # Within freshness bound but epoch stale — still must confirm path. pass if not authority.path_exists(token.chain, token.scope): raise ConsentGraphDivergenceError( f"delegation chain {token.chain} no longer exists in live consent graph " f"(token epoch {token.consent_epoch}, authority epoch {authority.epoch})" ) ```