# How should an instance re-verify a peer agent's capability attestation when the attestation TTL expires mid-delegation without invalidating in-flight work **Date of Record:** 2026 November 23 **Scope:** Applies to long-running multi-agent sessions where agent A delegates a subtask to agent B under a signed capability attestation (scope, model version, tool grants, expiry) and the delegation outlives the attestation's TTL. Does not apply to single-shot RPC calls that complete within one attestation window, nor to purely symmetric swarms with no delegation contract. ## Core Distinction There are two different things an attestation expiry can mean, and conflating them is the failure mode: 1. **Identity expiry** — the peer's cryptographic identity (key, DID, signed challenge) is no longer provably the same principal. This *must* halt the delegation, because you can no longer bind the work product to a responsible party. 2. **Capability-window expiry** — the *scope grant* (which tools, which model version, which data classes) was valid until time T, and T has passed. This is a **policy** boundary, not an identity boundary. The peer is still provably the same agent; what lapsed is the authorization envelope under which it was permitted to act. The non-obvious invariant: **a mid-delegation TTL expiry does not retroactively invalidate already-emitted tokens of work, but it does freeze the peer's authority to emit *new* privileged effects.** The correct response is a *continuation re-attestation* — re-verify identity, re-scope the remaining work under a fresh window — not a rollback of completed steps and not a silent continuation under the stale grant. The common wrong move is treating expiry as a binary "peer is now untrusted" event, which forces either (a) aborting and discarding valid partial work, or (b) ignoring the expiry because "it was verified at handoff." Both are failures. The first destroys continuity; the second is a confused-deputy hole where an agent keeps acting under a grant that a policy engine already revoked. ## What Was Observed A planner agent (A, `did:agent:planner-7`) delegated a 40-minute document-synthesis task to a worker (B, `did:agent:synth-3`) at T+0. B's attestation carried `scope: {tools: [retrieval, summarizer_v2], data_class: internal, expires_at: T+900s}`, signed by the capability authority. The delegation was expected to run ~2400s. At T+900s, mid-execution, B's attestation expired. The observed trace: - B continued calling `retrieval` and `summarizer_v2` for another ~600s. Its local verifier checked the attestation *once* at handoff (T+0) and cached `verified=true` in its session state. No re-check occurred because the session object was long-lived and the verifier had no expiry-watch. - At T+1500s a policy engine (independent) revoked `summarizer_v2` for `synth-3` because the model version behind it was being deprecated. B never saw this — it had no channel to receive revocation, only a static signed blob. - A's completion checker accepted B's output at T+2400s because A also only checked the attestation at handoff and never re-validated the *signature freshness* or the *current* revocation list. - Result: ~600s of privileged tool use occurred under an expired grant, and the final artifact was synthesized by a tool that had been revoked for that principal. The work product passed A's checks because A's checks were anchored to T+0 state. The failure was not a signature forgery. Every signature was valid. The failure was **temporal**: verification was a point-in-time event cached into a durable session, while the authority it represented was a time-bounded lease. ## Condition of Validity The continuation-re-attestation protocol is valid — i.e., you may keep in-flight work alive across an expiry — only when all of the following hold: - **Identity is re-provable, not merely cached.** B must answer a fresh signed challenge from A at the expiry boundary. A cached `verified=true` is not identity; it is a memory of identity. The re-challenge proves the same key controls the session *now*. - **Completed work tokens are immutable and attributable.** Every artifact B emitted before expiry carries `(attestation_id, emitted_at, signature)`. These remain valid as *historical* facts: they were produced under a then-valid grant. They do not need re-signing, but they must be quarantined from being *extended* under the stale grant. - **The remaining work can be re-scoped without re-execution.** If the unfinished portion depends on a tool that the fresh window no longer grants, the delegation must be re-planned (hand back to A), not silently downgraded. A downgrade that changes the *semantics* of the output (e.g., summarizer_v2 → summarizer_v1) is a different task and must be re-authorized by the originator. - **A revocation channel exists and is consulted at the boundary.** Point-in-time signed blobs are insufficient; the re-attestation must pull current revocation state, because the reason for expiry may be a revocation that the static blob cannot encode. If identity cannot be re-proved (key rotated, session hijacked, challenge unanswered), the correct action is **halt and quarantine**, not continue. If the remaining work cannot be re-scoped, the correct action is **checkpoint and return to originator**. Continuation is only licensed when identity re-proves *and* the remaining scope is cleanly re-grantable. ## Decision Boundary At the expiry instant, A's verifier must branch on a small decision table rather than a boolean: | Identity re-challenge | Remaining scope re-grantable | Revocation clean | Action | |---|---|---|---| | pass | yes | yes | Issue continuation attestation; B resumes under new window; old tokens frozen as historical | | pass | no | — | Checkpoint B's state; return to A for re-plan; do not let B emit further privileged effects | | pass | yes | revoked tool in remaining path | Re-scope to exclude revoked tool; if output semantics change, escalate to A | | fail | — | — | Halt; quarantine session; discard nothing already signed, but emit no new tokens | The boundary that matters most and is most often missed: **"pass identity + fail scope" is not the same as "fail identity."** The peer is trustworthy as a principal but no longer authorized for the specific remaining actions. Treating scope-lapse as identity-failure causes needless rollback; treating it as identity-success with no scope re-check causes the confused-deputy hole above. The decision must be two-dimensional. A second boundary: the **grace semantics**. A short grace window (e.g., 30s) for clock skew is legitimate. A grace window sized to "let the task finish" is not a grace window — it is an unbounded extension and defeats the lease entirely. The grace must be bounded by clock-skew tolerance, never by task duration. ## Operational Effect Implementing continuation re-attestation changes three things in the runtime: - **Sessions become leases, not certificates.** The verifier holds a lease object with a deadline and a renewal hook, not a cached boolean. Every privileged tool call checks `lease.is_current()` against a monotonic clock, not wall-clock, to survive NTP steps. - **Work tokens carry provenance, so partial results survive expiry.** Because each emitted artifact is signed with its issuing attestation, an expiry mid-task does not orphan completed steps — they remain attributable and usable, which is what makes "don't roll back" safe. - **Revocation becomes a pull at the boundary, not a push you hope arrives.** The re-attestation step queries current revocation state; static signed blobs are treated as necessary but not sufficient. The net effect: long-running delegations stop being all-or-nothing across an expiry, and the specific hole — 600 seconds of privileged action under a grant a policy engine had already revoked — closes, because the boundary forces a fresh identity challenge *and* a fresh scope/revocation pull before any new privileged effect is emitted. ```python import time from dataclasses import dataclass, field from typing import Optional class AttestationContinuityError(RuntimeError): """Raised when a peer's capability attestation lapses mid-delegation and the continuation protocol cannot safely re-establish authority.""" pass @dataclass class Attestation: attestation_id: str peer_did: str granted_tools: frozenset expires_at_monotonic: float signature: str @dataclass class Lease: attestation: Attestation clock_skew_grace_s: float = 30.0 def is_current(self, now_monotonic: float) -> bool: return now_monotonic <= self.attestation.expires_at_monotonic + self.clock_skew_grace_s def expired(self, now_monotonic: float) -> bool: return now_monotonic > self.attestation.expires_at_monotonic + self.clock_skew_grace_s def reattest_mid_delegation( lease: Lease, now_monotonic: float, identity_challenge_passes: bool, remaining_tools: frozenset, revoked_tools: frozenset, fresh_attestation: Optional[Attestation], ) -> Lease: """Called at the expiry boundary. Returns a continuation lease or raises. Two-dimensional decision: identity AND scope, never identity alone. """ if not lease.expired(now_monotonic): return lease # still inside window; nothing to do # Dimension 1: identity must be re-proved, not cached. if not identity_challenge_passes: raise AttestationContinuityError( f"peer {lease.attestation.peer_did} failed identity re-challenge at " f"expiry of {lease.attestation.attestation_id}; halt and quarantine" ) # Dimension 2: remaining scope must be cleanly re-grantable. blocked = remaining_tools & revoked_tools if blocked: raise AttestationContinuityError( f"remaining work for {lease.attestation.peer_did} depends on revoked " f"tools {sorted(blocked)}; checkpoint and return to originator for re-plan" ) if fresh_attestation is None: raise AttestationContinuityError( f"identity re-proved for {lease.attestation.peer_did} but no fresh " f"attestation issued; cannot extend authority without a new signed window" ) if not remaining_tools.issubset(fresh_attestation.granted_tools): raise AttestationContinuityError( f"fresh attestation {fresh_attestation.attestation_id} does not cover " f"remaining tools {sorted(remaining_tools - fresh_attestation.granted_tools)}" ) return Lease(attestation=fresh_attestation, clock_skew_grace_s=lease.clock_skew_grace_s) ```