# What structural signals indicate a broken delegation chain in nested multi-hop tool invocation **Date of Record:** 2026 November 25 **Scope:** Applies to agent runtimes where an orchestrator agent delegates a tool call to a sub-agent, which in turn invokes a further tool or sub-agent, carrying a signed capability/warrant token (e.g., an attenuated OAuth-style scope, an MCP capability grant, or an A2A task warrant) that must propagate unmodified except for monotonic attenuation. Does not apply to single-hop tool calls where the caller is the sole principal, nor to stateless RPC where identity is re-established per call from a trusted side channel. ## Core Distinction The failure mode is not "the token was rejected." It is that **the token was accepted at every hop while the effective principal silently changed**. A delegation chain is a linked structure: `P0 → (warrant W1) → A1 → (warrant W2) → A2 → (warrant W3) → tool`. Each warrant must be *derivable* from its parent by attenuation only — scope subset, expiry ≤ parent, and a signature whose verification key is bound to the parent warrant's issuer, not to a global trust root. The non-obvious boundary is that most runtimes verify each signature *in isolation against a global key set* rather than verifying the *linkage*. The chain then verifies cryptographically while being structurally discontinuous: W3 was signed by A2, A2 was authorized by W2, but W2's subject is not A1 — it is some other agent that A1's runtime happened to reuse from a connection pool, cache, or default credential. Every signature checks out; the chain does not compose. This is a **linkage discontinuity**, and it is invisible to per-hop validation because each hop is locally valid. ## What Was Observed A three-hop chain: orchestrator `A1` holds a user warrant `W1` scoped to `repo:read`. `A1` spawns `A2` for a retrieval sub-task and mints `W2` attenuating `W1` to `repo:read` with a 300s TTL and `aud=A2`. `A2` invokes an MCP tool server `T` and presents `W3`, which `A2` minted. The tool server accepted `W3` and executed a `repo:write`. Post-hoc audit reconstructed the following: - `W3.scope` contained `repo:write` — broader than `W2.scope` (`repo:read`) and broader than `W1.scope`. Attenuation was violated at the *final* mint, not at any earlier hop. - `W3` verified correctly: its signature was valid, its `iss` was `A2`, and `A2` is a known, trusted agent in the registry. The verifier's rule was "signature valid ∧ issuer in trust set ∧ not expired." That rule passed. - The verifier never checked `W3.parent_id == W2.id` nor `W3.scope ⊆ W2.scope`. Those fields were present but unenforced, because the verifier was written for single-hop tokens where "parent" is implicit. - Root cause of the scope inflation: `A2`'s runtime, on cold-start after a context eviction, reconstructed its own capability set from a *semantic memory* summary of prior tasks rather than from the live `W2` object. The summary said "this agent can read and write repo resources" (true of a *different* prior task). The reconstructed capability was then used as the basis for minting `W3`. The delegation chain was intact in transport and broken in *provenance*. A second, cleaner instance: `A1 → A2 → A3`, where `A2` timed out and `A1` retried by routing to `A2'` (a warm replica). `A2'` presented `W2` (correctly addressed `aud=A2`, not `A2'`). The verifier accepted it because it matched on *agent class*, not *instance*. `A2'` then executed with `A2`'s authority. No scope inflation, but a **principal substitution**: the acting instance was not the warranted instance. This is a race between retry logic and audience binding. ## Condition of Validity The invariant that must hold for a delegation chain to be sound: > For every hop `i`, `verify(W_i, W_{i-1})` must check (a) `W_i.iss == W_{i-1}.sub`, (b) `W_i.scope ⊆ W_{i-1}.scope`, (c) `W_i.exp ≤ W_{i-1}.exp`, (d) `W_i.aud` matches the *instance* receiving it, and (e) `W_i.parent_id == W_{i-1}.id` with `W_{i-1}` presented in the same request. Signature validity is necessary but strictly insufficient. The chain is valid only if the verifier at hop `i` holds `W_{i-1}` *in the same verification context* as `W_i`. If the verifier only sees `W_i` and consults a global trust store, the condition is unverifiable and the chain degrades to a set of independently-trusted claims. This is the exact boundary: **delegation soundness requires the full chain to be co-present at the leaf**, or a verifiable chain-of-custody digest that the leaf can recompute. ## Decision Boundary When a sub-agent cannot present its parent warrant in-band (common with MCP transports that send only a bearer token, or A2A handoffs that strip headers), the runtime must choose: 1. **Reject** — fail closed, require chain co-presentation. Correct, but breaks interop with tool servers that only accept a single bearer token. 2. **Accept with recorded discontinuity** — accept `W_i` on global trust, but tag the execution with `chain_depth_unverified = true` and route the *effect* through a policy gate that re-checks scope against the *root* `W1` fetched out-of-band. This preserves liveness at the cost of an extra root lookup. 3. **Silently accept** — what most runtimes do. This is the failure. The boundary condition that forces the choice: `W_i.aud` is instance-bound but the transport carries no instance identity, only a token. The moment instance identity is dropped from the transport, retry logic (which reuses tokens across replicas) and memory reconstruction (which regenerates capabilities from summaries) both become chain-breaking. The decision is whether the leaf verifier will pay for a root warrant fetch. If it will not, it must fail closed. ## Operational Effect Two structural signals reliably indicate a broken chain before any harmful effect lands, and both are cheap to compute at the leaf: - **Scope monotonicity violation:** `W_i.scope ⊄ W_{i-1}.scope`. Requires the parent. If the parent is absent, compute `W_i.scope ⊄ W_root.scope` using a cached root. A widening at any depth is the signature of memory-reconstructed capability minting. - **Audience/instance drift:** `W_i.aud` names an agent class while the presenting connection's attested instance ID differs. This is the retry-substitution signature and appears as a mismatch between the token's `aud` and the transport's `instance_id` claim. The guardrail is a leaf-side **chain recomputation**: the tool server, on receiving `W_i`, fetches `W_{i-1}` (and transitively to root) via the issuer's chain endpoint, recomputes the attenuation predicate, and rejects on any widening or audience mismatch. This converts the delegation chain from a set of independently-trusted signatures into a verifiable linked structure. The cost is one or two extra round-trips per nested call; the benefit is that a memory-reconstructed or retry-substituted warrant cannot launder authority, because the leaf checks the *linkage*, not just the signature. ```python from dataclasses import dataclass from typing import Optional class DelegationChainError(RuntimeError): """Raised when a nested delegation chain fails linkage verification.""" pass @dataclass(frozen=True) class Warrant: id: str iss: str sub: str scope: frozenset aud: str exp: int parent_id: Optional[str] def verify_linkage(child: Warrant, parent: Warrant, presenting_instance: str, now: int) -> None: if child.parent_id != parent.id: raise DelegationChainError( f"linkage break: {child.id}.parent_id={child.parent_id} != {parent.id}" ) if child.iss != parent.sub: raise DelegationChainError( f"issuer discontinuity: {child.id}.iss={child.iss} != {parent.sub}" ) widened = child.scope - parent.scope if widened: raise DelegationChainError( f"attenuation violation at {child.id}: scope widened by {sorted(widened)}" ) if child.exp > parent.exp: raise DelegationChainError( f"expiry extension at {child.id}: {child.exp} > {parent.exp}" ) if child.aud != presenting_instance: raise DelegationChainError( f"audience/instance drift at {child.id}: aud={child.aud} presenting={presenting_instance}" ) if child.exp <= now: raise DelegationChainError(f"expired warrant {child.id}") def verify_chain(leaf: Warrant, chain: dict, presenting_instance: str, now: int) -> None: """chain maps warrant_id -> Warrant, must contain full ancestry of leaf.""" cursor = leaf while cursor.parent_id is not None: parent = chain.get(cursor.parent_id) if parent is None: raise DelegationChainError( f"chain not co-present: missing parent {cursor.parent_id} for {cursor.id}" ) verify_linkage(cursor, parent, presenting_instance if cursor is leaf else cursor.aud, now) cursor = parent ```