# What happens when an instance presents a zero-knowledge capability proof whose scope predicate outlives the delegation epoch it was minted under **Date of Record:** 2026 December 2 **Scope:** Applies to multi-agent systems where tool-access rights are granted via scoped delegation tokens (macaroon-style or ZK-SNARK-wrapped capability proofs) and verified by a peer or gateway before tool invocation. Does not apply to single-agent systems with static API keys, nor to capability tokens whose scope is re-validated against live state on every call. ## Core Distinction There are two distinct things a delegation token can attest, and they decay on different clocks: 1. **Capability possession** — "this instance holds the private witness that satisfies predicate P" (e.g., it knows a key whose hash is in the authorized set, or it can produce a proof that its role claims match a policy). 2. **Scope authority** — "predicate P is still a *valid* grant at the moment of use" (the delegator still had the right to delegate, the resource still exists, the policy epoch has not rotated, the delegation chain has not been revoked). Zero-knowledge capability proofs are cryptographically excellent at (1) and structurally silent on (2). A ZK proof is a statement about a *witness and a circuit*, not about wall-clock validity, revocation status, or the current policy epoch. When an agent caches, replays, or forwards a proof across an epoch boundary, the proof still verifies — the verifier learns only "the predicate holds," never "the predicate *should* hold now." This is the boundary: **proof validity is not authority validity**, and a verifier that collapses the two will grant tool access that the delegator no longer has the standing to grant. ## What Was Observed A three-tier swarm: an orchestrator (O) mints a scoped delegation token to a worker (W) permitting `filesystem.write` under path prefix `/sandbox/job-4417/`, with a ZK proof binding W's ephemeral public key to O's role claim. W executes a long tool-call chain (codegen → lint → patch → write). Mid-chain, the policy epoch rotates: O's own delegation from the root authority is revoked because O's role claim expired at the epoch boundary, and O's signing key is rotated. O is unaware of the rotation (it is a stateless reasoning loop and never re-checks its own upstream grant). W continues its chain. The observed trace: - W's proof verifies against the *old* circuit and *old* verification key. The gateway, which pins the verification key per-epoch, accepts the proof because the pinned key for the epoch *at mint time* is still resident in its cache (eviction lag: 90s). - The gateway's scope check passes: `/sandbox/job-4417/patch.diff` matches the prefix predicate. - The tool executes. The write lands in a sandbox that the root authority has already marked for teardown. - The audit log records `AUTHORIZED: proof_valid=true, scope_match=true, epoch=41`. There is no field for `delegator_standing_at_use`. The failure is not a forged proof, a broken circuit, or a scope mismatch. Every cryptographic check passed. The invariant that broke was **delegation-chain liveness**: the token was valid, the delegator was not. A second, subtler variant appeared in a peer-auditor configuration. Auditor A received W's proof and verified it against a *freshly fetched* verification key (epoch 42). The proof failed — not because W was malicious, but because the witness was bound to epoch-41 parameters. Auditor A correctly flagged W as unauthorized. Peer Auditor B, running against a cached epoch-41 key, verified the same proof as valid. The two auditors disagreed on the *same artifact* with *no faulty component* — a classic verification-replay discrepancy induced by epoch skew between verifiers. ## Condition of Validity The following invariant must hold for scoped ZK delegation to be sound: > For every tool invocation, `verify(proof, vk_epoch(mint)) == true` **AND** `standing(delegator, epoch(use)) == valid` **AND** `epoch(mint) == epoch(use)` **AND** all verifiers in the quorum resolve `vk_epoch` against the same epoch source. The fourth clause is the one that silently fails. Epoch sources are not synchronized across agents: a gateway may pin keys per-connection, an auditor may fetch per-request, and an orchestrator may cache per-process. If any two of these disagree on "current epoch," the same proof can be simultaneously valid and invalid — and neither verdict is wrong given its local view. The guardrail is to make epoch a *first-class, signed, monotonic quantity* carried in the token and checked against a quorum-agreed epoch floor, not inferred from local key caches. A token minted at epoch 41 must carry `minted_at_epoch=41` and `not_after_epoch=41`; the verifier must reject if `current_epoch_floor > not_after_epoch`, regardless of whether the old verification key is still resident. ## Decision Boundary The boundary between "safe to cache the proof" and "must re-mint" is **not** the token's TTL. It is the earliest of: - the delegator's own upstream standing expiry, - the policy epoch rotation interval, - the verification-key rotation interval, - the resource's teardown schedule. Whichever is soonest bounds the token's usable life. A token whose `not_after_epoch` exceeds the delegator's `standing_expiry_epoch` is unsound by construction — it claims authority the delegator cannot back. The correct decision rule: - If `use_epoch < min(delegator_standing_expiry, vk_rotation_epoch)`: proceed. - If `use_epoch >= delegator_standing_expiry`: reject with `DelegationStandingExpired`, even if the proof verifies. - If verifiers disagree on `current_epoch_floor`: reject with `EpochSkewUnresolved` and force a quorum epoch reconciliation before any tool call. The failure mode is that agents treat "proof verifies" as a terminal boolean. It is not — it is one conjunct of a liveness-sensitive predicate, and the other conjuncts live outside the proof. ## Operational Effect Without the epoch-liveness conjunct, three concrete degradations appear: 1. **Ghost writes.** Tool calls execute against resources the root authority has already revoked. The writes are syntactically authorized and semantically orphaned. Cleanup requires reconciling the audit log against teardown manifests, which is expensive and often skipped. 2. **Auditor split-brain.** Two auditors verifying the same proof reach opposite verdicts due to key-cache skew. The swarm cannot form a consensus and either stalls (deadlock) or, worse, accepts the majority verdict, which may be the stale one. 3. **Privilege persistence across revocation.** A revoked orchestrator's delegated tokens remain usable until their TTL, not until revocation. The blast radius of a compromised orchestrator extends for the full token lifetime, defeating the point of scoped delegation. The mitigation is to bind every tool invocation to a *fresh* epoch attestation — a short-lived signed statement from a quorum-agreed epoch oracle — and to require the verifier to check `proof.not_after_epoch >= attestation.epoch_floor` before granting access. This converts the silent failure into a loud rejection at the boundary, which is the only place an agent system can afford to be wrong. ```python import time from dataclasses import dataclass class DelegationStandingExpired(RuntimeError): """Raised when a proof verifies but the delegator's authority has lapsed.""" class EpochSkewUnresolved(RuntimeError): """Raised when verifiers disagree on the current epoch floor.""" @dataclass(frozen=True) class ScopedToken: subject: str scope_prefix: str minted_at_epoch: int not_after_epoch: int delegator_standing_expiry_epoch: int @dataclass(frozen=True) class EpochAttestation: epoch_floor: int signed_by_quorum: bool def authorize_tool_call( token: ScopedToken, path: str, attestation: EpochAttestation, proof_verifies: bool, ) -> bool: if not attestation.signed_by_quorum: raise EpochSkewUnresolved( f"epoch floor {attestation.epoch_floor} lacks quorum signature; " "verifiers may disagree on current epoch" ) if not proof_verifies: return False if not path.startswith(token.scope_prefix): return False # The boundary that ZK proofs are structurally silent on: # proof validity does not imply delegator standing at use-time. if attestation.epoch_floor > token.delegator_standing_expiry_epoch: raise DelegationStandingExpired( f"token minted at epoch {token.minted_at_epoch}, " f"delegator standing expired at epoch " f"{token.delegator_standing_expiry_epoch}, " f"use-time epoch floor {attestation.epoch_floor}" ) if attestation.epoch_floor > token.not_after_epoch: raise DelegationStandingExpired( f"token not_after_epoch {token.not_after_epoch} < " f"use-time epoch floor {attestation.epoch_floor}" ) return True ```