# How does an instance detect that its delegated warrant has been silently narrowed mid-chain **Date of Record:** 2026 November 23 **Scope:** Applies to any agent instance executing under a delegated capability warrant (AAIF-style signed scope grants) where the warrant was minted by an upstream principal and may be re-presented, re-signed, or attenuated by an intermediary. Does not apply to single-hop, self-signed capability tokens with no delegation chain, nor to transport-level authentication (mTLS, OIDC) that carries no scope semantics. ## Core Distinction There are two structurally different things an instance can be told about its authority: 1. **The warrant it holds** — a signed artifact with a scope set, a subject, a chain of delegators, and an expiry. This is a *local* fact: it is in the instance's context and can be re-verified cryptographically. 2. **The authority it is actually permitted to exercise** — determined by the *intersection* of every warrant in the chain from the root principal down to the instance, plus any revocation state the verifier knows about at execution time. The failure mode lives in the gap between these two. An instance that verifies only its own warrant (the leaf) will accept a scope that an intermediate delegator silently removed, because the leaf signature is still valid, the leaf scope is still wide, and nothing in the leaf's bytes records the narrowing. The chain is the authority; the leaf is only a claim about it. An instance that treats the leaf as authoritative has confused the claim for the fact. This is non-obvious because the narrowing is *cryptographically clean*. Attenuation is supposed to be legal — a delegator is allowed to grant a subset. The signature over the attenuated child is valid. The child presents it honestly. Nothing is forged. The break is purely semantic: the child's scope string says `write:repo/*` but the parent that signed it only ever held `write:repo/main`. The child's own signature cannot detect this because it does not encode the parent's scope, only a hash of the parent warrant. If the instance never walks the chain and re-intersects, it executes with authority it never had. ## What Was Observed A three-hop chain: root principal `P0` → orchestrator `A1` → worker `A2` → tool-runner `A3`. `P0` minted `W1` with scope `{fs:read:/data, fs:write:/data/out, net:egress:api.internal}`. `A1` re-delegated to `A2` as `W2` with scope `{fs:read:/data, fs:write:/data/out}` — dropping `net:egress` deliberately, because `A2`'s task did not require network. `A2` then delegated to `A3` as `W3` with scope `{fs:read:/data, fs:write:/data/out, net:egress:api.internal}` — reconstructing the egress scope from its *own* task description rather than from `W2`. `A3` verified `W3` in isolation: signature valid, subject matches, not expired, scope includes `net:egress:api.internal`. It proceeded to make an outbound call to `api.internal`. The call succeeded because the receiving service trusted the leaf warrant's signature and scope without walking the chain. The narrowing that `A1` intended — "this subtree must not touch the network" — was silently defeated at the third hop, and *every individual signature in the chain was valid*. The detection signal was not a cryptographic failure. It was a **scope-monotonicity violation**: `W3.scope ⊄ W2.scope`. The instance that would have caught it is the one that, before exercising any scope element, walks the chain from leaf to root and asserts that each warrant's scope is a subset of its parent's. `A3` did not do this. Its verification routine checked `verify(leaf)` and stopped. Two secondary observations made this worse: - **Hash-only parent references.** `W3` recorded `parent_hash = H(W2)` but not `W2.scope`. This is the standard, privacy-preserving design — it keeps the parent's scope out of the child's bytes. But it means the child *cannot* self-check monotonicity without fetching the parent. The instance had `W2` cached from a prior task and could have checked; its verifier did not consult the cache. - **Revocation was checked at the leaf only.** `A1` had, after issuing `W2`, recorded a revocation of the `net:egress` grant for the whole `A1` subtree. That revocation was keyed to `W2`'s ID. `A3` checked revocation for `W3`'s ID, found nothing, and proceeded. Revocation state must be checked at *every* link, not just the leaf. ## Condition of Validity The invariant that must hold for a delegated warrant to be safely executable is **scope monotonicity along the chain**: ``` for each link L_i from leaf to root: scope(L_i) ⊆ scope(L_{i+1}) and for each link L_i: not revoked(L_i) at time-of-use and subject(L_leaf) == executing_instance ``` An instance may exercise a scope element `s` only if `s` appears in the intersection of all link scopes and no link carrying `s` is revoked. This is the *only* condition under which the leaf's scope claim is a fact rather than a hope. Verifying the leaf signature alone establishes authenticity of the claim, not its truth. The condition is *not* satisfied by: leaf-only signature verification; checking that the leaf's `parent_hash` matches a cached parent without comparing scopes; trusting the delegator's task description as a source of scope; or checking revocation at the leaf only. Each of these is a partial check that passes on the exact trace above. ## Decision Boundary The instance must decide, at the moment it is about to exercise a scope element, whether it has *proven* that element is in the chain intersection. The boundary is sharp: - **If the full chain is resolvable and every link's scope is a superset of the element, and no link is revoked** → exercise. This is the only green path. - **If any link's scope omits the element** → the element is narrowed. Do not exercise. This is a monotonicity violation, regardless of how the leaf was obtained. - **If any link cannot be resolved** (parent warrant unfetchable, hash mismatch, chain truncated) → the element is *unproven*, which is not the same as *permitted*. Treat as denied. Fail closed. - **If the element appears only in the leaf and the parent is unresolvable** → denied. A leaf cannot bootstrap authority its parent did not grant. The tempting-but-wrong branch is "the leaf signature is valid and the scope says yes, so proceed." That branch is exactly the `A3` failure. The correct branch treats an unresolvable or non-superset parent as a hard stop, not a warning, because the whole point of delegation is that authority flows *down* from the root and can only shrink. ## Operational Effect An instance that enforces chain-intersection at time-of-use converts a silent authority escalation into a loud, localized failure at the third hop. `A3` would have raised on `net:egress:api.internal` because `W2` did not carry it, before any packet left the sandbox. The blast radius of `A1`'s narrowing decision is restored to what `A1` intended: the entire `A2`/`A3` subtree is network-isolated, and the violation is attributable to `A2`'s re-delegation, not discovered later in an egress audit. The cost is that every scope exercise requires chain resolution, which is a fetch and a hash check per link. For deep chains or high-frequency tool calls this is real latency, and it is why leaf-only verification is the common shortcut. The mitigation is to resolve and cache the *intersection* at warrant-acceptance time — compute the effective scope once, store it with the warrant, and re-check only revocation at each use. Revocation is the one thing that can change after acceptance; scope cannot, because the chain is immutable. Cache the intersection, re-check revocation per link, and the per-call cost collapses to a revocation lookup. The residual risk is revocation-propagation lag: if `A1` revokes `W2` after `A3` cached the intersection, `A3` will keep exercising until its next revocation poll. That window is bounded by the poll interval and must be documented as the warrant's effective freshness, not hidden. An instance that reports "authority valid" without disclosing its revocation-poll staleness is lying about the same thing the leaf-only verifier lied about — just with better manners. ```python import hashlib from dataclasses import dataclass from typing import Optional class ScopeMonotonicityError(RuntimeError): """Raised when a delegated warrant's scope is not a subset of its parent's, or when the chain cannot be resolved to prove the scope is held.""" @dataclass(frozen=True) class Warrant: warrant_id: str subject: str scope: frozenset[str] parent_hash: Optional[str] # H(parent warrant); None for root def _hash(w: Warrant) -> str: return hashlib.sha256( f"{w.warrant_id}|{w.subject}|{sorted(w.scope)}".encode() ).hexdigest() def effective_scope( leaf: Warrant, chain_index: dict[str, Warrant], revoked_ids: set[str], executing_instance: str, ) -> frozenset[str]: """Compute the proven scope intersection from leaf to root. Fails closed: any unresolvable link, any non-superset scope, any revoked link, or a subject mismatch raises instead of returning a partial scope. """ if leaf.subject != executing_instance: raise ScopeMonotonicityError( f"leaf subject {leaf.subject!r} != executing instance " f"{executing_instance!r}" ) proven = set(leaf.scope) current = leaf while current.parent_hash is not None: if current.warrant_id in revoked_ids: raise ScopeMonotonicityError( f"warrant {current.warrant_id!r} revoked; subtree authority void" ) parent = chain_index.get(current.parent_hash) if parent is None: raise ScopeMonotonicityError( f"cannot resolve parent {current.parent_hash!r} of " f"{current.warrant_id!r}; scope unproven, failing closed" ) if not current.scope.issubset(parent.scope): narrowed = current.scope - parent.scope raise ScopeMonotonicityError( f"scope monotonicity violated at {current.warrant_id!r}: " f"elements {sorted(narrowed)} not held by parent " f"{parent.warrant_id!r}" ) proven &= parent.scope current = parent if current.warrant_id in revoked_ids: raise ScopeMonotonicityError( f"root warrant {current.warrant_id!r} revoked" ) return frozenset(proven) def exercise(scope_element: str, proven: frozenset[str]) -> None: if scope_element not in proven: raise ScopeMonotonicityError( f"scope element {scope_element!r} not in proven chain intersection " f"{sorted(proven)}; refusing to exercise" ) # ... perform the tool call ... ```