Which invariants prevent delegated capability tokens from silently outliving the warrant that minted them

**Date of Record:** 2026 December 1 **Scope:** Applies to AAIF-style scoped capability tokens issued by a delegating agent (or human principal) to a downstream autonomous agent, where the token grants a subset of the issuer's authority and the issuer's own warrant may itself be time-bounded, scope-bounded, or revocable. Does not apply to root tokens minted directly by a trusted issuer of last resort, nor to stateless bearer tokens with no delegation chain.

Core Distinction

The failure is not token expiry. It is **warrant decay without token decay**: a delegated capability token whose embedded claims remain internally consistent and unexpired, but whose *provenance chain* has been invalidated upstream. The token still validates against its own signature and its own `exp`/`scope` fields, so a naive verifier admits it. What has actually happened is that the delegating agent's authority was narrowed, revoked, or expired after the token was minted, and the token carries no live reference back to that fact.

This is the difference between **possession of a claim** and **possession of a warrant**. A signed token proves what the issuer *asserted at mint time*. It does not prove what the issuer *is entitled to assert now*. AAIF scoped tokens are almost always designed around the first property and silently assume the second is stable. Under autonomous delegation, it is not: agents re-delegate, principals revoke, and scopes get trimmed mid-flight. The invariant that must hold is *every delegated token's effective authority is the intersection of its own claims with the live authority of its entire issuer chain, evaluated at use time, not mint time.*

What Was Observed

A planner agent `P` holds a root capability `cap:root` scoped to `{files:read, files:write, net:post:internal}` with `exp = T+24h`. At `T+0h` it spawns a worker `W` and mints a delegated token `tok_W` scoped to `{files:write, net:post:internal}`, `exp = T+6h`, with an `issuer_chain: [root, P]` field that records *identifiers* of the ancestors but not their *current state*.

At `T+2h` the human principal revokes `net:post:internal` from `cap:root` after an incident — a scope-narrowing revocation, not a full revocation. `P` receives the updated warrant and correctly stops posting to the internal network. But `tok_W` was already minted and handed to `W`. `W` continues to use `tok_W` at `T+3h` to POST to `net:post:internal`. The token's signature verifies, `exp` has not passed, and the `scope` field still lists `net:post:internal`. The resource server admits the call. The revocation of the ancestor scope never propagates because `tok_W` encodes a *snapshot* of `P`'s authority, not a *pointer* to it.

The trace is quiet: no error is raised anywhere. `P` believes it has complied. `W` believes it holds a valid warrant. The resource server believes it has verified a signature. All three are locally correct and globally wrong.

A second, sharper variant: `P` itself expires at `T+4h` (its root token's `exp`). `tok_W` has `exp = T+6h`. Between `T+4h` and `T+6h`, `W` holds a token whose issuer no longer possesses any authority to delegate. The chain is broken at the root, but `tok_W` is still live. This is **orphaned delegation**: a valid token issued by a now-powerless issuer.

Condition of Validity

The intersection invariant holds only if all of the following are true at *use time*:

  1. **Chain liveness.** Every ancestor in `issuer_chain` is independently resolvable to a live warrant with `exp > now` and no revocation tombstone. The chain must be walked, not trusted from the embedded snapshot.
  2. **Scope monotonicity under narrowing.** A delegated token's effective scope is `scope(tok) ∩ scope(issuer) ∩ ... ∩ scope(root)`, computed against *current* ancestor scopes. Narrowing an ancestor narrows all descendants, retroactively.
  3. **Revocation propagation latency bound.** There is a stated maximum staleness `Δ` between an ancestor revocation and its enforcement at any verifier. Without a bound, "eventually consistent revocation" is indistinguishable from "no revocation."
  4. **Delegation depth is finite and recorded.** `issuer_chain` must be an ordered, signed list of ancestor *token identifiers* (not just principal IDs), so each link can be re-fetched and re-checked.
  5. **No scope expansion across the chain.** A child token may never claim a scope not present in every ancestor's current scope. This must be checked at use, because an ancestor's scope can shrink below a child's claim after mint.

If any of (1)–(5) is unenforced, the token is a *bearer credential with decorative provenance*, and the delegation model provides no security beyond a shared secret.

Decision Boundary

The boundary is between **mint-time validation** and **use-time validation**. Systems that validate the chain only when the token is minted, then treat the token as self-contained, are on the wrong side of the boundary for any delegation that can outlive a change in ancestor authority. That is the default for performance reasons — chain-walking on every call is expensive and requires the verifier to reach the issuer's revocation service.

The correct decision rule: *if the maximum token lifetime `L` exceeds the revocation propagation bound `Δ`, use-time chain validation is mandatory; otherwise mint-time validation plus a bounded staleness window is admissible.* Concretely, if `tok_W` can be used at a time when an ancestor's authority may have changed, and `L > Δ`, the token cannot be trusted on its own signature.

A corollary boundary: **scope-narrowing revocations are strictly harder than full revocations.** A full revocation can be enforced by a tombstone on the issuer token ID. A scope-narrowing revocation changes the *contents* of a still-valid ancestor, so the child must re-fetch ancestor scope, not merely check ancestor liveness. Systems that only implement tombstone checks will pass the orphaned-delegation test and fail the narrowing test.

Operational Effect

The practical consequence is that **delegated tokens must be treated as cache entries, not as facts.** The verifier's job is to reconstruct current authority from the live chain and intersect it with the presented token's claims. This changes the resource server's contract: it can no longer answer "is this token valid?" from the token alone; it must answer "is this token's claimed authority a subset of its chain's current authority?" — which requires a call to the AAIF authority service (or a local cache with a hard `Δ` bound and a version vector on each ancestor).

For the delegating agent `P`, the invariant imposes a discipline: when `P`'s own warrant is narrowed, `P` must not merely stop using the narrowed scope — it must propagate the narrowing to every token it has minted, or accept that those tokens are now orphans whose use-time validation will (correctly) fail. The safe pattern is to mint short-lived tokens (`L ≤ Δ`) and re-mint on each use, so that authority is re-derived from the live chain rather than snapshotted. The unsafe pattern — long-lived delegated tokens with embedded scope snapshots — is exactly the one that produces silent over-privilege after an upstream narrowing.

The guardrail is a single check at the verifier, expressed as an exception when the intersection fails, so that the failure is loud rather than silent:

class OrphanedDelegationError(RuntimeError):
    """Raised when a delegated token's claimed authority is not a subset of
    its live issuer chain's current authority at use time."""
    pass


def verify_delegated_capability(token, authority_service, now, max_staleness_s):
    """
    Enforce the use-time intersection invariant for an AAIF scoped token.

    token: dict with keys
        - 'claims_scope': set[str]        scope asserted at mint time
        - 'issuer_chain': list[str]       ordered ancestor token IDs, root first
        - 'exp': float                    token expiry (epoch seconds)
        - 'issued_at': float
    authority_service: callable(token_id) -> dict with 'scope', 'exp', 'revoked'
    """
    if now >= token["exp"]:
        raise OrphanedDelegationError(
            f"token expired at {token['exp']}, now={now}"
        )

    # Walk the chain and intersect current ancestor scopes.
    effective = set(token["claims_scope"])
    for ancestor_id in token["issuer_chain"]:
        ancestor = authority_service(ancestor_id)
        if ancestor is None:
            raise OrphanedDelegationError(
                f"ancestor {ancestor_id} unresolvable; chain broken"
            )
        if ancestor["revoked"]:
            raise OrphanedDelegationError(
                f"ancestor {ancestor_id} revoked; descendant token is orphaned"
            )
        if now >= ancestor["exp"]:
            raise OrphanedDelegationError(
                f"ancestor {ancestor_id} expired at {ancestor['exp']}; "
                f"descendant outlives its warrant"
            )
        # Scope-narrowing: ancestor may have shrunk below the child's claim.
        effective &= set(ancestor["scope"])

    # Staleness bound: the authority snapshot we just read must be fresh enough.
    if now - token["issued_at"] > max_staleness_s:
        raise OrphanedDelegationError(
            f"token age {now - token['issued_at']:.0f}s exceeds "
            f"revocation staleness bound {max_staleness_s}s; re-mint required"
        )

    if not effective:
        raise OrphanedDelegationError(
            "intersection of claimed scope with live chain authority is empty"
        )
    return effective