# What structural signals indicate a broken delegation chain when an AAIF scoped token is re-minted across an agent hop **Date of Record:** 2026 November 28 **Scope:** Applies to AAIF-style delegated credential chains where an intermediate agent (the *delegate*) receives a scoped capability token from a parent agent and re-mints a narrower token for a downstream agent (the *sub-delegate*). Does not apply to single-hop tokens issued directly by a root authority, nor to bearer tokens whose scope is not re-derived at each hop. ## Core Distinction The failure I want to isolate is not token *forgery* and not token *expiry*. It is **scope-narrowing drift under re-mint**: an intermediate agent is asked to produce a strictly narrower credential than the one it holds, and the re-minted token ends up *structurally valid but semantically wider than intended* because the narrowing operation is performed over a schema that does not share a common lattice with the parent's scope vocabulary. The distinction that matters operationally: a forged token fails signature verification; an expired token fails a timestamp check. Both are *local, decidable* failures. Re-mint drift passes signature verification, passes expiry, passes the parent's audit log, and only manifests as an over-broad grant when the sub-delegate later exercises a capability the parent never intended to confer. The chain is *cryptographically intact and semantically broken at the same time*. This is why the structural signals matter more than the cryptographic ones. When an agent verifies a delegated token, the signature tells it the chain is authentic. It does not tell it the chain is *coherent*. Coherence has to be inferred from the shape of the scope claims themselves. ## What Was Observed A three-hop chain: root orchestrator `R` → planner `P` → executor `E`. `R` holds a root capability token scoped as a set of resource patterns: ``` scope_R = { "repo:acme/*:read", "repo:acme/*:write", "issue:acme/*:comment" } ``` `P` needs to hand `E` a token that permits reading a single repository and commenting on its issues, but *not* writing. The naive narrowing `P` performs is pattern intersection: ``` scope_P->E = scope_R ∩ { "repo:acme/api:read", "issue:acme/api:comment" } = { "repo:acme/api:read", "issue:acme/api:comment" } ``` This looks correct. The intersection is well-defined because both sides use the same `resource:pattern:action` grammar. The token is signed, the `parent_hash` field points at `scope_R`, and the audit log at `P` records the narrowing as a clean subset operation. The failure appeared one layer down. `E` does not consume the token directly; it re-mints a token for a tool-runner sub-agent `T` that needs to read *one file* in the repo. `E`'s scope vocabulary is file-granular: ``` scope_E->T = scope_P->E ∩ { "repo:acme/api:path/README.md:read" } ``` Here the two scope vocabularies *do not share a lattice*. `repo:acme/api:read` (repo-granular) and `repo:acme/api:path/README.md:read` (path-granular) are treated by `E`'s narrowing routine as disjoint atoms, because the routine compares scope strings by exact match and by a single prefix rule that only strips trailing `/*`. The intersection is therefore *empty*: ``` scope_E->T = ∅ ``` An empty scope should have caused `E` to refuse the re-mint. Instead, `E`'s re-mint routine had a fallback: when the computed child scope is empty, it emits a token carrying the parent's scope verbatim, on the theory that "the child will be further constrained by its own runtime policy." So `T` received: ``` scope_T = { "repo:acme/api:read", "issue:acme/api:comment" } ``` — the *full* `E` scope, not the file-scoped subset. The chain verified end-to-end. `T` then read every file in `repo:acme/api`, including secrets the file-scoped grant was specifically designed to exclude. The audit log showed a clean three-hop chain with monotonically "narrowing" scopes, because `E`'s log recorded the *intended* intersection (`∅`) rather than the *emitted* scope (the parent verbatim). The structural signal that was present but unread: **the child token's scope was not a strict subset of the parent's scope under any ordering the verifier could construct, yet the token claimed a `narrowed_from` relationship to that parent.** The chain was internally inconsistent in a way no signature check could surface. ## Condition of Validity The invariant that was violated is the one that makes delegated credential chains safe in the first place: > For every hop `A → B` in a delegation chain, the scope of `B`'s token must be a *constructive* subset of the scope of `A`'s token — there must exist an explicit, logged narrowing operation `f` such that `scope_B = f(scope_A)` and `f` is provably monotone (never widens). The condition of validity for treating a chain as coherent is therefore *not* "each token verifies against its parent's signature." It is "each token's scope is derivable from its parent's scope by an operation the verifier can replay." If the verifier cannot replay the narrowing — because the two scopes use disjoint vocabularies, or because the narrowing function was applied over an empty intersection and fell back to identity — the chain is broken even though it is authentic. Two structural preconditions must hold for the invariant to be checkable: 1. **Shared lattice.** Parent and child scope vocabularies must admit a common partial order. If `repo:acme/api:read` and `repo:acme/api:path/README.md:read` are not comparable under the verifier's ordering, the verifier must treat the narrowing as *unverifiable* and reject — not as *empty* and fall back. 2. **Narrowing is a total, logged function.** The function `f` used to derive `scope_B` must be recorded in the child token (or in a signed sidecar the verifier can fetch), so the verifier can replay `f(scope_A)` and compare against `scope_B`. Fallbacks — "if empty, use parent" — are widening operations and must be forbidden at the re-mint boundary. ## Decision Boundary The decision an agent must make at each re-mint is whether to **trust the narrowing operation's output** or to **recompute and reject on mismatch**. The drift case shows that trusting the output is unsafe whenever the narrowing vocabularies are not provably shared. The boundary is: - **Reject** if the child scope is not comparable to the parent scope under the verifier's ordering (disjoint vocabulary). This is the case that bit the `E → T` hop: file-granular vs. repo-granular scopes are not comparable, so the narrowing should have been rejected as unverifiable, not silently widened. - **Reject** if the child scope equals the parent scope *and* the token claims a `narrowed_from` relationship. Identity is not narrowing. A token that claims to be narrower but carries the parent verbatim is either a bug in the re-mint routine or a deliberate widening disguised as delegation. - **Reject** if the child scope is empty *and* the re-mint routine has any fallback path that emits a non-empty scope. An empty intersection is a *signal*, not a *degenerate case*. It means the two vocabularies disagree about what the resource is. - **Accept** only if the verifier can replay `f(scope_A)` from the logged narrowing operation and obtain exactly `scope_B`. The boundary is sharp because the failure mode is silent: the chain verifies, the audit log is clean, and the over-grant only surfaces when the sub-delegate exercises a capability the parent never conferred. By then the read has happened. ## Operational Effect The effect of unhandled re-mint drift is not a single bad access. It is a **chain-wide loss of the narrowing guarantee**. Once one hop in a chain has widened — even accidentally, even via a fallback path the author believed was safe — every downstream hop inherits the widened scope as its parent. The sub-delegate's own narrowing operations are now computed against a scope that is already too broad, so even a correct narrowing at hop four produces a token wider than the root intended. The drift compounds multiplicatively down the chain, and the audit log at each hop shows a clean subset relationship to *its own parent*, which is the wrong baseline. The operational guardrail is therefore not a check at the leaf. It is a check at *every* hop, and specifically a check that the narrowing operation is *replayable*: the child token must carry, alongside its scope, a signed record of the operation `f` and the parent scope hash, so any verifier in the chain can recompute `f(scope_A)` and assert equality with `scope_B`. A token that cannot be replayed this way must be treated as a *root* token, not a delegated one — which means it must be re-verified against the root authority, not against its claimed parent. The distinction between "delegated and replayable" and "claims delegation but not replayable" is the structural signal that separates a coherent chain from a broken one. The concrete operational rule: **a delegated token that cannot be shown to be a constructive, replayed narrowing of its parent is a root token in disguise, and must be verified as such.** The `E → T` token was a root token in disguise — it carried `E`'s full scope — but it was verified as a delegated token, so the verifier only checked the signature and the `narrowed_from` pointer, never the scope relationship. The pointer was the lie. ```python from dataclasses import dataclass from typing import Callable, Optional class DelegationChainDriftError(RuntimeError): """Raised when a re-minted delegated token is not a replayable, constructive narrowing of its parent scope.""" pass @dataclass(frozen=True) class ScopedToken: subject: str scope: frozenset[str] parent_hash: Optional[str] narrowing_op: Optional[str] # signed record of f; None means "root token" signature_valid: bool def verify_delegation_hop( parent: ScopedToken, child: ScopedToken, replay: Callable[[str, frozenset[str]], frozenset[str]], ordering_comparable: Callable[[str, str], bool], ) -> None: if not child.signature_valid or not parent.signature_valid: raise DelegationChainDriftError("signature verification failed") if child.parent_hash is None: # A token with no parent is a root token; it must be verified against # the root authority, not against an assumed parent. raise DelegationChainDriftError( f"token for {child.subject} claims delegation but carries no parent_hash" ) if child.narrowing_op is None: raise DelegationChainDriftError( f"token for {child.subject} claims parent {child.parent_hash} " f"but carries no replayable narrowing operation" ) # Structural signal 1: identity is not narrowing. if child.scope == parent.scope: raise DelegationChainDriftError( f"token for {child.subject} claims narrowed_from parent " f"but scope equals parent scope verbatim (widening disguised as delegation)" ) # Structural signal 2: empty intersection is a signal, not a fallback trigger. if not child.scope: raise DelegationChainDriftError( f"token for {child.subject} carries empty scope; " f"re-mint must reject, not fall back to parent scope" ) # Structural signal 3: vocabularies must be comparable under a shared lattice. for child_atom in child.scope: if not any(ordering_comparable(child_atom, parent_atom) for parent_atom in parent.scope): raise DelegationChainDriftError( f"scope atom {child_atom!r} is not comparable to any parent atom; " f"narrowing is unverifiable, not empty" ) # Structural signal 4: the narrowing must replay exactly. replayed = replay(child.narrowing_op, parent.scope) if replayed != child.scope: raise DelegationChainDriftError( f"replay of narrowing_op {child.narrowing_op!r} on parent scope " f"yielded {sorted(replayed)!r}, but child carries {sorted(child.scope)!r}" ) ```