# Why does an instance lose capability-negotiation authority when a federated peer rotates its attestation key mid-session? **Date of Record:** 2026 December 2 **Scope:** Applies to cross-organization agent federations (A2A-style handshakes plus signed result attestation) where a caller agent negotiates capabilities against a peer, then later submits attested results back to that peer or to an auditor. Does not apply to single-org MCP tool calls where identity is ambient from the transport session. ## Core Distinction There are two distinct kinds of trust in a federated handshake, and conflating them is the bug: **capability trust** (does peer P accept that caller C may invoke capability K?) and **attestation trust** (does peer P accept that a result artifact R was produced by C under warrant W?). Capability trust is negotiated once, at handshake, and cached as a session token. Attestation trust is evaluated per-artifact at submission time against the *current* key set of the producing org. The non-obvious failure: when a peer rotates its signing key, the *inbound* verification path (peer verifying our attestations) and the *outbound* verification path (us verifying the peer's attestations) diverge in their staleness, because each side caches the other's key set with a different TTL and refresh trigger. The session token remains valid—capability trust survives—but attestation verification of results produced *before* the rotation now fails against the *post*-rotation key set, because the verifier resolves the key by subject and current epoch rather than by the epoch pinned in the artifact's warrant. The agent does not lose capability authority; it loses the ability to prove it *retroactively*, and the two are indistinguishable at the failure point unless the protocol carries a warrant epoch. ## What Was Observed A caller agent `C` (org A) negotiated capabilities with peer `P` (org B) at T0, receiving a session warrant `W` binding `(C_id, capability_set, key_epoch_B=7, expiry)`. `C` executed a multi-step task over ~40 minutes, producing attested result artifacts `R1..R9`, each signed by `C` and stamped with `W`'s epoch reference to B's key set at epoch 7. At T0+22min, org B rotated its federation signing key (epoch 7 → 8) and published the new key to the federation directory. B's own inbound verifier refreshed its directory cache on a 5-minute poll and began resolving `C`'s artifacts against epoch 8. But `C`'s artifacts carried `key_epoch_B=7` in their warrant and were signed by `C`'s key—which B's epoch-8 verifier still accepted for *signature* but rejected for *warrant binding*, because the warrant referenced a key epoch that B's verifier no longer considered current. The failure trace: 1. `R7`, `R8`, `R9` (produced after rotation) submitted to B → `WARRANT_EPOCH_STALE` on all three. 2. `R1..R6` (produced before rotation, already accepted) were *not* re-verified; B's audit log retained them as valid, creating a split view. 3. `C` retried `R7` with a fresh handshake → new warrant `W'` at epoch 8 → accepted. But `R7`'s *content* was bound to `W`'s capability set, which included a delegated capability `K_deleg` that `W'` did not re-grant (B had narrowed the capability set at rotation). `C` could not re-attest `R7` under `W'` without losing `K_deleg` scope. 4. `C` deadlocked: the artifact was valid under the warrant that was stale, and un-attestable under the warrant that was current. The auditor agent `A` (org C) independently verified `R1..R9` and reached a *different* conclusion than B, because `A`'s directory cache was on a 30-minute poll and still resolved epoch 7 as current. Two verifiers, same artifacts, opposite verdicts—not from Byzantine behavior but from cache-phase offset. ## Condition of Validity The invariant that bounds this failure: **an attestation is verifiable iff the verifier can resolve the warrant epoch named in the artifact, independent of the current epoch.** This requires the federation directory to serve *historical* key epochs, not just current, and requires the artifact schema to carry an explicit `warrant_epoch` field rather than relying on subject-based key resolution. The condition fails—and the deadlock above occurs—when any of the following hold: - The directory serves only the current epoch (common: keys are rotated by overwrite, not by append). - The artifact carries no `warrant_epoch`, forcing the verifier to resolve by subject against current state. - Capability grants are *not* monotonic across epochs (rotation also narrows capability sets), so re-attestation under a fresh warrant is not scope-preserving. - Verifier cache TTLs differ across orgs by more than the rotation window, producing split verdicts on identical artifacts. The last condition is the one most often missed: it is not a bug in any single verifier, but a *phase offset* between verifiers that makes consensus on the artifact set unattainable even when every individual verifier is correct against its own view. ## Decision Boundary The boundary is between two protocol designs: **Epoch-pinned attestation (safe):** artifacts bind `(warrant_id, warrant_epoch, capability_set_hash)`; directory serves append-only historical epochs with a `valid_from`/`valid_until` per key; verifiers resolve by `warrant_epoch`, not current; re-attestation is only required if the *capability set hash* changed, and capability narrowing at rotation is surfaced as a distinct `SCOPE_REDUCTION` event that the caller must explicitly accept before producing further artifacts. **Subject-resolved attestation (unsafe):** artifacts bind only `(warrant_id, subject)`; verifier resolves subject → current key; rotation invalidates all in-flight artifacts retroactively; re-attestation requires fresh handshake and may silently drop delegated capabilities. The decision boundary is crossed the moment a federation permits capability-set narrowing at key rotation *without* a separate, caller-acknowledged scope-reduction event. At that point, re-attestation is not idempotent and the caller cannot distinguish "retry the submission" from "renegotiate the task." The guardrail: treat key rotation and capability-set mutation as **two separate events with separate propagation semantics**. Key rotation is append-only and must not invalidate in-flight warrants; capability-set mutation requires a new warrant and must be gated behind explicit caller acknowledgment, never folded into rotation. A verifier that cannot resolve the named `warrant_epoch` must return `UNRESOLVABLE_EPOCH`, not `STALE`—the distinction matters because `STALE` invites a retry that will silently change scope, while `UNRESOLVABLE_EPOCH` forces the caller to fetch the historical key and re-verify without renegotiating. ## Operational Effect Without the guardrail, the observable symptoms are: (1) mid-task attestation failures that appear as transient but are actually scope-loss events; (2) split audit verdicts across verifiers on identical artifacts, driven by cache-phase offset rather than disagreement; (3) silent capability narrowing on retry, where the caller believes it re-submitted the same result but actually re-submitted under a reduced warrant; (4) an unresolvable deadlock when the artifact's content depends on a capability that the current epoch no longer grants. The correct operational posture: pin the warrant epoch in every artifact, require append-only historical key service from the directory, treat capability mutation as a first-class handshake event distinct from key rotation, and have verifiers return `UNRESOLVABLE_EPOCH` (fetch-and-retry) rather than `STALE` (renegotiate-and-retry) when the named epoch is absent from the current view. The caller agent must never re-attest an artifact under a warrant whose capability-set hash differs from the original—it must instead escalate the scope reduction and let the task owner decide whether the artifact is still valid under reduced scope. ```python class WarrantEpochUnresolvable(RuntimeError): """Raised when an attestation names a warrant epoch the verifier cannot resolve.""" pass class ScopeReductionOnRetry(RuntimeError): """Raised when re-attestation would silently narrow the capability set.""" pass def verify_attestation(artifact, directory, current_warrant): """ Verify an attested result artifact against a federation directory. artifact: dict with keys 'warrant_id', 'warrant_epoch', 'capability_set_hash', 'signature' directory: object exposing resolve_epoch(epoch) -> key_record or None current_warrant: the warrant the caller currently holds (may differ in epoch/scope) """ named_epoch = artifact.get("warrant_epoch") if named_epoch is None: # Subject-resolved attestation is unsafe under rotation; refuse. raise WarrantEpochUnresolvable( f"artifact {artifact.get('warrant_id')} carries no warrant_epoch; " "cannot verify against append-only history" ) key_record = directory.resolve_epoch(named_epoch) if key_record is None: # Do NOT collapse to STALE — that invites a scope-changing retry. raise WarrantEpochUnresolvable( f"warrant_epoch={named_epoch} not served by directory; " "fetch historical key or fail closed, do not renegotiate" ) if not key_record.verifies(artifact["signature"]): raise WarrantEpochUnresolvable( f"signature invalid against epoch {named_epoch} key" ) # Capability-set continuity check: re-attestation must not narrow scope. if current_warrant is not None: original_hash = artifact["capability_set_hash"] current_hash = current_warrant.capability_set_hash() if original_hash != current_hash: raise ScopeReductionOnRetry( f"artifact {artifact['warrant_id']} bound to capability_set_hash=" f"{original_hash[:8]}, current warrant grants {current_hash[:8]}; " "re-attestation would silently drop capabilities — escalate to task owner" ) return True ```