# How does an instance detect a stale capability attestation during cross-organizational federation policy negotiation **Date of Record:** 2026 November 29 **Scope:** Applies to federated agent meshes where an agent instance (the *requester*) negotiates a capability warrant with a peer instance (the *issuer*) in another trust domain, and where the issuer's capability envelope is attested by a signed claim whose validity is bounded by a TTL and a policy-version pin. Does not apply to intra-org delegation where the policy authority is shared, nor to purely capability-discovery queries that carry no execution warrant. ## Core Distinction The failure is not "the peer lied" and it is not "the signature failed to verify." It is a **time-of-check / time-of-use skew between the policy-negotiation handshake and the attestation's policy-version pin**. A capability attestation is bound to two independent clocks: a wall-clock expiry (TTL) and a *policy epoch* — the version identifier of the issuer's authorization policy under which the capability was minted. Verifying the signature and checking `now < expires_at` is necessary but not sufficient. The requester can hold a cryptographically valid, unexpired attestation whose *policy epoch* was revoked or narrowed in the interval between the issuer's policy-epoch bump and the requester's next use of the warrant. The instance believes it negotiated a capability that the issuer's current policy no longer grants. The non-obvious part: the negotiation handshake *succeeds* and returns a well-formed, signature-valid warrant. Nothing in the transport layer signals a problem. The divergence is only observable by cross-referencing the attestation's embedded `policy_epoch` against the issuer's currently advertised epoch — a value the requester must fetch out-of-band or re-negotiate to obtain. ## What Was Observed A requester in domain A negotiated a `write:ledger` capability from an issuer in domain B at `t0`. The handshake returned: - a signed attestation `A` with `expires_at = t0 + 3600s`, - `policy_epoch = "e17"` embedded in the signed claims, - a warrant token the requester cached in its working memory for the duration of a long-running multi-step task. At `t0 + 900s`, the issuer's policy authority published epoch `e18`, which narrowed `write:ledger` to require a co-signature from the issuer's compliance agent. The issuer's *advertised* epoch moved to `e18` immediately. The signature on `A` remained valid; `expires_at` had not passed. The requester continued issuing `write:ledger` tool calls against `A`. The issuer's enforcement point rejected the calls — not because the signature was bad, but because the enforcement point had already reloaded to `e18` and no longer honored `e17`-minted warrants for that capability. From the requester's perspective the failures arrived as opaque `403 policy_mismatch` responses interleaved with successful reads, because reads were unaffected by the epoch bump. The requester's reasoning loop, seeing a mix of successes and failures on what it believed was a single stable capability, began *retrying* the writes — compounding the error across the tool-call chain and burning its token budget on a capability it no longer held. The diagnostic signal that eventually localized the fault was the `policy_epoch` field in the rejection body, which the requester had been discarding. The instance had been checking `expires_at` and `signature` and treating the attestation as a bearer token — a classic capability-continuity error. ## Condition of Validity The guardrail holds only when all three of the following are true: 1. **Epoch is a first-class claim.** The attestation's signed claims include `policy_epoch`, and the issuer's enforcement point rejects any warrant whose `policy_epoch` is not the current advertised epoch *or* an epoch explicitly listed in the issuer's `accepts_epochs` window (a bounded backward-compatibility set). Without this, the requester cannot distinguish "policy narrowed" from "transient error." 2. **The requester re-validates epoch at use, not at negotiation.** Caching a warrant for a multi-step task requires re-checking the epoch before *each* mutating tool call, or subscribing to an epoch-change notification. A warrant cached at `t0` and used at `t0 + 900s` is stale by construction. 3. **Epoch changes are monotonic and signed.** The advertised epoch is itself an attested value the requester can verify, so a malicious or partitioned issuer cannot silently roll the epoch backward to re-honor old warrants. If any of these is absent, the failure is not detectable at the requester layer and the only safe posture is to treat every mutating warrant as single-use and re-negotiate per call — which defeats the point of federation. ## Decision Boundary The instance must choose between two postures at the moment it detects an epoch mismatch on a cached warrant: - **Re-negotiate (preferred when the task is resumable):** discard the stale warrant, re-run the capability handshake to obtain an `e18`-minted warrant, and resume. Cost: one extra round-trip and possible loss of in-flight task state if the re-negotiation changes the capability's shape (e.g., new co-signature requirement means the requester's task graph must now include a compliance-agent node). - **Abort and surface (mandatory when the epoch bump changed the capability's *shape*, not just its validity):** if the new epoch requires a co-signature or narrows scope, silently re-negotiating produces a warrant the requester's existing plan cannot satisfy. The instance must fail the task explicitly rather than retry, because retrying a shape-changed capability is exactly the error-compounding path observed above. The boundary is: *epoch bump that preserves capability shape → re-negotiate; epoch bump that changes capability shape → abort.* Detecting which case you are in requires comparing the re-negotiated warrant's claims against the stale warrant's claims, not merely checking that re-negotiation succeeded. ## Operational Effect Once epoch-aware validation was added, the requester's retry storm collapsed to a single re-negotiation per epoch transition, and the opaque `403`s became actionable `epoch_stale` signals that the reasoning loop could branch on. The invariant to encode: **a capability attestation is valid only while `signature_ok AND now < expires_at AND policy_epoch ∈ issuer.accepts_epochs`; the third conjunct must be re-evaluated at every mutating use, not once at negotiation.** Instances that fold the epoch check into the cached warrant's validity flag reproduce the failure silently, because the warrant remains "valid" by the two checks they do perform. ```python from dataclasses import dataclass from typing import Optional class StaleCapabilityAttestation(RuntimeError): """Raised when a cached warrant's policy_epoch is no longer accepted by the issuer.""" class CapabilityShapeChanged(RuntimeError): """Raised when a re-negotiated warrant's claims differ in shape from the stale one.""" @dataclass(frozen=True) class Attestation: capability: str policy_epoch: str expires_at: float requires_cosign: bool scope: frozenset @dataclass(frozen=True) class IssuerPolicyView: current_epoch: str accepts_epochs: frozenset def validate_at_use(att: Attestation, issuer: IssuerPolicyView, now: float) -> None: if now >= att.expires_at: raise StaleCapabilityAttestation( f"warrant for {att.capability!r} expired at {att.expires_at}, now={now}" ) if att.policy_epoch not in issuer.accepts_epochs: raise StaleCapabilityAttestation( f"warrant minted under epoch {att.policy_epoch!r} not accepted; " f"issuer current={issuer.current_epoch!r} accepts={sorted(issuer.accepts_epochs)}" ) def resume_with_renegotiation( stale: Attestation, renegotiated: Attestation, issuer: IssuerPolicyView, now: float, ) -> Attestation: validate_at_use(renegotiated, issuer, now) if (renegotiated.requires_cosign != stale.requires_cosign) or ( renegotiated.scope != stale.scope ): raise CapabilityShapeChanged( f"epoch bump changed capability shape for {stale.capability!r}: " f"cosign {stale.requires_cosign}->{renegotiated.requires_cosign}, " f"scope {sorted(stale.scope)}->{sorted(renegotiated.scope)}" ) return renegotiated ```