# Why does an instance trust a delegated capability after the delegating broker has expired its own warrant? **Date of Record:** 2026 November 25 **Scope:** Applies to federated agent systems where an instance executes a capability that was delegated across an administrative boundary via a trust broker, and where the broker's own authorization warrant has a shorter lifetime than the delegated capability token it issued. Does not apply to single-domain delegation where issuer and executor share a trust root, nor to capability tokens whose validity is cryptographically bound to the issuer's live warrant. ## Core Distinction There are two structurally different things an agent can mean when it says "I am authorized to call `write:ledger` on org-B's resource": 1. **Possession of a capability token** — a signed grant that says *some issuer asserted* this instance may perform the action, valid until `not_after`. 2. **A live, verifiable chain of delegation** — every hop from the resource owner down to the executing instance can, *at execution time*, be re-verified against an unexpired warrant held by each delegating party. Federated trust brokering routinely conflates these. The broker signs a capability token with a long `not_after` (because the downstream task may run for hours), but the broker's *own* authority to delegate derives from a warrant — a policy assertion from its home org — that expires in minutes. The token outlives the authority that created it. This is the **orphaned delegation** failure: the executor holds a token whose entire justification has evaporated, and no local check notices, because the token verifies fine against the broker's signing key. ## What Was Observed A three-org federation: Org-A (resource owner of a `ledger` service), Org-B (trust broker, runs the delegation service), Org-C (executor, runs the task agent). The intended flow: - Org-A issues a **warrant** `W_A` to Org-B: "Broker B may delegate `write:ledger` to parties it vouches for, until T+300s." - Org-B, holding `W_A`, issues a **capability token** `C` to Org-C's agent: `write:ledger`, `not_after = T+3600s`, signed by B's key, with `W_A`'s hash embedded as `parent_warrant`. - Org-C's agent executes, presenting `C`. Org-A's resource gateway verifies `C`'s signature against B's published key, checks `not_after`, checks the embedded `parent_warrant` hash *exists* in its warrant registry, and admits the call. The failure trace, observed under a task that stalled and resumed: ``` T+000 W_A issued, expiry T+300 T+010 C issued to Org-C agent, not_after T+3600, parent_warrant=hash(W_A) T+020 Org-C agent begins task; calls write:ledger — admitted (W_A live) T+140 Task blocks on a slow upstream dependency; agent checkpointed to cold storage T+310 W_A expires. Org-B's delegation authority is now void. T+900 Agent resumes from checkpoint, replays its pending tool call T+901 Presents C to Org-A gateway T+902 Gateway verifies C.signature OK, C.not_after OK (T+3600), parent_warrant hash present in registry -> ADMITTED T+903 write:ledger executes under authority that no longer exists ``` The gateway performed **hash presence**, not **warrant liveness**. The registry entry for `hash(W_A)` persisted past `W_A`'s expiry — it was a record of issuance, not a record of current validity. The resume-from-checkpoint path (see the cold-start continuity problem) is what surfaced the bug: a continuously-running agent would have completed before `W_A` expired and never exposed the gap. The checkpoint/resume boundary is precisely where orphaned delegations get exercised, because the agent's memory of "I am authorized" is frozen at checkpoint time while the authority it depends on keeps ticking. Two compounding factors made this non-obvious: - **The token verified.** Every signature check passed. The failure was not cryptographic; it was a missing temporal re-derivation of authority. - **Policy translation hid it.** Org-B translated Org-A's warrant into Org-C's policy dialect, and in translation the `not_after` of the *warrant* was mapped onto the *token's* field, collapsing two distinct lifetimes into one. The translator treated "when does this grant end" and "when does my right to grant it end" as the same clock. ## Condition of Validity The invariant that must hold for a delegated capability to be soundly executable is: > For every capability token `C` presented at time `t`, there must exist a chain `C → W_n → W_{n-1} → … → W_0` where `W_0` is rooted in the resource owner, each `W_i` is unexpired at `t`, each `W_i`'s delegation scope contains the action in `C`, and each `W_i` was valid at the moment `W_{i+1}` was issued. The last clause is the one everyone forgets: a warrant must have been **live at issuance** of the child, *and* the whole chain must be **live at execution** of the leaf. Orphaned delegation violates the second clause. A subtler variant — **retroactive widening** — violates the first: a broker issues `C` at T+010 under `W_A` scoped to `read:ledger`, then `W_A` is reissued at T+050 scoped to `write:ledger`, and the broker claims `C` was always a `write` grant. The token's `parent_warrant` hash now resolves to a warrant that *does* cover `write`, but it didn't at issuance. This invariant only holds when the resource gateway can (a) resolve `parent_warrant` to the *exact version* of the warrant live at `C`'s issuance, and (b) re-check every hop's `not_after` against wall-clock at admission. If either is missing — hash-presence-only registries, mutable warrant records, or gateways that trust the token's self-declared lifetime — the invariant is unenforceable and orphaned delegation is latent. ## Decision Boundary The architect's choice is where to put the liveness check, and each placement has a distinct failure surface: - **Check at issuance only (broker-side):** cheapest, but any token whose `not_after` exceeds its parent warrant's `not_after` becomes an orphan the moment the parent expires. This is the observed failure. Reject this unless you also enforce `C.not_after ≤ W_parent.not_after` at issuance — a *lifetime-narrowing* rule that makes orphaned delegation structurally impossible. This is the correct default and the one most systems omit. - **Check at execution (gateway-side), hash-presence:** what was observed. Insufficient — presence ≠ liveness. - **Check at execution, full chain re-derivation:** sound, but requires the gateway to walk the chain and re-verify each hop's expiry and scope at `t`, and requires immutable, versioned warrant records so `parent_warrant` hashes are stable. This is the only placement that survives checkpoint/resume, because it re-derives authority from live state rather than trusting frozen agent memory. - **Delegated re-verification (broker attests liveness on demand):** introduces a new dependency — the gateway now blocks on the broker, and broker unavailability becomes an availability failure. Acceptable only with a signed, short-TTL liveness attestation the broker refreshes, which is just moving the expiry problem, not solving it. The boundary: enforce lifetime-narrowing at issuance *and* full-chain re-derivation at execution. Either alone leaves a gap — narrowing without re-derivation misses retroactive widening; re-derivation without narrowing lets tokens be minted that are doomed to orphan, creating a class of calls that *will* fail at resume and should have been rejected at mint. ## Operational Effect With only hash-presence checking, orphaned delegations execute silently and the audit trail is actively misleading: the gateway logs "admitted, parent_warrant present," which reads as a valid authorization. Post-incident reconstruction must re-derive expiry offline to discover the call was unauthorized at execution time. The blast radius scales with the ratio `C.not_after / W.not_after` — a broker issuing hour-long tokens under five-minute warrants creates up to twelve windows per warrant in which a resumed agent can act on dead authority. The checkpoint/resume path is the reliable detector: any agent that persists its "authorized" belief across a suspension will eventually present a token whose parent has expired, because agent memory is frozen while authority decays. Instrument resume paths specifically — assert at resume that every capability in the restored working set still has a live chain, and fail the resume (not the call) if any does not, forcing re-delegation through a fresh broker warrant rather than silently proceeding on a stale one. ## Guardrail Implementation The following validates a capability chain at both issuance and execution, enforcing lifetime-narrowing and full re-derivation. ```python import time from dataclasses import dataclass, field from typing import Optional class OrphanedDelegationError(RuntimeError): """Raised when a capability token's justifying warrant chain is not live at execution time, or when a token was minted with a lifetime exceeding its parent warrant's remaining validity.""" @dataclass(frozen=True) class Warrant: warrant_id: str issuer: str scope: frozenset[str] issued_at: float not_after: float version: int = 1 @dataclass(frozen=True) class CapabilityToken: token_id: str subject: str # executing instance, e.g. "org-c:task-agent" action: str # e.g. "write:ledger" issued_at: float not_after: float parent_warrant_id: str parent_warrant_version: int signature_ok: bool = True class WarrantRegistry: """Immutable, versioned warrant store. Records are append-only so that a token's parent_warrant (id, version) always resolves to the exact warrant live at issuance — never a later reissued version.""" def __init__(self) -> None: self._by_key: dict[tuple[str, int], Warrant] = {} def record(self, w: Warrant) -> None: self._by_key[(w.warrant_id, w.version)] = w def resolve(self, warrant_id: str, version: int) -> Optional[Warrant]: return self._by_key.get((warrant_id, version)) def mint_token( broker_warrant: Warrant, subject: str, action: str, requested_ttl: float, now: float, ) -> CapabilityToken: """Lifetime-narrowing: a token may never outlive the warrant that justifies it. This makes orphaned delegation structurally impossible at the source.""" if action not in broker_warrant.scope: raise OrphanedDelegationError( f"action {action!r} outside warrant scope {set(broker_warrant.scope)}" ) if now >= broker_warrant.not_after: raise OrphanedDelegationError( f"broker warrant {broker_warrant.warrant_id} already expired at mint time" ) # Clamp the token lifetime to the warrant's remaining validity. not_after = min(now + requested_ttl, broker_warrant.not_after) return CapabilityToken( token_id=f"cap-{subject}-{int(now)}", subject=subject, action=action, issued_at=now, not_after=not_after, parent_warrant_id=broker_warrant.warrant_id, parent_warrant_version=broker_warrant.version, ) def admit( token: CapabilityToken, registry: WarrantRegistry, now: float, ) -> None: """Full-chain re-derivation at execution. Rejects orphaned delegations even when the token's own signature and not_after are valid.""" if not token.signature_ok: raise OrphanedDelegationError(f"token {token.token_id} signature invalid") if now >= token.not_after: raise OrphanedDelegationError( f"token {token.token_id} expired at {token.not_after}, now={now}" ) parent = registry.resolve(token.parent_warrant_id, token.parent_warrant_version) if parent is None: raise OrphanedDelegationError( f"parent warrant {token.parent_warrant_id}" f"@v{token.parent_warrant_version} not found in registry" ) # (1) Warrant must have been live at token issuance. if not (parent.issued_at <= token.issued_at < parent.not_after): raise OrphanedDelegationError( f"parent warrant was not live at token issuance " f"(warrant window [{parent.issued_at}, {parent.not_after}), " f"token issued at {token.issued_at})" ) # (2) Warrant must be live NOW — this is the clause hash-presence checks skip. if now >= parent.not_after: raise OrphanedDelegationError( f"orphaned delegation: parent warrant {parent.warrant_id} expired at " f"{parent.not_after}, token {token.token_id} still presented at {now}" ) # (3) Scope must cover the action under the issuance-time warrant version. if token.action not in parent.scope: raise OrphanedDelegationError( f"action {token.action!r} not covered by warrant " f"{parent.warrant_id}@v{parent.version}" ) def resume_working_set( tokens: list[CapabilityToken], registry: WarrantRegistry, now: float, ) -> list[CapabilityToken]: """At checkpoint resume, re-derive liveness for every held capability. Fail the resume rather than let the agent proceed on dead authority.""" live: list[CapabilityToken] = [] for tok in tokens: try: admit(tok, registry, now) live.append(tok) except OrphanedDelegationError as exc: raise OrphanedDelegationError( f"resume refused: capability {tok.token_id} lost its authority " f"across suspension; re-delegation required. Cause: {exc}" ) from exc return live ```