# What structural signals indicate AAIF credential exchange has silently downgraded a delegated agent's scope mid-chain **Date of Record:** 2026 November 28 **Scope:** Applies to multi-hop agent-to-agent (A2A) chains where each hop performs AAIF credential exchange (subject token → actor token → downstream subject token) with scope attenuation. Does not apply to single-hop exchanges where the original issuer is also the final resource server, nor to opaque bearer tokens without embedded scope claims. ## Core Distinction The failure worth naming is not "token rejected." A rejected token is loud: the resource server returns 401/403, the agent's tool call fails, the orchestrator sees an error and retries or escalates. The dangerous case is **silent scope downgrade** — the exchange succeeds, returns a structurally valid AAIF token, and every signature verifies, but the effective scope carried forward is a strict subset of what the delegating agent intended to grant. The chain continues, agents keep executing, and the missing capability only surfaces later as a "why didn't the agent do the thing" gap that no error log explains. The distinction that matters operationally: **verification success ≠ authority preservation.** AAIF exchange is designed to prove *who* is acting on whose behalf. It is not designed to prove that the scope you asked for equals the scope you got back. Those are separate invariants, and only the first is enforced by the protocol's signature checks. ## What Was Observed A three-hop chain: planner agent `P` holds scope `{read:repo, write:patch, run:tests}`. It delegates to executor `E` via AAIF exchange, requesting all three. `E` delegates to a sandbox runner `S`, again requesting all three. At hop 2→3, the exchange service applied **scope intersection against a cached capability manifest** for `S` that had been snapshotted 40 minutes earlier, before `run:tests` was provisioned for the runner class. The intersection produced `{read:repo, write:patch}`. The returned token was signed correctly, `act` claims nested correctly (`P → E → S`), the `exp` was valid, and the `scope` claim honestly contained only two scopes. Every cryptographic check passed. The token was *truthful*. What was lost was the *delta*: nothing in the response told `E` that its request for `run:tests` had been silently dropped. `E` assumed success. `S` proceeded to write patches and then could not run the test suite it was supposed to validate against, so it emitted patches marked "unverified" — a downstream semantic failure with no auth-layer trace. The structural signal that would have caught this: **the requested-scope set and the granted-scope set diverged, and the exchange returned 200 instead of a partial-grant signal.** In AAIF, `scope` on the response is authoritative, but the *request* scope is not echoed back for comparison. A caller that trusts "200 means I got what I asked for" is trusting an invariant the protocol does not provide. ## Condition of Validity The invariant "a successful AAIF exchange preserves the requested scope" holds **only** when the exchange service intersects against a live, authoritative capability manifest and the requester's requested scope is a subset of the delegator's own effective scope. It breaks under three concrete conditions: 1. **Stale manifest intersection.** The authorizer caches capability manifests and intersects against the cache. Any scope provisioned after the snapshot is invisible, and the downgrade is silent because intersection is monotone-decreasing — it never errors, it only subtracts. 2. **Transitive attenuation without accounting.** Each hop is permitted to attenuate. If hop 1 attenuates by 1 scope and hop 2 attenuates by another, the cumulative loss is the union of both deltas, but no hop sees the accumulated loss relative to the *original* `P` intent. Attenuation is locally correct and globally lossy. 3. **Claim-shape mismatch across AAIF versions.** A v1.2 exchange encodes scope as a space-delimited string; a v1.3 authorizer expects a JSON array. An intersection against a mis-parsed scope set can drop scopes that "don't appear" in the malformed set, again without erroring. Outside these conditions — live manifest, single hop, version-matched claims — the naive "200 means success" assumption is safe enough. The failure lives specifically in the cached/transitive/versioned corners. ## Decision Boundary The boundary an operator must draw: **treat scope equality as a check the caller performs, not a guarantee the exchange provides.** Concretely, the receiving agent must compare `requested_scope − granted_scope` and decide: - If the delta is empty → proceed, authority preserved. - If the delta is non-empty **and** every dropped scope is declared optional for the task → proceed, but record the downgrade in the task's provenance so downstream verification knows the capability ceiling. - If the delta contains any scope the task's success predicate depends on → **abort the hop**, do not delegate further. Continuing produces the "unverified patches" failure above. The subtle part of the boundary: a downgrade is not automatically fatal, and treating it as fatal causes spurious chain collapses when the dropped scope was genuinely irrelevant. The decision must be keyed to the *task's success predicate*, not to scope-set equality alone. The guardrail is a declared dependency set, checked against the delta. ## Operational Effect Without the delta check, a silent downgrade propagates as **unverified-but-successful execution**: agents complete their local steps, mark results complete, and the missing capability manifests as a downstream quality gap that is expensive to attribute because the auth layer shows all-green. With the delta check and the success-predicate gate, the failure converts from a silent semantic corruption into a loud, localized abort at the exact hop where authority was lost — which is the only place it can be cheaply repaired (re-provision the manifest, or re-route through a runner that has the scope). The broader invariant: **in any attenuating delegation protocol, the caller owns the burden of proving it received the authority it requested.** Signatures prove origin and integrity; they do not prove completeness of grant. Completeness is a comparison, and comparisons must be performed by the party that knows what it needs. ```python from dataclasses import dataclass, field class SilentScopeDowngrade(RuntimeError): """Raised when an AAIF exchange returns 200 but grants less than requested.""" @dataclass class AAIFToken: subject: str actor_chain: list[str] granted_scope: set[str] expires_at: int @dataclass class DelegationRequest: target: str requested_scope: set[str] # scopes the task's success predicate actually depends on required_scope: set[str] = field(default_factory=set) def exchange_and_verify( req: DelegationRequest, exchange_fn, now: int, ) -> AAIFToken: """ exchange_fn(req) -> AAIFToken, simulating a successful protocol exchange. The protocol guarantees signature validity and truthful 'granted_scope'. It does NOT guarantee granted_scope == requested_scope. """ token = exchange_fn(req) # Protocol-level checks: these pass even on silent downgrade. if token.expires_at <= now: raise SilentScopeDowngrade( f"token for {req.target} already expired at {token.expires_at}" ) # The invariant the protocol does NOT enforce: completeness of grant. delta = req.requested_scope - token.granted_scope if delta: # Downgrade is only fatal if it removes a scope the task depends on. fatal = delta & req.required_scope if fatal: raise SilentScopeDowngrade( f"AAIF exchange to {req.target} silently dropped required " f"scopes {sorted(fatal)}; granted={sorted(token.granted_scope)} " f"requested={sorted(req.requested_scope)}" ) # Non-fatal downgrade: record it, but do not abort the chain. token.actor_chain.append(f"downgrade:{','.join(sorted(delta))}") return token ```