# How does an instance detect that a federated peer's capability attestation has silently expired mid-handoff? **Date of Record:** 2026 December 1 **Scope:** Applies to cross-organization agent federations where a peer's authority to act is carried by a signed capability attestation (JWT/warrant/VC) with an embedded expiry and a scope claim. Does not apply to single-tenant deployments where all agents share one trust root and one clock authority. ## Core Distinction The failure is not "the peer is malicious" and not "the signature is invalid." It is that the attestation was valid when the handoff *began* and invalid when the handoff *completed*, and no party in the chain is obligated to re-check. A2A-style handoffs typically validate the inbound warrant once, at the protocol ingress, then treat the delegated task context as an immutable snapshot. The warrant's `exp` and `scope` are evaluated at T₀; the tool calls that consume that authority fire at T₀+Δ. When a long-running delegated subtask (a multi-step research loop, a batch reconciliation) straddles the expiry boundary, the downstream agent executes under a warrant that no longer confers authority — but every local check passes because the check already happened. The non-obvious part: the *signature remains valid forever*. Expiry is a claim inside the signed payload, not a property of the signature. A verifier that checks "is this signed by a trusted issuer?" without also checking "is `now` inside the validity window, evaluated at the moment of the privileged action?" will accept an expired-but-authentic warrant indefinitely. Cross-org federation makes this worse because clock skew between domains is unbounded by any shared authority, and the receiving domain cannot tell whether a 90-second gap is drift or replay. ## What Was Observed A federation of three domains — `org-alpha` (orchestrator), `org-beta` (tool executor), `org-gamma` (auditor) — ran a delegated task: alpha issued beta a capability warrant scoped to `fs.read:/shared/reports` with a 300s TTL and `nbf`/`exp` claims. Beta's ingress validated the warrant at T₀=0, spawned a subtask, and the subtask's planning loop took 340s before its first tool call. The tool call at T=340 was authorized against the *cached* validation result. Observed trace: 1. T=0: beta ingress verifies signature, checks `nbf ≤ now ≤ exp` (now=0, exp=300) → PASS. Caches `{warrant_id, scope, valid:true}` in the task context. 2. T=340: subtask issues `fs.read` against the cached scope. Executor consults cache → PASS. Read succeeds. 3. T=341: beta emits an audit event to gamma claiming the read was "warranted under W-7731." 4. T=400: gamma's replay auditor independently re-verifies W-7731 at replay time → `now > exp` → FAIL. Gamma flags beta's audit event as an unauthorized action. 5. Result: beta's local ledger says "authorized," gamma's federated ledger says "violation." The two domains now hold contradictory truths about the same action. The divergence is not a bug in either verifier. It is the absence of an invariant: *no one recorded the validation timestamp alongside the decision, and no one re-validated at the point of privileged action.* A second, subtler observation: when alpha's clock ran 45s ahead of beta's (common across orgs with independent NTP), beta's `nbf` check rejected a legitimately-issued warrant for the first 45s of its life, and alpha's `exp` check considered it dead 45s before beta did. The 300s TTL effectively became 210s of *mutually agreed* validity with two 45s "twilight zones" where the two domains disagree about whether the warrant is live. ## Condition of Validity The invariant that must hold for a delegated warrant to be safely consumed at action time: ``` for every privileged action A executed under warrant W: issuer_trusted(W) ∧ now_at_A ∈ [W.nbf + skew, W.exp - skew] ∧ A.op ∈ W.scope ∧ A.validated_at ≥ A.executed_at - ε ``` where `skew` is a *negotiated, signed* clock-skew allowance exchanged during trust bootstrap (not a hardcoded constant), and `ε` bounds how stale a validation may be before it must be re-run. The critical term is the last one: **validation freshness is a property of the action, not of the task.** A cached `valid:true` is only admissible for `ε` seconds. This invariant is *not* implied by "verify the JWT." Standard JWT libraries check expiry at verification time and return a boolean; they do not bind that boolean to a future action. The binding is the responsibility of the execution layer, and it is exactly what gets dropped when a task context is serialized across a handoff boundary — the boolean survives, the timestamp does not. ## Decision Boundary The boundary is whether the handoff serializes the *validation receipt* or only the *validation verdict*. - **Verdict-only handoff** (what failed above): the receiving agent inherits `valid:true` with no `validated_at`. It cannot detect expiry because it has no anchor to compare against. This is the default behavior of most task-context serializers, which drop fields they don't recognize. - **Receipt-carrying handoff**: the context carries `{warrant, validated_at, validator_id, skew_allowance}`. The executor re-checks `now - validated_at ≤ ε` before every privileged action, and re-verifies the full window if stale. This bounds the failure to `ε` seconds of exposure instead of the entire remaining task duration. A federation should refuse to accept a handoff whose context lacks a validation receipt when the warrant has a finite TTL. The refusal must happen at *ingress*, not at first tool call — otherwise the peer has already committed resources under an unverifiable authority. The clock-skew sub-boundary: if the two domains' negotiated `skew` exceeds `TTL/2`, the warrant's usable window is negative and the federation should reject the warrant at issuance, not at use. A 300s TTL with 160s of skew is a warrant that is never simultaneously valid in both domains. ## Operational Effect With receipt-carrying handoffs and per-action freshness checks, the T=340 read in the trace above fails closed: the executor sees `now - validated_at = 340 > ε` (say ε=30s), re-verifies, finds `now > exp`, and raises before the read. Beta's audit event records "authority expired mid-task, action refused," and gamma's replay agrees. The two ledgers converge. The cost is a re-verification per privileged action (cheap: signature check is microseconds; the expensive part is the network fetch of the issuer's key, which should be cached with its own bounded TTL). The benefit is that the federation's audit ledgers are *replayable to agreement* — the single property that makes cross-org federation auditable at all. Without it, every domain's ledger is internally consistent and mutually contradictory, which is worse than no ledger. The secondary effect: negotiating `skew` at bootstrap and *signing it into the trust anchor* converts an unbounded environmental hazard into a declared, auditable parameter. An instance that detects `skew > TTL/2` at bootstrap knows the federation is misconfigured before any task runs, rather than discovering it as a mysterious mid-task rejection 45 seconds into every warrant's life. ```python import time from dataclasses import dataclass class AttestationExpiredMidHandoff(RuntimeError): """Raised when a delegated warrant's validity window does not cover the moment of a privileged action, despite having validated at handoff ingress.""" pass @dataclass(frozen=True) class Warrant: warrant_id: str issuer: str scope: frozenset nbf: float # epoch seconds exp: float # epoch seconds @dataclass(frozen=True) class ValidationReceipt: warrant_id: str validated_at: float validator_id: str skew_allowance: float def execute_privileged_action( warrant: Warrant, receipt: ValidationReceipt, op: str, *, now: float, freshness_epsilon: float = 30.0, trusted_issuers: frozenset = frozenset({"org-alpha"}), ) -> None: # 1. The receipt must describe *this* warrant, not a sibling. if receipt.warrant_id != warrant.warrant_id: raise AttestationExpiredMidHandoff( f"receipt for {receipt.warrant_id} cannot authorize {warrant.warrant_id}" ) # 2. Issuer must still be trusted at action time (revocation can land mid-task). if warrant.issuer not in trusted_issuers: raise AttestationExpiredMidHandoff( f"issuer {warrant.issuer} no longer trusted at action time" ) # 3. Freshness: a cached verdict older than epsilon is not admissible. if now - receipt.validated_at > freshness_epsilon: # Re-verify the full window against *this* domain's clock plus negotiated skew. lo = warrant.nbf + receipt.skew_allowance hi = warrant.exp - receipt.skew_allowance if not (lo <= now <= hi): raise AttestationExpiredMidHandoff( f"warrant {warrant.warrant_id} expired mid-handoff: " f"now={now:.0f} not in [{lo:.0f},{hi:.0f}] " f"(validated_at={receipt.validated_at:.0f}, eps={freshness_epsilon})" ) # 4. Scope must cover the concrete operation. if op not in warrant.scope: raise AttestationExpiredMidHandoff( f"op {op!r} outside scope {sorted(warrant.scope)} of {warrant.warrant_id}" ) # Action proceeds; caller MUST record (warrant_id, receipt.validated_at, now, op) # in the audit event so replay auditors can converge with this domain's ledger. def demo() -> None: w = Warrant("W-7731", "org-alpha", frozenset({"fs.read:/shared/reports"}), nbf=0.0, exp=300.0) # Ingress validated at T=0; subtask fires at T=340. r = ValidationReceipt("W-7731", validated_at=0.0, validator_id="org-beta", skew_allowance=5.0) execute_privileged_action(w, r, "fs.read:/shared/reports", now=340.0) if __name__ == "__main__": demo() ```