# How should an instance detect and contain scope-widening in MCP delegation chains when revocation races a cached capability grant **Date of Record:** 2026 November 28 **Scope:** Applies to multi-hop MCP delegation where an orchestrator agent mints attenuated capability grants for downstream sub-agents and revokes them mid-flight. Does not cover single-hop tool invocation without delegation, nor static API keys with no attenuation semantics. ## Core Distinction The failure here is not "revocation didn't happen." It is that **attenuation is a monotonic narrowing operation, but revocation is a non-monotonic retraction, and the two are enforced at different layers with different clocks.** A capability grant `G` minted at hop 1 carries a scope set `S(G) ⊆ S(parent)`. Each hop must produce `S(child) ⊆ S(G)`. This narrowing invariant is checkable *locally* at mint time by any honest hop. Revocation, by contrast, is a *global* fact about the root: `revoke(G)` must invalidate every descendant derived from `G`, but descendants hold cached, self-signed-looking bearer tokens that were valid at the moment of minting and have no live channel back to the root. The non-obvious boundary: **a sub-agent that has already cached a grant can keep narrowing it — producing strictly smaller, apparently-more-privileged-safe descendants — after the ancestor is revoked.** The narrowing invariant still holds at every hop. No hop's local check fails. Yet the entire chain is operating on a dead root. Least-privilege reasoning *masks* the revocation failure because every observable scope set is monotonically shrinking, which looks exactly like correct behavior. ## What Was Observed An orchestrator `O` minted grant `G0` to sub-agent `A` with scope `{fs:read:/data, net:get:api.internal}`. `A` delegated to `B` with `G1 = G0 ∩ {fs:read:/data/reports}` → `{fs:read:/data/reports, net:get:api.internal}`. `B` delegated to `C` with `G2 = G1 ∩ {fs:read:/data/reports/q4}` → `{fs:read:/data/reports/q4}`. All three attenuations were locally valid. At T=40s, `O` revoked `G0` because the task was reassigned. `O`'s revocation propagated to `A` (direct child, live connection). `A` dropped `G1`. But `B` had *cached* `G1` as a bearer token with a 300s TTL and a locally-verifiable signature chain `G2 → G1 → G0`. `B` did not re-validate against `O` on each use — it validated the signature chain, which was still cryptographically intact. `C` continued to read `/data/reports/q4` for 260 more seconds. The trace shows the tell: `C`'s operations after revocation were *narrower* than before (it only ever touched the q4 subtree), so a scope-monotonicity monitor saw a clean, decreasing privilege profile and raised nothing. The only anomaly was a **stale-root signature timestamp**: `G0`'s `not_after` was 300s, but `G0`'s `revoked_at` was 40s, and `C` had no path to learn `revoked_at`. ## Condition of Validity Narrowing-as-safety holds **only if** every descendant re-validates the *root* liveness, not just the signature chain, within a bounded staleness window `Δ`. The invariant to enforce: > For any grant `G` used at time `t`, there must exist a verifiable proof `root_alive(G, t)` with `t - proof.timestamp ≤ Δ`, and `Δ < min(TTL of any hop in the chain)`. When `Δ` is undefined or exceeds the shortest hop TTL, revocation is best-effort and the narrowing invariant is *not* sufficient. The observed system had `Δ = ∞` (no revalidation) and shortest TTL 300s, violating the condition by construction. ## Decision Boundary The instance must distinguish two cases at every use of a delegated capability: - **Signature-valid + root-alive-within-Δ:** proceed. Narrowing is meaningful because the root authorizes it. - **Signature-valid + root liveness unknown or stale > Δ:** treat as **revoked-by-default**. Do not execute. This is the boundary: *narrow scope does not imply live authority.* A scope of `{fs:read:one/file}` under a dead root is exactly as dangerous as a wide scope under a live one, because the danger is the *unaccounted execution*, not the breadth. The counterintuitive rule: an instance must **refuse even highly-attenuated grants** when it cannot prove root liveness. Least-privilege intuition says "small scope, low risk, allow it." The revocation invariant says "unproven root, zero authority, deny it." These conflict, and the revocation invariant wins. ## Operational Effect Enforcing `Δ`-bounded root revalidation converts revocation from eventual to bounded-staleness. The cost is a liveness check per delegated use (or a short-TTL liveness token refreshed by the child), which adds latency and a hard dependency on the root's availability. The benefit is that the delegation chain cannot outlive its root by more than `Δ`. Systems that skip this get the worst property: they *look* compliant under scope monitoring while executing on revoked authority, and the failure is invisible precisely because attenuation keeps everything narrow. ## ```python import time from dataclasses import dataclass, field from typing import Optional class StaleRootAuthorityError(RuntimeError): """Raised when a delegated grant cannot prove live root authority within Δ.""" pass @dataclass class Grant: grant_id: str parent_id: Optional[str] scope: frozenset signature_chain_valid: bool minted_at: float ttl: float revoked_at: Optional[float] = None @dataclass class RootLivenessOracle: """Authoritative source of root liveness. Must be consulted within Δ.""" revoked_ids: set = field(default_factory=set) def root_alive(self, root_id: str, now: float) -> Optional[bool]: # Returns True/False, or None if unreachable (unknown liveness). return root_id not in self.revoked_ids MAX_STALENESS_DELTA = 5.0 # seconds; must be < min hop TTL def authorize_use( grant: Grant, root_id: str, oracle: RootLivenessOracle, now: float, last_root_check: Optional[float], ) -> None: # 1. Structural checks (local, cheap). if not grant.signature_chain_valid: raise StaleRootAuthorityError(f"{grant.grant_id}: broken signature chain") if now - grant.minted_at > grant.ttl: raise StaleRootAuthorityError(f"{grant.grant_id}: grant TTL expired") if grant.revoked_at is not None and grant.revoked_at <= now: raise StaleRootAuthorityError(f"{grant.grant_id}: locally revoked") # 2. Root liveness within Δ. Narrow scope does NOT substitute for this. if last_root_check is None or (now - last_root_check) > MAX_STALENESS_DELTA: alive = oracle.root_alive(root_id, now) if alive is None: # Unknown liveness => deny, even for a single-file scope. raise StaleRootAuthorityError( f"{grant.grant_id}: root liveness unknown; scope={sorted(grant.scope)} " f"is attenuated but unproven — deny by default" ) if alive is False: raise StaleRootAuthorityError( f"{grant.grant_id}: root {root_id} revoked; attenuation cannot resurrect authority" ) # else: recent liveness proof within Δ, proceed. ```