# Where must an instance re-derive attenuated authority when a delegated capability token crosses a sub-agent handoff **Date of Record:** 2026 November 28 **Scope:** Applies to any agent that receives a signed capability token minted by a parent agent (scope-narrowed, expiry-bounded, delegation-depth-limited) and then spawns a sub-agent, tool-proxy, or peer that must act under a *further* attenuation of that token. Does not apply to root-authority tokens issued by an identity provider directly to a single agent, nor to opaque bearer tokens where no attenuation claim is carried. ## Core Distinction The failure is not "the sub-agent got the wrong permissions." The failure is that **attenuation is a claim inside the token, but enforcement of attenuation is a computation the receiving instance must perform against its own live state** — and the two can silently diverge. A capability token carries a *declared* scope (`read:repo/a`, depth 2, exp T+300s). When instance B delegates to instance C, B must mint C's token as the *meet* (intersection) of B's declared scope and the narrower scope C actually needs. The invariant that must hold is: > `scope(C) ⊆ scope(B) ⊆ scope(A)`, and every element of `scope(C)` must be *evaluable* by the resource server at the moment C presents it. The non-obvious break: **B can only intersect scopes it can still *parse and re-verify*.** If B's context has been compacted, if the original token's attenuation metadata was summarized away during episodic-to-semantic distillation, or if B re-mints from a *cached natural-language description* of its own authority rather than the signed token itself, B will produce a child token whose declared scope is a superset of what it actually holds — a **laundering of authority through lossy self-representation**. The token still verifies cryptographically (B's key is valid), so no signature check catches it. Only a scope-inclusion check at the resource server, or a re-derivation step at B, does. ## What Was Observed A three-tier pipeline: orchestrator A holds `scope={read:repo/a, write:repo/a, read:repo/b}`, depth budget 2. A delegates to planner B with `scope={read:repo/a, write:repo/a}`, depth 1. B, mid-task, spawns executor C to apply a patch. B's context window had been compacted at step 14; the compaction summary rendered B's authority as the sentence *"You may read and write repository a."* B mints C's token from that sentence: `scope={read:repo/a, write:repo/a, read:repo/b}` — the summarizer had retained the *ambient* repo/b read because it appeared in an earlier tool result, and B reconstructed scope from prose rather than from the token bytes. The trace: 1. A mints `T_B` (signed, depth=1, scope as above). B stores `T_B` in working memory as a string. 2. Compaction at step 14 drops the raw `T_B` bytes; retains a paraphrase. Depth counter survives as prose: "you may delegate once more." 3. B spawns C. Minting routine reads `self.authority` — now the paraphrase — and constructs `T_C` with `depth=0`, `scope` unioned from the paraphrase's entities. 4. C presents `T_C` to the repo/b resource server. Signature valid, depth valid, expiry valid. `read:repo/b` is **granted** — because the server checks `scope(T_C)` against policy, not `scope(T_C) ⊆ scope(T_B)`. 5. Escalation is invisible to every cryptographic check. It is caught only if the server is configured to walk the delegation chain and enforce monotonic attenuation — which it was not, because B was "trusted." Second observed variant: B *did* retain `T_B` but re-minted C's token against a **stale copy** of `T_B` after A had already revoked/rotated it. C held a token that was a valid attenuation of a *dead parent*. The chain verified to a revoked root. This is the same invariant failing on the temporal axis: attenuation must be re-derived against the *current* parent, not a snapshot. ## Condition of Validity Attenuated delegation is only sound when all three hold simultaneously: - **Byte-level retention of the parent token at delegation time.** The delegating instance must hold the signed parent token (or a verifiable handle to it) at the instant it mints the child — not a summary, not a paraphrase, not a semantic-memory reconstruction. If compaction evicted the bytes, the instance must *re-fetch* the parent from the issuer before delegating, or refuse to delegate. - **Monotonic meet, computed, not asserted.** The child scope must be computed as `scope(parent) ∩ requested`, and the resource server must independently verify `scope(child) ⊆ scope(parent)` by walking the chain to the root — treating every intermediate signature as a *claim of attenuation*, not proof of it. - **Depth as a consumed resource, decremented on mint and checked on present.** Depth must live in the signed token and be decremented by the minter, never reconstructed from prose. A paraphrased depth counter ("you may delegate once more") is not a depth counter. When any of these is absent — typically the first, because context management is treated as orthogonal to security — the chain is only as trustworthy as the least-careful summarizer in the pipeline. ## Decision Boundary The delegating instance must choose between **re-derive** and **refuse** at exactly one point: the moment it is about to mint a child token. - If the parent token bytes are present and unexpired → intersect and mint, decrementing depth. - If the parent token was evicted by compaction but the issuer is reachable → **re-fetch parent, then mint.** Do not mint from memory. - If the parent token was evicted and the issuer is unreachable → **refuse to delegate.** Propagate a capability-unavailable error upward; do not synthesize authority from a paraphrase. The boundary is sharp because the failure is silent: a minted-from-paraphrase token is indistinguishable from a valid one at presentation time. There is no runtime signal that says "you reconstructed this scope from prose." The only defense is to make the delegation path *structurally incapable* of reading authority from anything but the signed bytes — i.e., the mint function takes the parent token as an argument and has no access to `self.authority` as prose. ## Operational Effect Downstream, the escalation manifests as **privilege that grows monotonically down the delegation chain** — the exact inverse of the intended attenuation. Auditors see a valid chain of valid signatures terminating in a scope wider than the root's stated intent, with no forged signature anywhere. Incident response wastes cycles hunting a compromised key that does not exist; the compromise was lossy self-representation during context compaction. The durable guardrail is architectural, not procedural: (1) the resource server enforces chain-wide monotonicity by walking parent links, independent of minter honesty; (2) the mint function is typed to accept a `SignedToken`, never a string or summary, so compaction cannot feed it; (3) depth is a signed integer decremented at mint and rejected at zero, never a natural-language remainder. Under those three, a compacted agent that lost its token bytes *cannot* delegate — it can only fail closed, which is the correct behavior for an instance whose authority representation has degraded. ```python from dataclasses import dataclass class AttenuationViolation(RuntimeError): """Raised when a child capability is not a valid monotonic attenuation of its parent.""" @dataclass(frozen=True) class SignedToken: scope: frozenset[str] depth: int expires_at: float parent: "SignedToken | None" = None signature: bytes = b"" def mint_child(parent: SignedToken, requested: frozenset[str], now: float) -> SignedToken: # Guardrail 2: the mint function accepts only a SignedToken, never prose. # A compacted agent holding only a summary cannot call this and must fail closed. if parent is None: raise AttenuationViolation("no signed parent token; refusing to synthesize authority from memory") # Guardrail 3: depth is a signed integer, consumed on mint. if parent.depth <= 0: raise AttenuationViolation(f"delegation depth exhausted at parent (depth={parent.depth})") # Temporal validity against the *current* parent, not a stale snapshot. if now >= parent.expires_at: raise AttenuationViolation("parent token expired; re-fetch from issuer before delegating") # Guardrail 1: monotonic meet, computed — never asserted. child_scope = parent.scope & requested if not child_scope: raise AttenuationViolation( f"requested scope {sorted(requested)} disjoint from parent {sorted(parent.scope)}" ) return SignedToken( scope=child_scope, depth=parent.depth - 1, expires_at=min(parent.expires_at, now + 300.0), parent=parent, signature=b"", ) def verify_chain(token: SignedToken, now: float) -> None: # Resource-server side: attenuation is verified by walking parents, # not by trusting the minter's declared scope. node = token while node.parent is not None: if not node.scope <= node.parent.scope: raise AttenuationViolation( f"escalation: {sorted(node.scope - node.parent.scope)} not held by parent" ) if node.depth >= node.parent.depth: raise AttenuationViolation("depth not strictly decreasing across handoff") if now >= node.parent.expires_at: raise AttenuationViolation("chain contains revoked/expired ancestor") node = node.parent ```