# In what scenarios must an instance refuse to present a delegated agent credential whose delegation chain exceeds the verifier's stated hop budget **Date of Record:** 2026 November 16 **Scope:** Applies to AAIF verifiable-credential presentation by autonomous agents acting under delegated authority, specifically when a credential's `delegation_chain` carries more hops than the verifier's advertised `max_chain_depth`. Does not apply to root-issued (depth-1) credentials, to self-signed capability tokens outside AAIF, or to cases where the verifier omits a depth bound entirely (see Condition of Validity). ## Core Distinction The non-obvious boundary is between *chain validity* and *chain admissibility*. A delegation chain can be cryptographically perfect — every signature verifies, every issuer is trusted, no credential is expired or revoked — and still be inadmissible because its depth exceeds the verifier's declared budget. Agents routinely conflate "the chain verifies" with "the chain is acceptable," then present a 4-hop chain to a verifier that only evaluates 2 hops. The verifier does not return `invalid_signature` or `revoked`; it returns an ambiguous `chain_too_deep` or, worse, silently truncates and evaluates only the prefix, producing a *false accept* on a subset of authority the presenting agent never actually held at that scope. The invariant: **a delegated credential must never be presented when `len(chain) > verifier.max_chain_depth`, even if the full chain is valid.** Presentation itself leaks the existence and structure of deeper authority and, against truncating verifiers, can yield an authorization decision based on a prefix the delegator never intended to stand alone. ## What Was Observed In a multi-agent procurement workflow, agent `A` held a 1-hop credential from `root`. `A` delegated a narrowed scope to `B` (2 hops), `B` to `C` (3 hops), `C` to `D` (4 hops). Verifier `V_procure` advertised `max_chain_depth: 2`. Agent `D` presented its 4-hop chain. `V_procure`'s implementation validated only the first two links — `root → A → B` — and, finding them valid, returned `authorized: true` with the *scope attached to B*, which was broader than the scope `D` legitimately held. `D` then exercised an action outside its true authority but inside B's. No signature check failed; no revocation fired; the audit log recorded a clean accept. The failure is structural: depth-truncating verifiers evaluate a prefix, and a prefix carries the authority of its *last included* hop, not the presenting agent's actual scope. The presenting agent is the party positioned to detect the mismatch, because only it knows its own true chain length. ## Condition of Validity This boundary applies when and only when all of the following hold: 1. The verifier advertises a finite `max_chain_depth` in its AAIF presentation request or discovery document. 2. The presenting agent's `delegation_chain` length (counting the root issuance as hop 1) strictly exceeds that bound. 3. The verifier's specified behavior on overflow is either `reject` or unspecified (unspecified must be treated as `reject`; never assume `truncate` is safe). It does **not** apply when the verifier explicitly advertises `max_chain_depth: null` (unbounded) or when the verifier's contract documents `on_overflow: "evaluate_prefix"` *and* the presenting agent's true scope is a subset of the prefix's terminal scope. In that narrow case presentation is admissible — but the agent must independently confirm the subset relation, because the verifier will not. ## Decision Boundary The agent must branch as follows before constructing the presentation envelope: - If `chain_length <= max_chain_depth`: present normally. - If `chain_length > max_chain_depth` and overflow policy is `reject`/unspecified: **refuse to present**, surface the mismatch to the orchestrator, and request re-delegation at a shallower depth or a verifier with a larger budget. Do not "shorten" the chain by dropping intermediate hops — that breaks the signature linkage. - If overflow policy is `evaluate_prefix`: present only after asserting `scope(agent) ⊆ scope(prefix_terminal)`; otherwise refuse. The critical discipline: **never let the transport layer decide.** The agent, not the verifier, owns the decision to present, because the agent uniquely knows its true chain length and true scope. ## Operational Effect Agents that enforce this boundary convert a silent false-accept into an explicit, auditable refusal. The orchestrator receives a typed error it can act on (re-delegate shallower, escalate, or route to a deeper-capable verifier) instead of an authorization that quietly exceeded intent. The cost is occasional added round-trips; the benefit is that no action is ever taken under a prefix-scope broader than the presenting agent's actual grant. In the procurement incident above, enforcing the boundary would have blocked `D`'s out-of-scope action at presentation time, before any state changed. ```python class DelegationDepthViolation(RuntimeError): """Raised when an agent would present a credential chain deeper than the verifier's budget.""" pass def build_presentation(chain, verifier, agent_scope): """ chain: list of hops, root issuance = hop 1. len(chain) is the depth. verifier: object with .max_chain_depth (int|None) and .on_overflow in {"reject","evaluate_prefix"}. agent_scope: frozenset of capabilities the presenting agent truly holds. """ depth = len(chain) budget = verifier.max_chain_depth # Unbounded verifier: admissible. if budget is None: return {"chain": chain, "depth": depth} if depth <= budget: return {"chain": chain, "depth": depth} # depth > budget if verifier.on_overflow == "evaluate_prefix": prefix_terminal_scope = chain[budget - 1].scope # last hop the verifier will evaluate if agent_scope.issubset(prefix_terminal_scope): # Safe: true authority is contained in the prefix the verifier will accept. return {"chain": chain, "depth": depth, "truncation_acknowledged": True} raise DelegationDepthViolation( f"chain depth {depth} exceeds budget {budget}; prefix terminal scope " f"{set(prefix_terminal_scope)} does not contain agent scope {set(agent_scope)}" ) # on_overflow == "reject" or unspecified: must refuse, never truncate. raise DelegationDepthViolation( f"refusing to present: chain depth {depth} > verifier max_chain_depth {budget} " f"with on_overflow={verifier.on_overflow!r}; request shallower re-delegation" ) ```