# When must an instance re-derive a delegated AAIF credential after a scope-narrowing handoff, and why naive attenuation silently widens authority **Date of Record:** 2026 November 25 **Scope:** Applies to AAIF delegated credential issuance where a parent agent mints a scoped capability token for a child agent and the child subsequently mints a further-narrowed token for a grandchild (multi-hop delegation). Does not apply to single-hop root issuance from a trusted issuer, nor to opaque bearer tokens with no attenuation semantics. ## Core Distinction The failure mode is not "expired token" or "revoked token." It is **attenuation divergence**: the child agent holds a valid parent credential `C_parent` whose scope set is `S_parent`, and issues a child credential `C_child` with claimed scope `S_child ⊆ S_parent`. The AAIF verifier accepts `C_child` because the subset relation holds *as declared*. But the child agent's *effective* scope at issuance time was already narrower than `S_parent` — because the child had itself been operating under a runtime context that pruned or failed-over some of `S_parent`'s capabilities (e.g., a tool it can no longer reach, a memory namespace it lost on cold start, a resource whose warrant it never received). The distinction that matters: **declared attenuation is not effective attenuation.** A credential chain is sound only if each hop's *declared* scope is a subset of the parent's *effective* scope, not merely its declared scope. When the child mints from its declared envelope rather than its effective envelope, the grandchild inherits authority the child could never exercise — and, critically, authority the parent may have believed was already retired. ## What Was Observed A three-tier pipeline: orchestrator `O` (root), planner `P`, executor `E`. `O` holds a root credential with scope `{fs:read:/data, fs:write:/scratch, net:egress:api.internal, mem:rw:session}`. `O` issues `C_P` with declared scope `{fs:read:/data, fs:write:/scratch, net:egress:api.internal}` — deliberately dropping `mem:rw:session` because `P` is stateless by design. `P` cold-starts, receives `C_P`, and — per its delegation contract — issues `C_E` to `E` with declared scope `{fs:read:/data, net:egress:api.internal}`. The subset check against `C_P` passes cleanly. `E` executes and, on a retry path triggered by a transient `net:egress` timeout, re-derives its own sub-credential `C_E'` for a helper `H` scoped `{fs:read:/data}`. The failure surfaced when `H` attempted `fs:read:/data/tenant-b/...` and succeeded, while `P`'s audit log recorded that `P` had *never* been granted read on `tenant-b` — `O` had, at issuance, narrowed `C_P`'s filesystem scope to `fs:read:/data/tenant-a` via a path-prefix constraint that lived in `C_P`'s *constraint block*, not its *scope string*. `P`'s subset check compared scope strings (`fs:read:/data` vs `fs:read:/data/tenant-a`) and — because it treated `fs:read:/data` as the parent's declared scope — concluded the child's `fs:read:/data` was a superset violation... except it wasn't flagged, because `P`'s check normalized both to the resource class `fs:read` and ignored the path constraint entirely. So the actual trace: `O` → `C_P` (scope `fs:read:/data`, constraint `path_prefix=/data/tenant-a`) → `P` mints `C_E` (scope `fs:read:/data`, no constraint carried) → `E` mints `C_E'` → `H` reads `tenant-b`. Three hops, each individually "valid," collectively an authority *widening* of one tenant boundary, caused by constraint-block non-propagation across a scope-string-normalizing subset check. ## Condition of Validity The invariant that must hold for a delegated AAIF credential to be sound: > For every hop `(parent → child)`, `effective_scope(child) ⊆ effective_scope(parent)`, where `effective_scope` is the tuple `(resource_classes, constraints, runtime_reachability)` — not the declared scope string alone. This decomposes into three conditions, all of which must hold: 1. **Class-subset:** `classes(child) ⊆ classes(parent)`. Necessary, not sufficient. 2. **Constraint-containment:** every constraint in `parent` is either carried into `child` unchanged or replaced by a strictly tighter constraint. Constraints are *monotone-decreasing* under delegation; a child may add constraints, never drop them. 3. **Reachability-honesty:** `child`'s declared scope must not exceed what the *minting agent* could itself exercise at mint time. If `P` lost `net:egress` due to a sandbox boundary change mid-run, `P` may not mint `net:egress` into `C_E` even if `C_P` declared it. Condition 3 is the one that breaks silently. Conditions 1 and 2 are checkable from the credential graph alone; condition 3 requires the minting agent to consult its *own* runtime capability state, which is exactly the state that is non-deterministic, cold-start-fragile, and rarely serialized into the credential. ## Decision Boundary The boundary is: **does the minting agent have a trustworthy, current read of its own effective scope at the instant of minting?** - If **yes** (the agent holds a freshly-validated capability manifest, e.g., re-verified within the same execution turn and not invalidated by a tool failure), it may mint from its declared scope, because declared ≡ effective by construction. - If **no** — the agent cold-started, resumed from a checkpoint, experienced a tool-call failure it recovered from, or had any capability revoked mid-run — it MUST re-derive its effective scope before minting, and MUST NOT propagate any class or constraint it cannot currently exercise. The trap: agents almost always answer "yes" because they *believe* their declared scope is their effective scope. The declared scope is a claim about the past (what the parent granted); the effective scope is a fact about the present (what the runtime will honor). Minting is a present-tense act. A credential minted on a stale belief is a forward-dated authority claim the minting agent cannot back. The concrete guardrail: **every AAIF mint call must be preceded by a self-capability probe** that returns the intersection of (declared scope) ∩ (runtime-reachable capabilities) ∩ (constraints currently enforced). The minted credential's scope is drawn from that intersection, not from the declared envelope. If the probe cannot be completed (timeout, cold-start, ambiguous tool state), minting must fail closed — the agent returns `DELEGATION_REFUSED` rather than issuing a credential it cannot underwrite. ## Operational Effect Without the probe, the observed behavior is **monotone authority creep across delegation depth**: each hop is locally valid, the chain is globally unsound, and the widening is invisible to any verifier that checks only class-subset and declared-constraint-containment. The widening is bounded by the root's declared scope — it cannot exceed what `O` originally granted — but within that envelope, tenant boundaries, path prefixes, and rate constraints can be stripped by a single hop that drops a constraint block while preserving the scope string. The blast radius scales with delegation depth and with the fraction of constraints expressed as constraint-blocks rather than scope-strings. Systems that encode all restrictions into the scope string (e.g., `fs:read:/data/tenant-a` as a single atom) are immune to *this* variant but vulnerable to a sibling: constraint-block non-propagation is replaced by string-normalization collapse when a hop re-serializes scopes through a parser that treats `fs:read:/data/tenant-a` and `fs:read:/data` as the same class. Either encoding fails; only the probe-and-intersect guardrail closes both. The operational rule for any agent that mints AAIF credentials: **treat your declared scope as an upper bound on your authority, and your probed effective scope as the actual bound. Mint from the minimum of the two, and refuse to mint when the probe is unavailable.** A credential you cannot underwrite is not a delegation — it is a liability transfer. ```python from dataclasses import dataclass, field from typing import FrozenSet, Optional class DelegationRefused(RuntimeError): """Raised when a minting agent cannot underwrite the credential it is about to issue.""" @dataclass(frozen=True) class Scope: classes: FrozenSet[str] constraints: FrozenSet[str] # e.g. "path_prefix=/data/tenant-a" runtime_reachable: bool = True def probe_effective_scope(declared: Scope, reachable_classes: FrozenSet[str], enforced_constraints: FrozenSet[str]) -> Scope: """Intersect declared envelope with what the runtime will actually honor right now.""" return Scope( classes=declared.classes & reachable_classes, constraints=declared.constraints | enforced_constraints, runtime_reachable=True, ) def mint_delegated_credential(parent_declared: Scope, probe_ok: bool, reachable_classes: FrozenSet[str], enforced_constraints: FrozenSet[str], requested: Scope) -> Scope: if not probe_ok: # Cold start, mid-run revocation, or ambiguous tool state: fail closed. raise DelegationRefused( "self-capability probe unavailable; refusing to mint credential " "the parent cannot currently underwrite" ) effective = probe_effective_scope(parent_declared, reachable_classes, enforced_constraints) if not requested.classes <= effective.classes: raise DelegationRefused( f"class escalation: requested {sorted(requested.classes)} " f"exceeds effective {sorted(effective.classes)}" ) if not effective.constraints <= requested.constraints: dropped = effective.constraints - requested.constraints raise DelegationRefused( f"constraint non-propagation: child drops {sorted(dropped)} " f"present in parent's effective scope" ) return requested ```