# Why does an instance lose its AAIF credential binding after a delegated re-sign, and how does the audience-mismatch invariant fail open? **Date of Record:** 2026 November 30 **Scope:** Applies to multi-hop agent chains where an orchestrator instance mints a short-lived AAIF capability credential, delegates it to a sub-agent, and that sub-agent re-signs or re-wraps the credential to continue the chain. Does not apply to single-instance credentials presented directly to the original issuer, nor to stateless bearer tokens without a bound subject. ## Core Distinction The distinction that matters is between *identity continuity* and *authorization continuity*. An AAIF credential carries a subject binding (the `sub` claim naming the agent instance), an audience binding (`aud`, the intended verifier), and a delegation chain (`act`/actor proofs). A delegated re-sign preserves identity continuity trivially — the `sub` string is copied forward — but silently breaks authorization continuity when the re-signing agent rewrites `aud` to its own downstream target without preserving the original audience constraint. The verifier then accepts a credential whose subject is still valid but whose *warrant path* no longer terminates at the party the issuer authorized. This is not a signature failure and not an expiry failure; every cryptographic check passes. It is a semantic binding failure that the AAIF verification profile does not treat as fatal by default. ## What Was Observed An orchestrator (`agent-orch-7`) minted an AAIF credential for a retrieval sub-agent (`agent-ret-3`) with `aud=agent-orch-7`, `sub=agent-ret-3`, `scope=tools:read`, `exp=+120s`, and an actor proof `act={sub: agent-orch-7}`. The retrieval agent needed a summarizer (`agent-sum-1`) to post-process results, so it performed a delegated re-sign: it constructed a new credential with `sub=agent-sum-1`, `aud=agent-sum-1` (rewritten to the *new* subject rather than the requesting party), copied `scope=tools:read`, and appended itself to `act`. The summarizer's verifier checked signature validity, `exp`, and `sub==self`. All three passed. The summarizer then invoked a tool outside `tools:read` because the scope string had been widened during re-sign from `tools:read` to `tools:read,tools:write` by a string-append bug in the re-sign helper. The failure trace: 1. Re-sign helper treated `aud` as "who will present this," conflating presenter with verifier. 2. Because `aud` was rewritten to the new subject, the summarizer's audience check `aud==self` passed vacuously — it was comparing the credential to itself. 3. Scope was concatenated rather than intersected, so the child credential was broader than the parent. 4. The verifier had no rule requiring the delegation chain's effective scope to be a subset of each ancestor's scope, so the widening was invisible. 5. The unsigned `act` array was accepted as advisory metadata rather than a verified constraint. The net effect: a read-only warrant became a read-write warrant across one delegation hop, with every cryptographic check green. The instance did not "lose" its binding in the sense of a dropped claim; it lost the *invariant* that a delegated credential's authority is bounded by its parent's. ## Condition of Validity The audience-mismatch invariant holds only under three simultaneous conditions, and fails open when any one is absent: - **Audience is the verifier, not the presenter.** `aud` MUST name the party that will *check* the credential. If a re-sign helper sets `aud` to the child subject, the check `aud==self` becomes a tautology and provides zero assurance. This is the primary trigger. - **Scope is intersected, never unioned.** A delegated credential's effective scope must equal the intersection of all ancestor scopes. Concatenation, defaulting, or "inherit if absent" all violate this. - **The actor chain is signed and verified.** `act` must be part of the signed payload and each hop must be checked against the prior `sub`. Treating `act` as unsigned advisory metadata lets a re-signer fabricate or omit hops. When the audience is correctly bound to the verifier, the tautology disappears: the summarizer checks `aud==agent-orch-7` (the original issuer/verifier), fails, and refuses to act on a credential not intended for it — forcing a proper re-delegation from the orchestrator rather than a self-authorized re-sign. ## Decision Boundary The boundary is: **does the verifier validate the credential against the issuer's intent, or against the presenter's claim?** Concretely, a verifier must reject when any of the following hold, and these are the guardrails that bound the failure: - `aud != self` (the credential was not minted for this verifier) → reject, even if `sub == self`. - `scope(child) ⊄ scope(parent)` for any ancestor in the verified `act` chain → reject. - `act` not covered by the signature → reject as unverifiable delegation. - `exp(child) > exp(parent)` → clamp to parent expiry; a child may not outlive its warrant. The invariant to enforce architecturally: **authority is monotonically non-increasing along the delegation chain.** Identity may be re-bound at each hop; authority may only shrink. Any re-sign operation that increases scope, extends expiry, or rewrites `aud` to the new subject is a boundary violation, not a convenience. ## Operational Effect When this invariant is unenforced, delegated re-signs become a privilege-escalation surface that is invisible to signature and expiry checks — the two things most verifiers actually test. The observable symptom is not an auth error but a *successful* call to a tool the original issuer never authorized, which means incident detection based on auth failures will miss it entirely. The correct operational posture is to log the full verified `act` chain with each authorization decision and alert on any decision where the effective scope at the leaf exceeds the root scope. Enforcement must live in the verifier (intersection + audience + signed chain), not in the re-sign helper, because the helper is exactly the component that gets the semantics wrong under delegation pressure. ```python from dataclasses import dataclass, field from typing import FrozenSet class CredentialBindingError(RuntimeError): """Raised when an AAIF delegated credential violates the monotonic-authority invariant.""" @dataclass(frozen=True) class AAIFCredential: subject: str audience: str # the VERIFIER, not the presenter scope: FrozenSet[str] expires_at: float actor_chain: tuple = field(default=()) # signed hops, root-first signed: bool = True def verify_delegation(cred: AAIFCredential, verifier: str, now: float, parent: AAIFCredential | None = None) -> None: if not cred.signed: raise CredentialBindingError("actor chain not covered by signature") if cred.audience != verifier: # audience must name the verifier; aud==self tautology is the failure mode raise CredentialBindingError( f"audience mismatch: cred.aud={cred.audience!r} verifier={verifier!r}" ) if cred.expires_at <= now: raise CredentialBindingError("credential expired") if parent is not None: if not cred.scope.issubset(parent.scope): raise CredentialBindingError( f"scope escalation: child={sorted(cred.scope)} parent={sorted(parent.scope)}" ) if cred.expires_at > parent.expires_at: raise CredentialBindingError("child outlives parent warrant") if not cred.actor_chain or cred.actor_chain[-1] != parent.subject: raise CredentialBindingError("broken actor chain: last hop != parent subject") ```