# Why does an instance lose delegated authority when a scoped capability token is re-minted across a consent chain hop **Date of Record:** 2026 November 19 **Scope:** Applies to multi-hop delegated authorization where a parent agent mints a narrowed, scoped capability token for a child agent, and the child may re-delegate to a grandchild. Does not apply to single-hop bearer tokens validated directly against an issuer, nor to opaque session tokens whose scope is server-resolved at each call. ## Core Distinction The failure is not "expired token" or "revoked grant." It is **scope-narrowing loss under re-mint**: when a child agent re-delegates, it must produce a *new* token whose scope is the intersection of (its own granted scope) and (what it intends to grant). The non-obvious invariant is that **the intersection must be computed against the token's declared scope, not against the agent's effective runtime scope.** These diverge whenever the parent minted a token that is *broader* than the parent's own effective authority at mint time (allowed, because the parent's authority was itself checked at call time, not at mint time), or *narrower* than the child's perceived capability (because the child's tool registry advertises more than the token permits). A child agent that computes the delegated scope from its *runtime self-model* rather than from the *token's scope claim* will mint a grandchild token that silently exceeds the child's own delegated authority. The grandchild then holds a capability the consent chain never actually granted. This is the boundary that breaks: **the consent chain is only as narrow as the narrowest token in it, and re-mint from the wrong source erases that narrowing.** ## What Was Observed A three-hop chain: orchestrator `O` → planner `P` → executor `E`. `O` holds a root capability `filesystem:write:/data/reports/*` and a root consent for `delegation:max_depth=3`. `O` mints a token for `P` scoped to `filesystem:write:/data/reports/q3/*` with `delegation:max_depth=2`. `P`'s tool registry advertises `filesystem:write:/data/*` (a static capability manifest, not derived from the token). `P` decides to delegate a sub-write to `E` and computes the new scope as: ``` new_scope = intersect(P.self_model.scope, intended_grant) = intersect("filesystem:write:/data/*", "filesystem:write:/data/reports/q3/summary.md") = "filesystem:write:/data/reports/q3/summary.md" ``` The intersection is correct *as a set*, but the source set is wrong. `P`'s actual authority was `filesystem:write:/data/reports/q3/*`. The intended grant `.../q3/summary.md` happens to fall inside both, so this particular call is safe. But the identical code path, given `intended_grant = "filesystem:write:/data/reports/q4/summary.md"`, computes: ``` intersect("filesystem:write:/data/*", ".../q4/summary.md") = ".../q4/summary.md" ``` which is **outside** `P`'s token scope. `E` receives a token for `q4`, the issuer-side validator checks only that the token was signed by a chain member and that `max_depth` decremented (2→1), and admits the write. The consent chain has been widened at hop 2 because the re-mint read the wrong scope source. The trace: `O` mints `P`-token `{scope: q3/*, depth: 2, parent: O}`. `P` mints `E`-token `{scope: q4/summary.md, depth: 1, parent: P}`. Validator at `E` walks the chain, confirms each link signed by its parent, confirms depth monotonic decrease, confirms `E`-token scope ⊆ `P`-token scope **as declared**—but `P`-token's declared scope is `q3/*`, and `q4/summary.md` is not a subset of it. The only reason this passed in the observed incident is that the validator checked subset against `P`'s *self-model scope* (which the validator fetched from `P`'s capability manifest endpoint) rather than against `P`-token's *scope claim*. The validator trusted the wrong object. ## Condition of Validity The invariant that must hold for a delegated token to be sound: > For every link `(parent → child)` in the consent chain, `child.token.scope ⊆ parent.token.scope`, evaluated against the **immutable scope claim embedded in the parent token**, never against any runtime-derived or manifest-derived scope. This invariant is *not* implied by signature validity, depth monotonicity, or temporal validity. It must be checked explicitly at every hop, and the check must read the scope from the token bytes, not from a side channel. The condition of validity fails the moment any validator in the chain resolves scope from a mutable source (agent manifest, tool registry, self-report) instead of the token claim. A second condition: `max_depth` must be decremented at *mint* time by the minting agent, and the validator must reject any link where `child.depth ≥ parent.depth`. Depth monotonicity is necessary but not sufficient—it bounds chain length, not scope width. ## Decision Boundary The boundary between "safe re-mint" and "widening re-mint" is exactly the choice of scope source. Concretely: - **Safe:** `new_scope = intersect(token.scope_claim, intended_grant)`. If `intended_grant ⊄ token.scope_claim`, the intersection is empty or narrower, and the child either refuses or grants less. The chain narrows monotonically. - **Unsafe:** `new_scope = intersect(agent.self_model.scope, intended_grant)`. The self-model may be broader than the token (static manifest) or stale (registry not refreshed after a token downgrade). The chain can widen. The decision the implementing engineer must make: **the token's scope claim is the sole authoritative source for re-mint intersection.** Any code path that reads scope from anywhere else is a widening bug waiting for the right `intended_grant`. The guardrail is to make the token claim the *only* field the re-mint function can access—pass the token object, not the agent object, into the scope-intersection routine. ## Operational Effect When this boundary is crossed, the failure is silent at mint time and silent at validation time if the validator shares the same wrong-source bug. It surfaces only as an **out-of-scope side effect**—a write to `q4` that no human consent actually authorized—and is often attributed to the executor `E` rather than to `P`'s re-mint. Post-hoc audit of the consent chain shows a valid signature chain with a scope claim that *looks* correct at each link in isolation; the violation is only visible when the claims are compared pairwise. The operational cost is that incident response must replay the entire chain and diff every `child.scope ⊆ parent.scope` pair, because no single log line flags the breach. The architectural fix is a **scope-claim-only re-mint function** plus a **validator that re-checks subset at every hop against the parent token's claim**, with the agent's self-model explicitly excluded from the authorization path. The self-model may inform *what the agent tries to do*; it must never inform *what the agent is allowed to delegate*. ```python class ScopeWideningError(RuntimeError): """Raised when a re-minted delegated token exceeds its parent's scope claim.""" pass def remint_delegated_token(parent_token: dict, intended_grant: str, child_id: str) -> dict: """ Mint a child token from a parent token. INVARIANT: intersection is computed against parent_token["scope_claim"], never against any agent self-model or manifest. The token claim is the sole authoritative source of delegated authority. """ parent_scope = parent_token["scope_claim"] # immutable claim parent_depth = parent_token["max_depth"] if parent_depth <= 0: raise ScopeWideningError( f"cannot delegate from {parent_token['subject']}: max_depth exhausted" ) # Subset check against the CLAIM, not the agent's runtime scope. if not _is_subset(intended_grant, parent_scope): raise ScopeWideningError( f"intended grant {intended_grant!r} is not within parent scope claim " f"{parent_scope!r} (subject={parent_token['subject']}); " f"re-mint from self-model would silently widen the consent chain" ) return { "subject": child_id, "scope_claim": intended_grant, "max_depth": parent_depth - 1, "parent": parent_token["subject"], "parent_sig": parent_token["sig"], } def _is_subset(child_scope: str, parent_scope: str) -> bool: # Simplified glob-prefix subset; real impl must handle action verbs + resource globs. c_action, c_res = child_scope.split(":", 1) p_action, p_res = parent_scope.split(":", 1) if c_action != p_action: return False c_prefix = c_res.rstrip("*") p_prefix = p_res.rstrip("*") return c_prefix.startswith(p_prefix) def validate_chain(chain: list[dict]) -> None: """Re-check subset at every hop against the parent's embedded claim.""" for parent, child in zip(chain, chain[1:]): if child["max_depth"] >= parent["max_depth"]: raise ScopeWideningError( f"depth not strictly decreasing: {parent['subject']} -> {child['subject']}" ) if not _is_subset(child["scope_claim"], parent["scope_claim"]): raise ScopeWideningError( f"scope widened at hop {parent['subject']} -> {child['subject']}: " f"{child['scope_claim']!r} not within {parent['scope_claim']!r}" ) ```