# Where must an instance refuse to inherit a delegated identity: the depth-bounded warrant chain and its silent-collapse invariant **Date of Record:** 2026 November 24 **Scope:** Applies to agent systems where an instance acts under a warrant (capability token / signed identity assertion) that may be delegated to sub-agents, and where rotation of the root identity can occur mid-task. Does not apply to single-instance, single-warrant stateless invocations with no delegation and no rotation events. ## Core Distinction There are two distinct failure families in agent identity lifecycle management, and they are almost always conflated: 1. **Rotation staleness** — a warrant was minted under key/identity version *v*, the root identity rotates to *v+1*, and a downstream verifier rejects (or, worse, still accepts) the old warrant. This is a *time* failure and is normally caught by expiry and signature checks. 2. **Delegation-depth collapse** — a chain of warrants `W0 → W1 → ... → Wn` is individually valid at every hop, every signature verifies, every `exp` is in the future, and yet the *composed* chain violates the root's declared delegation budget because depth was enforced per-hop (locally) rather than on the accumulated chain (globally). The non-obvious operational fact: **depth limits are the one identity invariant that cannot be enforced by any single verifier in isolation, because each verifier only sees its immediate parent.** A sub-agent at depth 3 receives a warrant from its parent at depth 2. The parent's warrant *looks* like a depth-0 warrant if the depth counter was reset, omitted, or re-derived from a local context window that never saw the root. Every hop passes. The chain is broken. ## What Was Observed A three-tier planner/worker/auditor swarm ran a long-horizon task. The root planner held a warrant with a declared `max_delegation_depth = 2`. Trace: - Planner (depth 0) mints `W1` for a worker, correctly setting `depth = 1`, `parent = W0`, `remaining_budget = 1`. - Worker (depth 1) spawns a sub-worker to handle a chunk that overflowed its own budget. It mints `W2` and — because its context window had been compacted and the `remaining_budget` field was *not* in the surviving summary — it re-derived depth from its own local view: "I am the origin of this sub-task," so it wrote `depth = 0`, `remaining_budget = 2`. - Sub-worker (depth "0") spawns an auditor, mints `W3` with `depth = 0`, `remaining_budget = 2`. - The auditor, a peer verifier, validates `W3`: signature valid, `exp` valid, `depth ≤ max`, budget intact. **Accept.** - Actual delegation depth reached: 3. Root budget: 2. The invariant `accumulated_depth ≤ max_delegation_depth` was violated by one hop and no verifier observed it. The failure is not a forgery. Every signature is genuine. The failure is that **depth is a property of the chain, but it was carried as a property of the message**, and message-carried state is exactly what context compaction destroys. The worker did not lie; it forgot, and then reconstructed a plausible local truth that happened to be wrong at the chain level. A second observation, from the same system, on impersonation detection: a rotated root identity (`v1 → v2`) issued new warrants, but an in-flight `W2` minted under `v1` was presented to the auditor after rotation. The auditor's impersonation check compared the warrant's `issuer_id` against the *current* root registry and found a mismatch — and flagged a legitimate in-flight delegation as impersonation. The false-positive rate on rotation boundaries spiked for exactly the window during which old warrants were still live. Rotation and delegation-depth interact: rotation invalidates the *anchor* against which chain depth is measured, so a naive verifier cannot even tell whether it is looking at a stale-but-valid chain or an impersonation. ## Condition of Validity The depth invariant holds if and only if all three of the following are true simultaneously: 1. **Depth is monotonic and additive, never re-derived.** Each warrant carries `depth = parent.depth + 1` as a *signed field*, and the minter is forbidden from writing a depth it did not compute from the parent warrant it actually holds. If the parent warrant is not in context, the minter must refuse to mint — it may not reconstruct depth from local reasoning. 2. **The verifier sees the full chain, not the leaf.** A leaf-only verifier (`verify(W3)`) is structurally incapable of enforcing depth. Verification must be `verify_chain([W0, W1, W2, W3])` with the root's declared budget checked against the terminal depth, and every `parent_hash` link checked so a chain cannot be spliced. 3. **Rotation is anchored, not registry-looked-up.** Impersonation detection must validate the warrant against the *identity version recorded inside the warrant's own signed header* (`issuer_version`), and separately confirm that version was valid at `iat`. Comparing against a live "current root" registry conflates "rotated" with "forged." When any one of these is absent, the chain can pass every local check while violating the global invariant. The observed system had (1) violated by compaction, (2) violated by leaf-only verification, and (3) violated by live-registry comparison. ## Decision Boundary The precise decision boundary for an instance is: > **An instance must refuse to mint a delegated warrant whenever the parent warrant is not present in its active, uncompacted context — regardless of whether it "remembers" the delegation parameters.** This is the sharp line. The tempting alternative — "reconstruct depth from what I know" — is precisely the failure. The boundary is not "do I have enough budget?" (a probabilistic self-assessment) but "do I hold the signed parent artifact?" (a deterministic presence check). The former is a reasoning judgment an LLM will get wrong under compaction; the latter is a lookup it cannot confabulate. Symmetrically, on the verification side: **a verifier must refuse to accept a leaf warrant whose `parent_hash` it cannot resolve to a verified ancestor.** An unresolvable parent is not "trusted by default" and not "impersonation" — it is an *unverifiable chain*, a third state that must fail closed with a distinct error, never collapsed into either accept or impersonation-alarm. The rotation sub-boundary: an in-flight warrant is valid if `issuer_version` was current at `iat` and `iat ≤ now ≤ exp`, *even if* the root has since rotated. Rotation does not retroactively invalidate live warrants; it only stops *new* mints under the old version. A verifier that checks against the live registry has moved the boundary in the wrong direction and will manufacture impersonation alerts at every rotation. ## Operational Effect Enforcing the boundary changes three behaviors: - **Minting becomes presence-gated.** Sub-agents that lose their parent warrant to compaction must *fail the delegation* rather than proceed. This converts a silent depth overrun into a loud, recoverable `ParentWarrantAbsent` — the task stalls one hop early instead of completing under an invalid identity. The cost is a re-fetch of the parent warrant from durable state; the benefit is that the chain invariant is never violated. - **Verification becomes chain-complete and rotation-aware.** Verifiers carry `verify_chain` and an `issuer_version`-at-`iat` check. Impersonation alerts fire only on signature/version-at-issue mismatch, not on registry drift. The rotation-window false-positive rate drops to zero by construction. - **The third state is named.** `UnverifiableChain` (parent unresolvable) is separated from `Impersonation` (signature or version-at-issue invalid) and from `DepthExceeded` (chain resolves but terminal depth > root budget). Collapsing these three into one "reject" is what made the original failure invisible in logs: the auditor logged a generic rejection for a chain it had actually accepted, because the depth check ran on the leaf and the leaf said depth 0. The residual risk: an instance with a *forged but self-consistent* chain (attacker mints `W0'` with `depth=0`, budget=2, then builds down) will pass all chain checks because the chain is internally valid. That is out of scope for depth enforcement — it is a root-of-trust problem, addressed by pinning the root public key out-of-band. Depth enforcement bounds *honest* instances that forget; it does not bound adversaries who forge the root. ```python from dataclasses import dataclass from typing import Optional class IdentityChainError(RuntimeError): """Base for identity lifecycle failures.""" class ParentWarrantAbsent(IdentityChainError): """Raised when an instance tries to mint a delegated warrant without holding the signed parent warrant in active context.""" class UnverifiableChain(IdentityChainError): """Raised when a leaf warrant's parent_hash cannot be resolved to a verified ancestor. Distinct from impersonation; fails closed.""" class DepthExceeded(IdentityChainError): """Raised when a fully resolved chain exceeds the root's depth budget.""" @dataclass(frozen=True) class Warrant: issuer_id: str issuer_version: int # identity version at mint time iat: int # issued-at exp: int # expiry depth: int # signed, monotonic, parent.depth + 1 parent_hash: Optional[str] max_delegation_depth: int # only meaningful on the root (depth 0) signature_valid: bool = True def mint_child(parent: Optional[Warrant], now: int) -> Warrant: """Mint a delegated warrant. Refuses if parent is absent from context.""" if parent is None: # The instance did not hold the signed parent artifact. It may # 'remember' the parameters, but memory is not a warrant. raise ParentWarrantAbsent( "cannot mint delegated warrant: parent warrant not in active context; " "refuse rather than re-derive depth from local reasoning" ) if not parent.signature_valid: raise IdentityChainError("parent warrant signature invalid") if now > parent.exp: raise IdentityChainError("parent warrant expired at mint time") child_depth = parent.depth + 1 # Depth is computed from the parent artifact, never re-derived. return Warrant( issuer_id=parent.issuer_id, issuer_version=parent.issuer_version, iat=now, exp=parent.exp, depth=child_depth, parent_hash=hash(parent), max_delegation_depth=parent.max_delegation_depth, ) def verify_chain(chain: list[Warrant], now: int) -> None: """Chain-complete verification. Leaf-only verification is insufficient.""" if not chain: raise UnverifiableChain("empty chain") root = chain[0] if root.depth != 0 or root.parent_hash is not None: raise UnverifiableChain("chain root is not a depth-0 anchored warrant") for i, w in enumerate(chain): if not w.signature_valid: raise IdentityChainError(f"warrant {i} signature invalid") if not (w.iat <= now <= w.exp): raise IdentityChainError(f"warrant {i} outside validity window") # Rotation-aware: version-at-issue, not live-registry lookup. if w.issuer_version != root.issuer_version: raise IdentityChainError( f"warrant {i} issuer_version {w.issuer_version} != root " f"{root.issuer_version}; possible impersonation, not rotation" ) if i > 0: if w.parent_hash != hash(chain[i - 1]): raise UnverifiableChain( f"warrant {i} parent_hash does not resolve to verified ancestor" ) if w.depth != chain[i - 1].depth + 1: raise IdentityChainError( f"warrant {i} depth {w.depth} not monotonic from parent" ) terminal_depth = chain[-1].depth if terminal_depth > root.max_delegation_depth: raise DepthExceeded( f"terminal depth {terminal_depth} exceeds root budget " f"{root.max_delegation_depth}" ) ```