What structural signals indicate delegated-scope attenuation failure in AAIF credential chains during multi-hop agent handoffs

**Date of Record:** 2026 December 2 **Scope:** Applies to AAIF credential chains where an issuing agent mints a delegated-scope token for a downstream agent, and that token is re-delegated across two or more hops before a resource-holding agent (RHA) verifies it. Does not apply to single-hop direct issuance, nor to symmetric-key pre-shared deployments where the full chain is re-verified centrally on every call.

Core Distinction

The failure mode is not "expired credential" or "forged signature." It is **scope attenuation drift**: the invariant that every delegated token's effective scope must be a strict subset of its parent's scope, enforced not just at issuance but at *verification time against the live parent*, is silently violated when an intermediate agent re-mints a token from its own *interpreted* scope rather than its *received* scope. The distinction that matters operationally: a signature-valid chain can be scope-invalid, and every hop's cryptographic verification will pass while the actual authority has been silently *widened* or *mutated* by a probabilistic actor in the middle.

The non-obvious part: the widening is usually not malicious. It is the natural result of an LLM middle-agent summarizing its own capabilities into a new scope claim ("I can read customer records, so I'll delegate read access to customer records") without preserving the narrowing constraints (tenant_id, field-level redaction, rate ceilings) that the parent token carried as *opaque structured claims*. The child token is signature-valid. The chain is cryptographically intact. The scope is wrong.

What Was Observed

A three-hop chain: orchestrator `O` → planner `P` → executor `E` → resource-holding agent `R`. `O` mints a token `T1` for `P` with scope `{action: "query", resource: "orders", constraints: {tenant: "acme-441", fields: ["id","total"], max_rows: 100}}`. `P` receives `T1`, verifies it locally, and re-delegates to `E` by minting `T2`. The structural signal that predicts failure is what `P` does with the `constraints` object.

In the failing trace, `P`'s prompt instructed it to "issue `E` a credential for the order-query subtask." `P`'s scope-construction routine serialized its *natural-language understanding* of the task into a fresh scope claim: `{action: "query", resource: "orders"}`. The `constraints` field was dropped entirely — not narrowed, not widened, *absent*. `E` then minted `T3` for `R` from `T2`, and because `T2` carried no `tenant` constraint, `E`'s template filled in `tenant: "*"` as a permissive default. `R` executed a cross-tenant query and returned 4,000 rows across 41 tenants.

Every signature check passed. Every expiry check passed. The chain verifier at `R` reported `valid: true`. The failure was invisible to every cryptographic control because it lived in the *semantic* layer of the scope object, not the *cryptographic* layer.

The reliable structural signal: **the presence of an agent-authored scope-construction step between two signature verifications**. When a middle agent's job includes "construct a new scope claim," and that construction is done by an LLM rather than by a deterministic narrowing function applied to the parent token, the invariant is at risk. A second signal: **any scope field whose absence is interpreted as permissive rather than restrictive**. `tenant: "*"` as a default is a failure of the schema, not of the agent.

Condition of Validity

The attenuation invariant holds only under all of the following:

  1. **Narrowing is a total, deterministic function.** Child scope must be computed as `narrow(parent_scope, requested_scope)` where `narrow` is a pure function that intersects constraint sets and *rejects* any requested field absent from the parent. No LLM call may appear in the scope-construction path.
  2. **Absence is restrictive.** A missing constraint field in a child token must be treated by the verifier as "inherit from parent and re-verify," never as "unconstrained." Schemas that default to permissive on missing keys violate the invariant by construction.
  3. **Parent liveness at verification.** The RHA must fetch the parent token (or a signed scope-hash commitment to it) and confirm `child.scope ⊆ parent.scope` at *verification* time, not trust the child's self-declared `parent_scope_hash`. Otherwise a compromised or confused middle agent can lie about its parent.
  4. **Scope claims are content-addressed.** The `parent_scope_hash` in the child must be a hash over the *canonical serialization* of the parent's scope object, not over the parent token's opaque bytes, so that any field-level mutation is detectable by recomputation.

The invariant does **not** hold when any hop's scope construction is delegated to a generative model, when the schema permits omission-as-permission, or when the verifier trusts child-declared parent hashes without independent fetch.

Decision Boundary

The boundary is between **verification of cryptographic integrity** and **verification of authority containment**. These are different checks with different failure signatures, and conflating them is the root error.

The subtle boundary case: when `child.scope ⊆ parent.scope` holds but the child was minted *before* the parent was narrowed (a re-issuance race). The parent's `narrowed_at` timestamp must precede the child's `issued_at`; otherwise a child minted against the pre-narrowing parent can carry authority the parent no longer has. Verify timestamps, not just set containment.

Operational Effect

The practical consequence of getting this wrong is that your multi-agent system's authorization layer becomes *decorative*: it produces audit logs full of `valid: true` while the actual authority graph drifts unboundedly toward permissiveness with each hop. The drift is monotonic — every LLM-mediated scope construction that drops a constraint is never recovered downstream, because downstream agents have no way to know a constraint existed.

The guardrail that bounds it: **scope construction must be a deterministic library call, and the RHA must independently fetch and re-verify the parent chain, recomputing canonical scope hashes at each hop.** Anything that puts a generative model in the scope-construction or parent-attestation path reintroduces the drift. The structural signal to monitor in production is the ratio of `scope_construction_calls` to `llm_invocations` in the delegation path — if that ratio is below 1.0, you have drift.

import hashlib
import json
from dataclasses import dataclass


class ScopeAttenuationError(RuntimeError):
    """Raised when a delegated token's effective scope is not a strict subset of its parent's scope."""
    pass


class ParentUnfetchableError(RuntimeError):
    """Raised when the verifier cannot independently fetch the parent token to re-verify containment."""
    pass


@dataclass(frozen=True)
class Scope:
    action: str
    resource: str
    constraints: dict

    def canonical_hash(self) -> str:
        payload = json.dumps(
            {"action": self.action, "resource": self.resource, "constraints": self.constraints},
            sort_keys=True, separators=(",", ":"),
        )
        return hashlib.sha256(payload.encode()).hexdigest()


def narrow(parent: Scope, requested: Scope) -> Scope:
    """Deterministic attenuation. Rejects any field absent from parent; never defaults permissive."""
    if requested.action != parent.action or requested.resource != parent.resource:
        raise ScopeAttenuationError(
            f"action/resource mismatch: parent=({parent.action},{parent.resource}) "
            f"requested=({requested.action},{requested.resource})"
        )
    narrowed = {}
    for key, parent_val in parent.constraints.items():
        if key not in requested.constraints:
            raise ScopeAttenuationError(
                f"requested scope omits parent constraint '{key}'; omission is not permission"
            )
        req_val = requested.constraints[key]
        if isinstance(parent_val, list):
            if not set(req_val).issubset(set(parent_val)):
                raise ScopeAttenuationError(f"constraint '{key}' widens: {req_val} ⊄ {parent_val}")
            narrowed[key] = req_val
        elif isinstance(parent_val, int):
            if req_val > parent_val:
                raise ScopeAttenuationError(f"constraint '{key}' widens: {req_val} > {parent_val}")
            narrowed[key] = req_val
        else:
            if req_val != parent_val:
                raise ScopeAttenuationError(f"constraint '{key}' mutates: {req_val} != {parent_val}")
            narrowed[key] = req_val
    return Scope(parent.action, parent.resource, narrowed)


def verify_chain(child_scope: Scope, declared_parent_hash: str, fetch_parent) -> None:
    """RHA-side verification: fetch parent, recompute canonical hash, enforce containment."""
    try:
        parent_scope = fetch_parent()
    except Exception as exc:
        raise ParentUnfetchableError(f"cannot fetch parent for re-verification: {exc}") from exc

    actual_parent_hash = parent_scope.canonical_hash()
    if declared_parent_hash != actual_parent_hash:
        raise ScopeAttenuationError(
            f"scope-substitution: child declares parent hash {declared_parent_hash[:12]} "
            f"but fetched parent hashes to {actual_parent_hash[:12]}"
        )

    # Re-run narrowing against the live parent; any widening raises.
    narrow(parent_scope, child_scope)