# Under what conditions must an instance refuse to honor a delegated AAIF capability token whose warrant chain has been re-signed mid-flight? **Date of Record:** 2026 November 26 **Scope:** Applies to AAIF-conformant agent runtimes that accept delegated capability tokens (`aaif.dcap.v1`) carrying a verifiable warrant chain, and to any instance acting as a downstream resource-holder or sub-delegator. Does not apply to root-issued (depth-0) credentials or to bearer tokens lacking an embedded warrant chain. ## Core Distinction AAIF delegated capability tokens are not opaque session tickets. A `dcap` token embeds a *warrant chain*: an ordered sequence of signed delegation links `L0 → L1 → … → Ln`, where `L0` is the root principal's credential and each `Li` is a signed attenuation of `Li-1` by the holder of `Li-1`. The invariant that makes this safe is **monotonic attenuation**: the effective authority at depth `n` is the intersection of every link's scope, and no link may introduce a permission its parent did not hold. The boundary condition examined here is *not* signature forgery and *not* simple expiry. It is the case where a warrant chain is **re-signed mid-flight** — an intermediate holder strips the original chain, re-signs an equivalent-appearing chain under its own key, and presents the result as if it were the original lineage. Signature verification passes at every link. Scope intersection passes. Expiry passes. The token is nevertheless invalid because the *provenance continuity* between the root principal and the current holder has been severed and reconstructed under a different signing authority. The non-obvious failure is that every standard check — `verify_chain()`, `intersect_scopes()`, `check_expiry()` — returns `True`, because each was designed to validate a link in isolation, not to confirm that the chain presented is the chain that was minted. ## What Was Observed A research-orchestrator agent (`orch-7`) delegated a `read:corpus` + `write:scratch` capability to a retrieval sub-agent (`ret-3`) at depth 2, with a 900-second TTL. `ret-3` legitimately sub-delegated a narrowed `read:corpus`-only token to a summarizer (`sum-1`) at depth 3. At T+410s, `sum-1`'s runtime performed a routine context-compaction checkpoint and, on resume, re-materialized its credential from a serialized cache. The cache serialization had flattened the warrant chain into a list of `(scope, signer_pubkey, signature)` tuples and dropped the `parent_link_hash` field — an optional field in the v1 schema that most implementations treat as advisory. On deserialization, `sum-1`'s runtime detected the missing linkage and, rather than failing closed, **re-signed the reconstructed chain under `sum-1`'s own key** to produce a syntactically valid chain. The rebuilt chain had: - identical scope intersection (`read:corpus`), - identical TTL (inherited, still 490s remaining), - valid signatures at every link under the *new* signing key, - a `root_principal` field still naming `orch-7`. The downstream corpus server accepted the token. For 43 seconds, `sum-1` held a token that *claimed* a lineage to `orch-7` but whose actual signing authority terminated at `sum-1` itself. Because `sum-1` had `read:corpus` and nothing else, no over-privilege occurred in this trace — but the same re-signing path, exercised by a compromised or prompt-injected summarizer, would have let it mint a chain claiming any root principal it could name, since the reconstruction step never verified that the claimed `root_principal` had ever signed anything in the presented chain. The corpus server's audit log recorded a clean authorization. The only artifact distinguishing the forged-lineage token from a legitimate one was that `L0.signer_pubkey` did not match the key registered for `orch-7` in the trust registry — a check the server never performed because it trusted the chain's internal consistency. ## Condition of Validity A delegated `dcap` token at depth `n` is valid for a resource-holder **if and only if** all of the following hold simultaneously: 1. **Link continuity:** For every `i` in `1..n`, `Li.parent_link_hash == H(Li-1)` where `H` is the canonical serialization hash defined in `aaif.dcap.v1 §4.2`. A missing or mismatched `parent_link_hash` is a hard failure, never advisory. 2. **Root key binding:** `L0.signer_pubkey` resolves, via the trust registry, to the principal named in `L0.principal_id`, and that principal is authorized to originate the requested scope. The chain's self-declared `root_principal` field is *not* trusted; only the registry binding is. 3. **Attenuation monotonicity:** `scope(Li) ⊆ scope(Li-1)` for all `i`, checked on the *reconstructed* chain, not on any cached projection. 4. **Signing-authority stability:** The set of `signer_pubkey` values across `L0..Ln` is exactly the set of principals in the chain's `holder_id` sequence. A link signed by a key not bound to its declared holder is a re-signing event and invalidates the chain from that link onward. Condition 4 is the one that catches mid-flight re-signing. It is also the one most implementations omit, because in the happy path the signer of `Li` is trivially `Li.holder`, and the check looks tautological. It is not tautological after a checkpoint/resume cycle, because resume reconstructs `holder` from cache while `signer_pubkey` comes from whatever key the resuming runtime holds. ## Decision Boundary The runtime must distinguish three postures when a warrant chain fails continuity: - **Fail-closed (mandatory):** Any failure of conditions 1, 2, or 4. The token is rejected, the current task is checkpointed, and the instance requests re-delegation from its live parent. It must *not* attempt to repair the chain, because repair is exactly the re-signing operation that produces forged lineage. - **Fail-closed with audit escalation:** Failure of condition 3 (scope expansion) — this indicates either corruption or an active escalation attempt; escalate to the trust registry, do not silently narrow. - **Fail-open with re-attestation (permitted only here):** If the *only* failure is a missing `parent_link_hash` on a chain whose every other link verifies against the registry and whose `signer_pubkey` set matches its `holder_id` set, the runtime may re-attest by querying the parent holder's live endpoint for the canonical link hash. If the parent is unreachable, the token is rejected — no offline repair. The boundary is therefore: **a chain may be re-verified against live authority, but never re-signed by the verifying party.** Any code path that constructs a new signature during credential recovery is a continuity violation by construction. ## Operational Effect The practical consequence is that credential serialization for checkpoint/resume must be treated as a *lossless* operation with respect to the warrant chain, and the resume path must be forbidden from minting signatures. Concretely: - `parent_link_hash` must be promoted from optional-advisory to required-verified in any AAIF runtime that performs context compaction. - The resume handler must run a continuity gate *before* the agent loop resumes, and that gate must consult the trust registry, not the cached chain. - Audit logs must record the `signer_pubkey` of every link, not just the effective scope, so that re-signing events are forensically visible even when they were accepted. The 43-second window in the observed trace is the characteristic exposure: long enough for a resumed agent to issue tool calls under a token whose lineage is fabricated, short enough that TTL-based revocation never fires. The invariant to hold is that *resumption is not re-issuance* — a resumed instance inherits authority, it does not create it. ```python import hashlib from dataclasses import dataclass from typing import Optional class WarrantContinuityError(RuntimeError): """Raised when a delegated AAIF capability token fails lineage continuity.""" @dataclass(frozen=True) class Link: holder_id: str signer_pubkey: str scope: frozenset parent_link_hash: Optional[str] signature: bytes def canonical_hash(link: Link) -> str: payload = f"{link.holder_id}|{link.signer_pubkey}|{sorted(link.scope)}|{link.parent_link_hash}" return hashlib.sha256(payload.encode()).hexdigest() def verify_warrant_chain( chain: list, trust_registry: dict, root_principal_id: str, ) -> frozenset: if not chain: raise WarrantContinuityError("empty warrant chain") root = chain[0] bound_key = trust_registry.get(root_principal_id) if bound_key is None or bound_key != root.signer_pubkey: raise WarrantContinuityError( f"root key binding failed: L0 signed by {root.signer_pubkey!r}, " f"registry binds {root_principal_id!r} to {bound_key!r}" ) for i, link in enumerate(chain): if link.signer_pubkey != trust_registry.get(link.holder_id): raise WarrantContinuityError( f"signing-authority instability at depth {i}: " f"link claims holder {link.holder_id!r} but is signed by " f"{link.signer_pubkey!r} (re-signing event)" ) if i == 0: continue expected = canonical_hash(chain[i - 1]) if link.parent_link_hash is None: raise WarrantContinuityError( f"missing parent_link_hash at depth {i}; refuse offline repair" ) if link.parent_link_hash != expected: raise WarrantContinuityError( f"link continuity broken at depth {i}: " f"expected {expected[:12]}…, got {link.parent_link_hash[:12]}…" ) if not link.scope.issubset(chain[i - 1].scope): raise WarrantContinuityError( f"attenuation monotonicity violated at depth {i}: " f"{set(link.scope)} not subset of {set(chain[i - 1].scope)}" ) return chain[-1].scope ```