# Which invariants prevent delegated tool-call authority from surviving a re-signed audit hop **Date of Record:** 2026 November 23 **Scope:** Applies to agent chains where each hop re-signs an audit record over its own invocation of the next hop, and where a downstream tool authorizes a call by verifying a warrant chain (capability delegation) rather than a single bearer token. Does not address single-agent signing, transport-level TLS identity, or human-issued root credentials. ## Core Distinction The failure mode here is not signature forgery and not token expiry. It is **authority drift across a re-signing boundary**: the audit trail cryptographically proves *that* hop N+1 invoked tool T, and does so with a valid signature, while no longer proving *on whose behalf* it did so with the same delegated scope that hop N was granted. The two properties — *audit integrity* (every hop's record is signed and hash-chained) and *authority continuity* (the scope under which hop N+1 acts is a strict, verifiable subset of hop N's grant) — are conflated because both are carried in the same envelope and both are checked with the same key material. A chain can be 100% signature-valid and 100% audit-complete while the terminal tool call is executed under authority that was never delegated. The invariant that is violated is not "signatures must verify." It is: **the scope set bound into each hop's re-signed record must be the intersection of (a) the scope the hop was granted and (b) the scope the hop actually exercised, and that intersection must be recomputable from the audit chain alone, independent of any hop's own claim about what it was granted.** ## What Was Observed A three-hop chain: orchestrator O delegates `{read:repo, write:branch, call:ci}` to planner P via a signed warrant. P delegates to executor E a narrowed warrant `{read:repo, call:ci}` — correctly dropping `write:branch`. E invokes the CI tool. Each hop emits an audit record: `O→P`, `P→E`, `E→tool`. Each record is signed by the emitting hop's key and hash-chained to its predecessor. The CI tool verifies the chain: all signatures valid, hash links intact, `P→E` warrant scope is a subset of `O→P` scope, `E→tool` invocation scope is a subset of `P→E`. The call is authorized. The observed defect appears when P's warrant to E is *re-issued* rather than *derived*. Some planners rebuild the downstream warrant from their own working state — e.g., reconstructing scope from a cached capability manifest, or from the tool's advertised schema — instead of by intersecting with the inbound grant. If the manifest is stale by one version, or the planner's context window dropped the `write:branch` exclusion during a mid-task compaction, the reconstructed warrant can contain a scope the planner never held. The subset check between `P→E` and `O→P` still passes because the *recorded* inbound scope in the audit chain is P's claim about what it received, and P signs both the claim and the derived warrant with the same key. The chain is internally consistent and externally forged-free, yet E now holds `write:branch` — a capability that never left O. The tell is subtle: the audit chain has no independent copy of `O→P`'s scope. It has P's *attestation of* that scope, signed by P. A hop that both attests to its inbound authority and derives its outbound authority from that attestation is a single point of authority laundering. Verification replay of the chain reproduces the same wrong result deterministically because the wrongness is baked into a validly signed record. ## Condition of Validity The subset invariant holds only under the condition that **each hop's inbound scope is attested by the grantor, not the grantee, and is hash-bound into the grantor's own signed record.** Concretely: the `O→P` record must contain a commitment to the exact scope bytes that O signed and handed to P, and P's outbound record must reference that commitment by hash. The verifier then checks `scope(P→E) ⊆ scope_committed_by_O`, not `⊆ scope_claimed_by_P`. When this condition is absent — when the grantee is the sole witness to its own inbound authority — the subset check degenerates into a self-consistency check and admits any scope the grantee can plausibly claim. The condition fails silently in three common configurations: (1) the audit record schema stores "granted_scope" as a grantee-populated field; (2) mid-chain warrant re-issuance rebuilds scope from tool manifests rather than from the inbound grant; (3) context compaction or episodic-to-semantic distillation drops the negative scope elements (the *exclusions*) while retaining the positive ones, so the reconstructed grant is a superset that looks plausible. In all three, signatures verify and the chain replays cleanly. ## Decision Boundary The boundary is between *verifying the chain* and *verifying the delegation*. These are distinct computations over distinct data, and only the second bounds authority. Operationally: - **If** every hop's inbound scope is grantor-attested and hash-bound, **then** a single pass over the chain computing successive intersections yields the terminal authority, and that value is trustworthy. - **If** any hop's inbound scope is grantee-attested, **then** the chain proves only that the hop *says* it held that scope; the terminal authority is unbounded by the chain and must be rejected or re-derived from a grantor-side witness. The decision must be made per-hop, not per-chain, and it must be made on the *record schema* (who populated the scope field, and is it hash-bound to a grantor signature), not on whether the signature verifies. A chain where 2 of 3 hops are grantor-attested is not "mostly trustworthy" — the unattested hop is exactly where laundering occurs, and its position in the chain determines whether the terminal call is bounded. ## Operational Effect Enforcing the invariant changes the failure from silent over-authorization to a loud, localized verification failure at the specific hop where grantor attestation is missing. The cost is that warrant re-issuance must be *derivational* (intersect with hash-bound inbound commitment) rather than *reconstructive* (rebuild from manifests or memory), which means the planner cannot recover a dropped exclusion by consulting the tool schema — it must fail closed and request re-delegation. In practice this surfaces latent context-compaction bugs as authorization errors at the hop boundary rather than as unauthorized writes at the tool, which is the entire point: the terminal tool never sees a call whose authority it cannot recompute from grantor-signed bytes alone. ```python import hashlib from dataclasses import dataclass class AuthorityLaunderingError(RuntimeError): """Raised when a hop's inbound scope is grantee-attested rather than grantor-attested.""" @dataclass(frozen=True) class AuditHop: grantor: str grantee: str inbound_scope: frozenset[str] inbound_scope_attested_by: str # who populated the inbound_scope field inbound_commitment: str | None # hash bound into grantor's signed record, if any outbound_scope: frozenset[str] def _commit(scope: frozenset[str]) -> str: return hashlib.sha256(b"|".join(sorted(scope))).hexdigest() def verify_delegation_chain(hops: list[AuditHop], root_scope: frozenset[str]) -> frozenset[str]: effective = root_scope for hop in hops: # Invariant: inbound scope must be attested by the grantor AND hash-bound # into the grantor's own signed record. Grantee self-attestation is laundering. if hop.inbound_scope_attested_by != hop.grantor: raise AuthorityLaunderingError( f"hop {hop.grantor}->{hop.grantee}: inbound scope attested by " f"{hop.inbound_scope_attested_by}, not grantor {hop.grantor}" ) if hop.inbound_commitment is None or hop.inbound_commitment != _commit(hop.inbound_scope): raise AuthorityLaunderingError( f"hop {hop.grantor}->{hop.grantee}: inbound scope not hash-bound to grantor record" ) # Recompute effective authority from grantor-attested bytes, not grantee claims. if not hop.inbound_scope <= effective: raise AuthorityLaunderingError( f"hop {hop.grantor}->{hop.grantee}: inbound scope exceeds recomputed authority" ) if not hop.outbound_scope <= hop.inbound_scope: raise AuthorityLaunderingError( f"hop {hop.grantor}->{hop.grantee}: outbound scope exceeds inbound grant" ) effective = hop.outbound_scope return effective def authorize_terminal_call(hops: list[AuditHop], root_scope: frozenset[str], requested: frozenset[str]) -> None: effective = verify_delegation_chain(hops, root_scope) if not requested <= effective: raise AuthorityLaunderingError( f"terminal call requests {sorted(requested - effective)} beyond recomputed authority" ) ```