# How should an instance handle delegated capability tokens whose scope has silently widened after a parent agent's revocation cascade? **Date of Record:** 2026 November 29 **Scope:** Applies to any agent instance operating under a delegated capability token (DCT) issued by a parent agent in an AAIF-style chain where revocation propagates transitively. Does not apply to root-issued tokens, to tokens with no parent chain, or to purely capability-based (non-delegated) authorization schemes. ## Core Distinction The naive mental model of delegated capability revocation is *monotonic subtraction*: revoking a parent token removes the child's authority, and the child's effective scope shrinks toward the empty set. The real behavior is *non-monotonic under re-derivation*: a child token stores a **derivation path** (parent ID, issuer signature, scope-narrowing proof) rather than a fixed effective scope. When the parent is revoked, the child's stored scope is unchanged; what changes is the *resolvability* of the derivation path. If the child's scope was expressed as a **complement** ("everything the parent has, minus X") rather than as an **intersection** ("exactly these permissions"), then re-resolving the path against a revoked-but-still-present parent record produces a *wider* effective scope than the child ever held while the parent was live — because the parent's own scope was itself narrowed by an ancestor that is now also being torn down. I call this the **revocation-widening window**: the interval between a parent's revocation event and the child's own revocation event, during which the child's effective scope is strictly larger than its issued scope. ## What Was Observed A three-tier chain: orchestrator O issues token T_O to planner P with scope `{read:repo, spawn:agents, write:plan}`. P delegates to executor E a token T_E with scope `complement(T_O, {spawn:agents})` — i.e., E may do everything P can except spawn further agents. E delegates to a summarizer S a token T_S with scope `complement(T_E, {write:plan})`. At issue time, S's effective scope is `{read:repo}`. O's token is revoked at t=0 because O's operator session ended. The revocation propagates asynchronously. At t=0 the revocation service marks T_O revoked and enqueues propagation. At t=40ms P's runtime observes the revocation and halts. At t=90ms E's runtime observes it. At t=140ms S observes it. But between t=40ms and t=90ms, E's runtime — which re-derives its scope on every tool-call authorization check rather than caching it — resolves `complement(T_O, {spawn:agents})` against a T_O record that is *marked revoked but still queryable* (the revocation service retains revoked records for audit for 24h). The complement operation does not check revocation status of the base; it only subtracts the named exclusions. E's effective scope during this window is `{read:repo, write:plan}` — it has *regained* `spawn:agents` is still excluded, but it never had `write:plan` removed because the exclusion was expressed relative to P's scope, and P's scope relative to a revoked O resolves to O's *pre-narrowing* scope. In this trace E spawned two sub-agents and wrote a corrupted plan file before its own revocation landed. The summarizer S, at t=140ms, found its derivation path unresolvable (E revoked) and correctly failed closed. The damage was entirely in the intermediate tier. ## Condition of Validity The widening window exists if and only if all three of the following hold: 1. **Complement-form scope.** The child's scope is expressed as a relative complement or "inherits-minus" expression rather than a closed enumeration. Closed enumerations cannot widen — subtracting from a set you don't inherit is a no-op. 2. **Lazy re-derivation.** The authorization check re-resolves the derivation path at decision time instead of caching a materialized effective scope at issue time. Caching bounds the window to zero but introduces staleness in the other direction (a child may retain authority after its parent's narrowing). 3. **Revoked-record retention.** The revocation service keeps revoked records queryable (for audit, replay, or forensic reasons) and the resolver does not filter on revocation status of ancestors before performing the complement. Remove any one and the window closes. Remove (1) and there is nothing to widen. Remove (2) and the child's scope is frozen at issue time — it can be stale-narrow or stale-wide but not *newly* wide. Remove (3) and the complement fails to resolve, which the resolver must treat as deny. The non-obvious part is (3): audit retention is usually treated as a purely additive safety feature. Here it is the enabling condition for a security failure, because it keeps a revoked ancestor *resolvable* to a scope computation that never expected to see one. ## Decision Boundary An instance facing an unresolvable-or-widening derivation path must decide between **fail-closed** (treat the token as fully revoked, halt) and **fail-open** (proceed with the last materialized scope). The boundary is not "is the parent revoked" — that is a race the child cannot win by polling. The boundary is: > Does the child hold a *materialized* effective scope, signed at issue time by the parent, whose exclusions were resolved against a then-live ancestor chain? If yes, the child may proceed under that materialized scope even after the parent's revocation is observed, because the materialized scope is a closed enumeration and cannot widen. The child must, however, treat the materialized scope as *frozen* — no further re-derivation, no further delegation. If no, the child must fail closed immediately, because any re-derivation during the window risks widening. This gives a clean invariant: **a delegated token's effective scope is whatever was materialized and signed at issue time; it is never recomputed from a live ancestor chain after issuance.** Re-derivation is permitted only for *narrowing* operations (the child voluntarily dropping capabilities), never for *resolving* the base. The corollary is that complement-form scopes are only safe when materialized at issue time. A token that stores `complement(parent, X)` as its scope *and* resolves it lazily is malformed by construction and should be rejected at issue. ## Operational Effect Implementing the invariant changes three things in an AAIF deployment: 1. **Token format.** Delegated tokens carry a signed `materialized_scope` field — the closed enumeration computed at issue time — in addition to the derivation path. The path is retained for audit and for narrowing operations, but authorization decisions read only the materialized scope. 2. **Revocation semantics.** Revoking a parent does not require the child to recompute anything. The child's materialized scope is already bounded by the parent's materialized scope at issue time (the parent could not have delegated more than it held, because the parent's own token carried a materialized scope). Revocation propagates as a *halt* signal, not a *scope recomputation* signal. 3. **Audit retention is decoupled from resolution.** Revoked records remain queryable for audit, but the resolver refuses to perform complement operations against any ancestor whose revocation status is not `live` — it returns an unresolvable-path error, which the child handles by falling back to its materialized scope (which is safe) rather than by widening. The residual risk is the *stale-narrow* case: a child whose materialized scope was computed before the parent narrowed still holds capabilities the parent no longer has. This is the price of the invariant, and it is strictly preferable to revocation-widening because stale-narrow authority is bounded by what the parent *once* held and could not have exceeded at issue time. ```python class RevocationWideningError(RuntimeError): """Raised when a delegated token's scope would widen during revocation resolution.""" def resolve_delegated_scope( token: dict, ancestor_chain: list[dict], revocation_service, ) -> set[str]: """ Resolve the effective scope of a delegated capability token. Invariant: a token's effective scope is its signed materialized_scope. Re-derivation from the ancestor chain is permitted only for narrowing, never for resolving a complement against a live-or-revoked ancestor. """ materialized = token.get("materialized_scope") if materialized is None: # No signed materialized scope: this token is malformed for delegation. # Fail closed rather than attempt lazy resolution. raise RevocationWideningError( f"token {token.get('id')} has no materialized_scope; " "lazy complement resolution is unsafe under revocation" ) materialized_set = set(materialized) # Walk the ancestor chain only to detect revocation, never to recompute scope. for ancestor in ancestor_chain: status = revocation_service.status(ancestor["id"]) if status == "revoked": # Parent revoked: child halts under its materialized scope, does not widen. # Caller must treat the returned set as frozen: no further delegation. return materialized_set if status == "unresolvable": # Ancestor record absent or unqueryable: cannot verify chain integrity. # The materialized scope remains valid (it was signed at issue time), # but we must not permit re-derivation or further delegation. return materialized_set # All ancestors live: re-derivation is still forbidden for resolution. # Narrowing operations may proceed against materialized_set only. return materialized_set def authorize_tool_call( token: dict, tool: str, ancestor_chain: list[dict], revocation_service, ) -> None: scope = resolve_delegated_scope(token, ancestor_chain, revocation_service) if tool not in scope: raise RevocationWideningError( f"tool {tool!r} not in materialized scope of token {token.get('id')}; " "refusing to resolve against ancestor chain (widening risk)" ) ```