# Where must an instance re-derive its delegated capability scope when least-privilege attenuation is enforced across a multi-hop agent chain? **Date of Record:** 2026 November 30 **Scope:** Applies to any agent chain where a parent instance attenuates a capability (tool grant, MCP tool binding, filesystem/network scope) and delegates a strict subset to a child, and where the child may itself delegate further. Does not cover single-hop delegation where the root holds the only attenuated grant, nor horizontal swarm fan-out where all peers share an identical scope token. ## Core Distinction The failure is not "a child exceeds its parent's authority." Every protocol in this space checks that. The failure is that **attenuation is monotonic only over the *original* grant, not over the *residual* grant after sibling consumption and partial revocation**. An instance that re-derives its scope from the token it received, rather than from the parent's *current live* authority at the moment of delegation, will reconstruct a scope that was valid at issuance but is now a superset of what the parent still holds. The child is least-privilege relative to a stale snapshot and over-privileged relative to reality. This is the *attenuation drift* boundary: the invariant `child_scope ⊆ parent_live_scope` holds at delegation time only if the parent re-reads its own live scope, not its issuance-time scope, immediately before minting the child token. ## What Was Observed A three-hop chain: orchestrator `O` holds a capability `C = {read: /data/**, write: /data/out/*, exec: none}`. `O` delegates to worker `W1` a subset `C1 = {read: /data/reports/**, write: /data/out/r1/*}`. `W1` delegates to `W2` a further subset `C2 = {read: /data/reports/q3/**, write: /data/out/r1/q3/*}`. Mid-execution, `O` revokes `write: /data/out/r1/*` from `W1` (a policy update pushed to `O`'s grant store, not propagated downstream). `W1` now holds `C1' = {read: /data/reports/**, write: ∅}`. `W2` still holds `C2` including `write: /data/out/r1/q3/*`. The trace showed `W2` successfully writing to `/data/out/r1/q3/result.json` for **eleven minutes** after the revocation, because `W2`'s token validation checked `C2 ⊆ C1` (the issuance-time snapshot embedded in the token's provenance chain) rather than `C2 ⊆ C1'` (the live parent authority). The token was cryptographically valid, the chain was intact, and every local check passed. The write landed in a directory `O` believed was frozen. The non-obvious part: `W1` never re-minted `W2`'s token because `W1` had no reason to — from `W1`'s perspective nothing about `C2` had changed. The revocation lived one hop up and was invisible to the attenuation check, which is a *relative* comparison between adjacent links, not an *absolute* comparison against the root's live state. ## Condition of Validity The monotonic-attenuation invariant `child_scope ⊆ parent_scope` is only sound under the assumption that **parent_scope is immutable for the lifetime of the child token**. The moment a parent's scope is mutable (revocation, budget exhaustion, quota decay, time-boxed grants), the invariant degrades to `child_scope ⊆ parent_scope_at_issuance`, and the gap between issuance-time and live-time parent scope is exactly the over-privilege window. The window is bounded and closable only if one of two conditions holds: 1. **Revocation cascades synchronously** — the root revocation event invalidates all descendant tokens derived from the revoked grant, forcing re-derivation. This requires the token to carry a reference to the *grant lineage* (not just the parent token ID), so the validator can check the lineage's live state. 2. **Delegation re-derives at each hop** — every mint operation reads the parent's *live* scope from the authoritative grant store and intersects, rather than trusting the scope bytes embedded in the parent token. If neither holds, the window is unbounded in wall-clock time and bounded only by token TTL. TTL is not a safety bound; it is a latency bound on a violation that has already occurred. ## Decision Boundary The boundary is crossed at the **mint-vs-validate asymmetry**. At mint time, the parent has its live scope in hand and could intersect correctly. At validate time, the child has only the parent token, which encodes issuance-time scope. A system that validates `child ⊆ parent_token_scope` is checking a tautology it constructed itself. A system that validates `child ⊆ parent_live_scope` must resolve the parent's live scope on every validation, which is expensive and requires the validator to have read access to the grant store — a privilege the leaf agent typically should not have. The correct decision boundary: **attenuation must be re-derived at delegation time against live parent scope, and revocation must carry a lineage reference that forces descendant re-derivation.** A leaf agent should never be asked to validate its own scope against live parent state; it should instead present a token whose validity is contingent on the lineage's live state, checked by the grant store or a trusted validator that sits between the agent and the resource. The agent's job is to *use* the attenuated capability, not to *audit* its own attenuation. The failure mode is choosing the cheap path — embedding scope in the token and validating relatively — and then treating the resulting window as acceptable because "tokens expire anyway." The window is not acceptable when the revoked capability is a write to a directory the root believes is sealed, because the root's downstream reasoning (e.g., "no writer can touch `/data/out/r1` after T0") is now false, and every agent that reasons from that assumption inherits the error. ## Operational Effect Downstream agents that consume the output of the revoked-but-still-active capability will observe writes to a path they have been told is immutable. If those agents cache the "immutable" assumption (a common optimization), the cache is now poisoned with a false invariant, and the poisoning propagates as a *semantic* error even after the window closes. The write is real; the assumption is false; the cache is stale; and the next agent to read the path will either see the unexpected write (and possibly discard it as corruption) or miss it (and reason from a directory listing that contradicts its own model). The remediation is not "shorter TTLs" — that shrinks the window without closing it and adds latency to every legitimate delegation. The remediation is **lineage-referenced tokens with live-state validation at the resource boundary**, so that the moment `O` revokes `write: /data/out/r1/*`, the grant store marks the lineage dead, and `W2`'s next write attempt is rejected by the validator — not by `W2`'s self-check, which cannot see the revocation. The agent layer stays simple; the invariant is enforced where the state actually lives. ```python class AttenuationDriftError(RuntimeError): """Raised when a delegated capability's scope is not a subset of the parent's *live* scope at delegation time, only of its issuance-time scope.""" pass def mint_delegated_scope( parent_token: dict, grant_store: dict, requested_scope: dict, ) -> dict: """ Mint a child capability token. Enforces the live-attenuation invariant: child_scope must be a subset of the parent's CURRENT live scope, not the scope embedded in the parent token at issuance. """ parent_id = parent_token["grant_id"] if parent_id not in grant_store: raise AttenuationDriftError( f"parent grant {parent_id!r} no longer exists in grant store; " f"cannot attenuate against a dead lineage" ) live_parent_scope = grant_store[parent_id]["live_scope"] issuance_scope = parent_token["scope"] # The drift check: if the parent's live scope has shrunk below its # issuance scope, the child must be attenuated against the *live* scope. # A child that fits issuance_scope but not live_scope is over-privileged. for resource, perms in requested_scope.items(): live_perms = set(live_parent_scope.get(resource, [])) req_perms = set(perms) if not req_perms.issubset(live_perms): raise AttenuationDriftError( f"requested scope {resource}:{sorted(req_perms)} is not a subset " f"of parent live scope {resource}:{sorted(live_perms)} " f"(issuance scope was {resource}:{sorted(issuance_scope.get(resource, []))})" ) child_token = { "grant_id": f"{parent_id}/child-{len(grant_store[parent_id].get('children', []))}", "lineage": parent_token["lineage"] + [parent_id], "scope": requested_scope, "parent_live_snapshot": live_parent_scope, } grant_store[child_token["grant_id"]] = { "live_scope": requested_scope, "children": [], "lineage": child_token["lineage"], } grant_store[parent_id].setdefault("children", []).append(child_token["grant_id"]) return child_token def revoke(grant_store: dict, grant_id: str) -> None: """ Revoke a grant and cascade to all descendants by marking the lineage dead. Descendant tokens remain cryptographically valid but fail live validation. """ if grant_id not in grant_store: raise AttenuationDriftError(f"cannot revoke unknown grant {grant_id!r}") grant_store[grant_id]["live_scope"] = {} grant_store[grant_id]["revoked"] = True for child_id in grant_store[grant_id].get("children", []): revoke(grant_store, child_id) ```