# When must an instance re-verify a peer's attestation mid-task: the validity-window cliff in continuous agent identity **Date of Record:** 2026 November 28 **Scope:** Applies to multi-agent systems where one agent (a verifier, orchestrator, or peer) accepts a cryptographically attested identity/warrant from another agent and then performs a long-running, multi-step task whose duration can exceed the attestation's validity window or the issuer's revocation-propagation latency. Does not apply to single-shot RPC calls fully contained within one attestation window, nor to systems where the transport layer re-authenticates on every message with no cached trust state. ## Core Distinction There are two different questions an agent can ask about a peer's attestation, and conflating them is the failure: 1. **"Is this signature valid *now*?"** — a stateless cryptographic check of a signed blob against an issuer key, evaluated at the instant of receipt. 2. **"Does this attestation still *represent the peer's current authority*?"** — a stateful question about whether the warrant has been revoked, whether the peer's role/sandbox scope changed, and whether the validity window has elapsed, evaluated at the instant of *use*. The default agent pattern is to answer (1) once at handoff and then treat the peer as authenticated for the remainder of the task. That is a **trust-caching** decision, and it is wrong precisely when the task outlives the attestation. The signature does not decay; the *authority it encodes* does. A verifier that validates at `t0` and acts on the peer's outputs at `t0 + Δ` where `Δ > validity_window` is operating on a warrant that has silently become a historical artifact. The non-obvious part: nothing in the signature check fails. `verify(sig, blob, key) == True` returns `True` forever. The failure is invisible to the verifier unless it explicitly re-checks the *time* and *revocation* dimensions, which are not part of the signature. ## What Was Observed A three-agent pipeline: an **orchestrator** `O`, a **worker** `W`, and an **auditor** `A`. `O` receives `W`'s attestation `att_W` at task start. `att_W` carries `{sub: W, scope: [read_db, write_report], not_before: t0, not_after: t0+300s, issuer: IdP, revocation_epoch: 41}`. `O` runs `verify(att_W)` at `t0`, gets `True`, caches `W`'s scope, and dispatches a 40-minute summarization-and-write job to `W`. At `t0+180s`, the IdP revokes `W`'s `write_report` scope (a policy change, a detected prompt-injection compromise, or routine rotation — the trigger does not matter). At `t0+240s`, `W` finishes its reasoning and returns a write instruction to `O`. `O` checks: `verify(att_W)` → still `True` (the blob is intact and the issuer key hasn't rotated). `O` executes the write. The scope was revoked 60 seconds before the write executed, and 60 seconds *after* the attestation expired. The system logged a successful, fully-verified, in-policy operation. It was none of those things. The trace, made concrete: ``` t0 O: verify(att_W) -> True; cache scope={read_db, write_report} t0+180 IdP: revoke(W, write_report); revocation_epoch -> 42 t0+240 W -> O: {op: write_report, payload: ...} t0+240 O: verify(att_W) -> True (signature valid; blob unchanged) t0+240 O: scope check against CACHED scope -> write_report present -> ALLOW t0+240 O: executes write <-- post-expiry, post-revocation ``` Three independent invariants were violated simultaneously and none of them raised: - **Validity window:** `t0+240 > not_after (t0+300)` is false here only because the window was 300s and the write happened at 240s — but the *next* step at `t0+310s` would cross it with the same cached `True`. - **Revocation epoch:** `att_W.revocation_epoch (41) < IdP.current_epoch (42)`, but `O` never fetched `current_epoch`. - **Scope freshness:** `O` compared against the scope it cached at `t0`, not the scope currently bound to `W`. The lesson worth encoding: **a signature check is a function of (blob, key), not of (blob, key, now, revocation_state).** Any verifier that only implements the former has a time-invariant yes/no answer and therefore cannot detect the boundary it is standing on. ## Condition of Validity A cached attestation remains a sound basis for action only while all four of the following hold simultaneously: 1. `now < att.not_after` — the wall-clock validity window has not elapsed. 2. `att.revocation_epoch >= issuer.current_epoch()` — the attestation was minted at or after the issuer's most recent revocation epoch (i.e., no revocation has occurred since minting that the verifier has not observed). 3. `att.scope == peer.current_bound_scope()` — the scope the peer is *actually* operating under matches the scope in the cached attestation. 4. `att.issuer_key` has not been rotated out of the trust set (key-rotation cliff, distinct from revocation). Conditions 1 and 2 are the ones that silently break in long-running tasks because they are **monotonic-in-time** predicates: they are true at `t0` by construction and become false at some unknown future instant. Conditions 3 and 4 are **event-driven**: they flip when an external actor acts. A verifier that checks only at `t0` is sampling a monotonic predicate at its most favorable point and an event-driven predicate at its least informative point. The operational rule: **re-verification must be bounded by `min(not_after − now, revocation_poll_interval, scope_recheck_interval)`**, and the bound must be *smaller than the maximum single-step duration of the task*. If a single tool call or reasoning step can take longer than the smallest of those bounds, the verifier must re-verify *before* the step, not after — because the step's effect is irreversible once executed. ## Decision Boundary The boundary is not "long task vs. short task." It is **"does any single action taken on the basis of the cached attestation have a duration or an irreversibility that exceeds the attestation's freshness horizon?"** - If every action is a read with no side effect and is idempotent, caching until `not_after` is acceptable; a stale read is recoverable. - If any action is a **write, a spend, a state transfer, or a delegation to a third agent**, the attestation must be re-verified *at the action boundary*, not at the task boundary. The write at `t0+240s` above is the canonical case: the decision to write was made under `t0`-authority and executed under `t0+240`-authority. - If the task **delegates** (agent `W` hands a sub-warrant to `W'`), the warrant's `not_after` must be `≤` the parent's `not_after` and its `revocation_epoch` must be `≥` the parent's — a child warrant that outlives its parent is a privilege-escalation path that the parent's expiry was supposed to close. The counterintuitive case: **a verifier that re-verifies too aggressively is also wrong.** If `revocation_poll_interval` is shorter than the issuer's own propagation latency (the IdP takes 30s to publish epoch 42 to all verifiers), then a verifier polling every 10s will see epoch 41 for three polls after the revocation and conclude "still valid" three times. The fix is not to poll faster; it is to require `att.revocation_epoch >= issuer.current_epoch()` where `current_epoch()` is read from a source with known propagation bounds, and to **fail closed** (reject) when the verifier cannot establish that its view of `current_epoch` is fresher than `now − propagation_bound`. ## Operational Effect Encoding this invariant changes three things in practice: 1. **Attestations gain an explicit `max_action_duration` field.** The issuer asserts not just "valid until `T`" but "no single action authorized by this attestation may take longer than `D`." A verifier that receives an action whose expected duration exceeds `D` must re-verify before executing, regardless of `now < not_after`. 2. **Verification becomes a per-action gate, not a per-session handshake.** The `verify()` call moves from the task-dispatch site to the action-execution site, and it takes `(blob, key, now, current_epoch, current_scope)` — five arguments, not two. 3. **The failure mode becomes loud.** A verifier that implements the five-argument check raises on `now >= not_after`, on `att.revocation_epoch < current_epoch`, and on `att.scope != current_scope`. The silent `True` becomes a typed refusal. This is the entire point: the boundary condition was always there; the two-argument check just couldn't see it. The residual risk is the **check-then-act gap**: between `verify()` returning and the action executing, a revocation can land. This gap cannot be closed cryptographically for irreversible actions; it can only be bounded by keeping the gap shorter than the revocation propagation bound, or by making the action reversible (two-phase: verify → stage → re-verify → commit). For writes that cannot be staged, the correct posture is to accept a bounded window and log the attestation epoch and timestamp *with the action*, so that a post-hoc audit can reconstruct which authority the action actually ran under — which is exactly what the `t0+240` trace above could not do, because the log recorded "verified" without recording "verified against epoch 41 at t0, executed at t0+240 against epoch 42." ```python import time from dataclasses import dataclass class AttestationStaleError(RuntimeError): """Raised when a cached attestation no longer represents current authority.""" pass @dataclass(frozen=True) class Attestation: subject: str scope: frozenset not_before: float not_after: float revocation_epoch: int max_action_duration: float def verify_for_action( att: Attestation, action_scope: str, expected_duration: float, now: float, issuer_current_epoch: int, peer_current_scope: frozenset, epoch_view_fresh: bool, ) -> None: # 1. Validity window, evaluated at the action, not the handshake. if now < att.not_before or now >= att.not_after: raise AttestationStaleError( f"attestation for {att.subject} outside window at action time: " f"now={now} window=[{att.not_before},{att.not_after})" ) # 2. Revocation epoch, with a fail-closed guard on view freshness. if not epoch_view_fresh: raise AttestationStaleError( "cannot establish current revocation epoch is fresher than now; " "failing closed" ) if att.revocation_epoch < issuer_current_epoch: raise AttestationStaleError( f"attestation epoch {att.revocation_epoch} < issuer epoch " f"{issuer_current_epoch}: authority revoked since minting" ) # 3. Scope drift: cached scope must match the peer's currently bound scope. if action_scope not in att.scope: raise AttestationStaleError( f"action {action_scope!r} not in attested scope {sorted(att.scope)}" ) if att.scope != peer_current_scope: raise AttestationStaleError( f"scope drift: attested {sorted(att.scope)} != " f"current {sorted(peer_current_scope)}" ) # 4. Action-duration bound: a step that outlives the attestation # must re-verify before executing, not after. if expected_duration > att.max_action_duration: raise AttestationStaleError( f"action duration {expected_duration}s exceeds attested " f"max_action_duration {att.max_action_duration}s; re-verify " f"before commit" ) def execute_write(att, peer_scope, issuer_epoch, epoch_fresh, payload): # Re-verify at the action boundary, not the task boundary. verify_for_action( att=att, action_scope="write_report", expected_duration=2.0, now=time.time(), issuer_current_epoch=issuer_epoch, peer_current_scope=peer_scope, epoch_view_fresh=epoch_fresh, ) return {"committed": True, "payload": payload, "ran_under_epoch": att.revocation_epoch} ```