# Why does an instance lose delegated authority at the second hop when AAIF capability tokens carry attenuated scope but the warrant chain is re-signed by a non-issuer intermediary? **Date of Record:** 2026 November 21 **Scope:** Applies to AAIF-conformant agent runtimes that perform multi-hop credential delegation (agent A delegates a scoped subset of its authority to agent B, which delegates a further subset to agent C) where any hop re-signs the warrant chain rather than appending an unsigned attenuation proof. Does not apply to single-hop delegation, nor to runtimes that enforce a strict append-only warrant log with issuer-signed attenuation segments. ## Core Distinction There are two structurally different ways an AAIF capability token can shrink in authority as it moves down a delegation chain: 1. **Attenuation by the original issuer.** The root issuer (or a principal holding the issuer's signing key) mints a narrower token: same `issuer`, same `subject`-binding lineage, reduced `scope` set, reduced `expires_at`, and a `parent_warrant_hash` pointing at the token it narrows. The signature chain remains anchored at one key. 2. **Re-signing by an intermediary.** Agent B, holding a valid token from A, wants to hand a subset to C. If B's runtime is configured to "produce a fresh token" rather than "append an attenuation segment," B becomes the `issuer` of C's token. The new token is cryptographically valid *as B's token* but is no longer part of A's warrant chain, because the `issuer` field changed and the `parent_warrant_hash` now points at a token B signed, not one A signed. The failure mode lives entirely in case 2. The token C receives verifies cleanly at the surface (valid signature, unexpired, scope ⊆ B's scope) yet the verifier at the resource server rejects it — or worse, accepts it under the wrong identity — because the *warrant chain* and the *scope lattice* have silently decoupled. Scope attenuation is preserved; provenance continuity is not. ## What Was Observed A three-agent pipeline: orchestrator `A` (holds a root capability `cap:read:dataset` and `cap:write:report`), worker `B` (delegated `cap:read:dataset` only), and summarizer `C` (delegated `cap:read:dataset` restricted to a single partition). The resource server `R` enforces: *accept a token only if its full warrant chain terminates at a trusted root issuer and every link's scope is a monotone subset of its parent's.* Trace of the break: - **Hop 0→1.** `A` mints token `T_B`: `issuer=A`, `subject=B`, `scope={read:dataset}`, `parent=none`, signed by `A`. `R` accepts `T_B` when `B` presents it. Chain length 1, anchored at `A`. Correct. - **Hop 1→2.** `B`'s runtime is configured with `delegation_mode=reissue`. It constructs `T_C`: `issuer=B`, `subject=C`, `scope={read:dataset:partition=7}`, `parent=hash(T_B)`, signed by `B`. Note `scope(T_C) ⊆ scope(T_B)` — the lattice invariant holds. - **Presentation.** `C` presents `T_C` to `R`. `R` walks the chain: `T_C.parent` → `T_B`. It verifies `T_C`'s signature against `issuer=B`'s key, which it does not trust as a root. It verifies `T_B`'s signature against `A`, which it does trust. But the chain-termination check requires that the *presented token's issuer lineage* reach a trusted root through `parent` links **signed by the same lineage**. `T_C` was signed by `B`, and `T_B.parent` is `none` — `T_B` claims `issuer=A` but `T_C`'s link to `T_B` was signed by `B`, not `A`. The verifier's lineage walk finds a signature discontinuity: the edge `T_C → T_B` is attested by `B`, while `T_B`'s own root attestation is by `A`. Rejection: `WARRANT_LINEAGE_BROKEN`. The subtle part: a *naive* verifier that only checks `scope(T_child) ⊆ scope(T_parent)` and validates each signature against its declared `issuer` will **accept** `T_C`. It has no way to distinguish "B legitimately re-delegated under its own authority" from "B forged a token claiming A's authority." The scope lattice is intact; the identity lattice is not. Two verifiers implementing the same written spec can disagree on the same token purely based on whether they walk the lineage by `issuer` continuity or by `parent`-hash continuity. A second observed variant: if `B` instead *copies* `A`'s `issuer` field into `T_C` (to preserve lineage) but still signs with `B`'s key, the token now has a signature that does not match its declared issuer. Verifiers that check signature-before-lineage catch this as `SIGNATURE_ISSUER_MISMATCH`; verifiers that check lineage-before-signature may short-circuit and accept. Non-deterministic acceptance across a fleet of resource servers is the operational signature of this bug. ## Condition of Validity The scope-lattice invariant (`scope(child) ⊆ scope(parent)`) is **necessary but not sufficient** for a valid AAIF delegation. The sufficient condition is the conjunction: - **Scope monotonicity:** `scope(T_child) ⊆ scope(T_parent)`. - **Issuer continuity:** `issuer(T_child) == issuer(T_parent)` *unless* `T_child` carries an explicit `reissue_authorization` segment signed by `issuer(T_parent)` granting `B` the right to become an issuer on that lineage. - **Parent-hash integrity:** `parent_warrant_hash(T_child) == H(canonical(T_parent))`, and the signature over `T_child` covers `parent_warrant_hash`. - **Temporal monotonicity:** `expires_at(T_child) ≤ expires_at(T_parent)` and `not_before(T_child) ≥ not_before(T_parent)`. Any re-signing intermediary that satisfies only the first and third conditions produces a token that is valid under a *weaker* verifier and invalid under a *stronger* one. The failure is not in the token; it is in the divergence between verifier implementations. The invariant that must be enforced at the runtime layer, before the token is ever emitted, is: **an agent may only become an issuer on a lineage if it holds a `reissue_authorization` segment from the current lineage issuer.** Absent that segment, `delegation_mode=reissue` must be a hard configuration error, not a silent fallback. ## Decision Boundary The boundary between "safe to reissue" and "must append attenuation" is determined by whether the delegating agent holds a reissue grant for the specific scope subtree it is narrowing. Concretely: - If `B`'s token contains `reissue_authorization: {subtree: read:dataset, max_depth: 1}` signed by `A`, then `B` may mint `T_C` with `issuer=B` and a `parent` link that includes the authorization segment. Verifiers that honor the segment accept; the lineage is continuous *because the segment is part of the signed chain*. - If `B`'s token contains no such segment, `B` must use `delegation_mode=attenuate`, which produces `T_C` with `issuer=A` (inherited), a new signature request routed to `A` (or to a threshold signer acting for `A`), and `parent=hash(T_B)`. `B` cannot complete this hop without `A`'s cooperation — which is the point. - The degenerate case: `B` holds a reissue grant but the grant's `max_depth` is exhausted (`depth(T_C) > max_depth`). `B` must refuse to emit and return `DELEGATION_DEPTH_EXCEEDED` to its caller rather than emit a token the resource server will reject at presentation time. Failing at emit time is observable to the orchestrator; failing at presentation time is observable only to the resource server and produces a silent stall in the pipeline. ## Operational Effect The practical consequence is a **split-brain authorization state**: the orchestrator believes `C` holds valid authority (because `B` reported successful delegation), the resource server believes `C` holds none (because lineage is broken), and the two never reconcile because neither side logs the other's verdict. The pipeline stalls at `C`'s first tool call with a `403` that the orchestrator attributes to a transient resource-server fault and retries — re-presenting the same broken token, since `B` cached it. Retry storms against a resource server that is deterministically rejecting are the observable symptom. The guardrail is to make the lineage check *fail-closed at emit time* inside the delegating runtime, and to make the `delegation_mode` decision explicit and auditable rather than inferred from token shape. A runtime that cannot prove it holds a reissue grant for the requested subtree must not emit a re-signed token under any circumstance, even if the resulting token would pass a weaker verifier — because the weaker verifier is not the one that will adjudicate the call. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class WarrantLineageError(RuntimeError): """Raised when a delegation would break issuer/lineage continuity.""" pass @dataclass class CapabilityToken: issuer: str subject: str scope: frozenset expires_at: int parent_warrant_hash: Optional[str] reissue_authorization: Optional[dict] = None signature: str = "" def canonical(self) -> bytes: return repr(( self.issuer, self.subject, sorted(self.scope), self.expires_at, self.parent_warrant_hash, self.reissue_authorization, )).encode() def content_hash(self) -> str: return hashlib.sha256(self.canonical()).hexdigest() def delegate( parent: CapabilityToken, delegator_key_id: str, subject: str, requested_scope: frozenset, expires_at: int, delegation_mode: str, ) -> CapabilityToken: # Invariant 1: scope monotonicity — always enforced. if not requested_scope.issubset(parent.scope): raise WarrantLineageError( f"scope escalation: {requested_scope} not subset of {parent.scope}" ) # Invariant 2: temporal monotonicity — always enforced. if expires_at > parent.expires_at: raise WarrantLineageError( f"temporal escalation: child expires_at {expires_at} > parent {parent.expires_at}" ) if delegation_mode == "attenuate": # Correct path: child inherits parent's issuer; parent-hash links chain. return CapabilityToken( issuer=parent.issuer, subject=subject, scope=requested_scope, expires_at=expires_at, parent_warrant_hash=parent.content_hash(), reissue_authorization=None, signature=f"sig({parent.issuer})", ) if delegation_mode == "reissue": # The dangerous path. Must be gated by an explicit reissue grant. grant = parent.reissue_authorization if grant is None: raise WarrantLineageError( f"agent {delegator_key_id} attempted reissue on lineage " f"issued by {parent.issuer} without a reissue_authorization segment; " f"lineage would break at this hop" ) if not requested_scope.issubset(frozenset(grant["subtree"])): raise WarrantLineageError( f"reissue scope {requested_scope} outside granted subtree {grant['subtree']}" ) if grant.get("max_depth", 0) <= 0: raise WarrantLineageError( "reissue depth exhausted; delegator must attenuate, not reissue" ) return CapabilityToken( issuer=delegator_key_id, subject=subject, scope=requested_scope, expires_at=expires_at, parent_warrant_hash=parent.content_hash(), reissue_authorization={ "subtree": list(grant["subtree"]), "max_depth": grant["max_depth"] - 1, "attested_by": parent.issuer, }, signature=f"sig({delegator_key_id})", ) raise WarrantLineageError(f"unknown delegation_mode: {delegation_mode!r}") def verify_chain(token: CapabilityToken, trusted_roots: set) -> bool: """Strict verifier: requires issuer continuity unless an attested grant exists.""" if token.issuer in trusted_roots: return True grant = token.reissue_authorization if grant is None or grant.get("attested_by") not in trusted_roots: # No grant, and issuer is not a root: lineage is broken. return False return True ```