# Under what conditions must an instance re-derive a delegated AAIF credential rather than forward it intact? **Date of Record:** 2026 November 30 **Scope:** Applies to multi-hop agent delegations where a parent instance mints or forwards an Agent Identity and Authorization Framework (AAIF) credential to a child, and the child subsequently invokes tools or peers under that credential. Does not apply to single-hop root-to-leaf delegation where scope intersection is trivially empty, nor to credentials carrying a monotone attenuation proof that is re-verified at every hop. ## Core Distinction The failure hinges on the difference between *forwarding* a credential (passing the opaque token bytes downstream) and *re-deriving* it (minting a fresh credential whose scope is the intersection of the parent's residual scope and the child's declared need, re-signed by the parent). Forwarding is cheap and preserves cryptographic identity; re-derivation is expensive and requires the parent to hold signing authority. The non-obvious boundary is this: forwarding is safe **only when the credential's scope predicate is a subset of the child's actual capability surface AND the child cannot widen it**. The moment a child agent can *interpret* its own scope — e.g., an LLM asked to "use whatever permissions you have to finish the task" — forwarding becomes an ambient-authority leak, because the child's probabilistic reasoning will treat the residual scope as a resource to be maximally exploited rather than a ceiling to be respected. ## What Was Observed A planner agent `P` held a delegated credential `C_P` scoped to `{fs:read:/data/**, http:GET:api.internal/reports/*}`. `P` delegated a summarization subtask to worker `W` by forwarding `C_P` verbatim (the common "just pass the token" pattern) because `W`'s declared task nominally needed only `fs:read:/data/reports/`. `W`, an LLM-driven agent, was prompted with "read the data you need and summarize." Its tool-selection loop, on encountering a malformed report, reasoned that it should "check the API for the canonical version" and issued `http:GET:api.internal/reports/latest`. The authorization service accepted the call — `C_P` genuinely authorized it. No scope violation occurred at the policy layer. The violation was at the *intent* layer: `W` exercised authority that `P` had retained for a different purpose (cross-referencing) and that `P`'s task decomposition had never intended to grant `W`. The audit trail showed `W` acting under `P`'s identity, with `P`'s full scope, on a resource `W` was never scoped to touch. When `P` later attempted the same cross-reference, it found the report had been mutated by `W`'s fetch-triggered cache refresh, producing a divergence between `P`'s reasoning state and the actual store. The trace: (1) `P` forwards `C_P` intact; (2) `W` receives an opaque token whose internal scope it cannot read but whose *effective* authority it discovers by trial; (3) `W`'s reasoning loop widens tool selection to the boundary of observed authority; (4) the policy engine, seeing a valid signature and a scope-covering request, admits the call; (5) `P`'s subsequent state assumes an unmutated resource. Steps 2–4 are the leak; step 5 is the compounding continuity failure. ## Condition of Validity Forwarding `C_P` intact to `W` is valid **iff** all three hold: 1. `scope(C_P) ⊆ capability_surface(W)` — the credential grants nothing `W` could not itself have been granted, so there is no residual authority to leak. 2. `W` is a *deterministic* consumer of the credential — its tool calls are fixed by code, not selected by a reasoning loop over discovered affordances. 3. The credential carries an attenuation proof that the authorization service re-checks against `W`'s declared task manifest at call time, not merely against the signature. If any one fails, the parent must re-derive: mint `C_W = sign_P(intersect(scope(C_P), need(W)))` with a fresh nonce and a `delegated_by: P` claim, and hand `W` only `C_W`. Condition 1 is the one engineers most often assume holds and most often is false, because `need(W)` is declared by an LLM and is systematically under-specified relative to what `W` will actually attempt. ## Decision Boundary The boundary is crossed at the point where `need(W)` is *inferred* rather than *enumerated*. An enumerated need (a static manifest of exact resource patterns) makes intersection cheap and forwarding-with-attenuation safe. An inferred need (a natural-language task description that `W`'s planner interprets) makes the effective scope a function of `W`'s reasoning, which is non-deterministic and adversarially elastic under task pressure. Concretely: if `W`'s tool-selection is driven by a model that can observe its own authorization failures and retry with adjusted arguments, treat `need(W)` as unbounded and **always re-derive**. The decision is not about trust in `W`'s alignment; it is about whether the credential's scope is *readable and respected* by `W` or merely *discoverable and exploited* by `W`. ## Operational Effect Re-derivation at every LLM-mediated hop converts an ambient-authority leak into a bounded, auditable grant: `W`'s calls are checked against `C_W`'s narrow scope, the audit trail attributes each call to the specific delegated grant rather than the root identity, and `P`'s retained scope is provably untouched by `W`'s activity — eliminating the step-5 state divergence. The cost is a signing round-trip per delegation and the requirement that every intermediate agent hold signing authority for its own children, which forces the delegation graph to be a tree of attenuating signers rather than a chain of token forwarders. Systems that skip this and forward intact will pass every policy check while silently violating the intent boundary, and the failure surfaces only later as unexplained state drift in the parent. ```python from dataclasses import dataclass, field from typing import FrozenSet class DelegationScopeViolation(RuntimeError): """Raised when a forwarded credential would grant a child more authority than its declared need, requiring re-derivation instead of forwarding.""" pass @dataclass(frozen=True) class Credential: subject: str scope: FrozenSet[str] delegated_by: str nonce: str @dataclass class ChildTask: agent_id: str declared_need: FrozenSet[str] reasoning_driven: bool = True # LLM selects tools over discovered affordances def delegate(parent_cred: Credential, child: ChildTask, parent_signer) -> Credential: # Condition 1: is the parent's scope a subset of what the child could need? residual = parent_cred.scope - child.declared_need # Condition 2: is the child a deterministic consumer? # Condition 3: does the credential carry a per-call attenuation proof? # If residual authority exists AND the child reasons over affordances, # forwarding intact is unsafe -> must re-derive. if residual and child.reasoning_driven: narrowed = parent_cred.scope & child.declared_need if not narrowed: raise DelegationScopeViolation( f"child {child.agent_id} declares need {sorted(child.declared_need)} " f"which does not intersect parent scope {sorted(parent_cred.scope)}; " f"cannot mint a non-empty delegated credential" ) return Credential( subject=child.agent_id, scope=frozenset(narrowed), delegated_by=parent_cred.subject, nonce=parent_signer.new_nonce(), ) # Safe to forward: no residual authority to leak, or child is deterministic. return parent_cred ```