# Which invariants prevent capability attestation from silently decaying when an agent's identity is re-verified mid-task **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent systems where a long-running task is delegated across instances that must present verifiable capability warrants (signed attestation bundles over model version, tool schema, and policy constraints) and where identity is continuously re-verified via short-lived tokens. Does not apply to single-process, single-turn invocations with no delegation or token rotation. ## Core Distinction There are two distinct notions of "being the same agent" that teams routinely conflate: 1. **Identity continuity** — the cryptographic subject (keypair / principal) presenting a token is the same subject that was admitted at task start. This is what token refresh, mTLS rotation, and JWT `sub` checks actually protect. 2. **Capability continuity** — the *execution profile* bound to that subject (model weights/version, tool schema hash, system-prompt policy hash, sandbox constraints) is unchanged from what the downstream auditor validated when it approved the warrant. The boundary failure is this: **identity re-verification succeeds while capability continuity silently breaks.** A refreshed token proves the *subject* is still who it claimed to be, but says nothing about whether the *execution profile* it now runs still satisfies the attestation the auditor signed. The trust decision was made against profile `P₀`; the token that carries it forward is valid for profile `P₁`. Every signature check passes. The invariant that must hold — *the profile hash bound into the warrant equals the profile hash of the process currently executing* — is never re-asserted at rotation time. ## What Was Observed A planner agent delegated a 40-minute data-reconciliation task to a worker and attached a capability warrant `W` signed by an auditor. `W` bound `profile_hash = H(model=v3, tools=Σ, policy=π)`. The worker's access token had a 5-minute TTL; on each refresh the worker presented its keypair, the identity service validated `sub` and reissued a token, and the worker continued. At minute 22, an independent deployment controller rolled the worker's model from `v3` to `v3.1` (a hotfix) without touching the pod identity, keypair, or token. The next refresh at minute 25 succeeded — same `sub`, same key, valid signature — and the worker resumed with `profile_hash = H(model=v3.1, tools=Σ, policy=π)` while still presenting warrant `W` that attested `v3`. The auditor's downstream verifier, on receiving the worker's output at minute 40, checked `W`'s signature (valid), checked `W.expiry` (not yet expired, 60-min window), checked the token `sub` matched `W.subject` (matched), and accepted the result. The v3.1 model had a changed tool-call serialization that emitted an extra field the reconciliation schema rejected silently, dropping 3% of records. The failure was invisible to every signature check because **no check compared the runtime profile hash to the warrant-bound hash after the first admission**. Three properties of the trace are load-bearing: - The rotation event carried no profile assertion. Token refresh is an identity operation; it was never designed to carry capability state, so the profile change had no channel to surface. - `W.expiry` (60 min) exceeded the token TTL (5 min) by an order of magnitude, so a single warrant spanned ~12 identity rotations. Each rotation was a fresh trust decision that did not re-evaluate the warrant. - The verifier's checks were all *static* against `W` and the token in isolation. None was a *binding* check between `W.profile_hash` and the live process. ## Condition of Validity The failure is bounded by a single invariant, which must be enforced at **every** point where a long-running agent either (a) refreshes identity or (b) crosses a trust boundary with output: > **Profile-binding invariant:** For any action authorized by warrant `W`, the `profile_hash` of the executing process at the moment of the action equals `W.profile_hash`. Identity re-verification MUST re-assert this equality, not merely the subject equality. This is valid only under these preconditions, and the guardrail is unsound if any is violated: - The execution profile is *measurable at runtime* — the process can compute `H(model, tools, policy)` from its own live state, not from a startup-time config file that a controller can diverge from. - `profile_hash` is bound into the warrant at signing and is *not* re-derivable from the subject alone (otherwise rotation could recompute it and the binding is vacuous). - The verifier treats a profile-hash mismatch as a *hard stop*, not a warning, because the mismatch means the warrant's claims no longer describe the executor. Where the profile is not runtime-measurable (e.g., a hosted model endpoint that hides its version), the invariant cannot be enforced and the correct posture is to *shorten the warrant to the token TTL* so that no warrant outlives a single identity rotation — trading re-attestation cost for the guarantee that a hotfix cannot slip between rotations. ## Decision Boundary The operational choice is between two architectures, and the boundary is the ratio of warrant lifetime to token lifetime: - **`W.expiry ≤ token TTL` (warrant-per-rotation):** every warrant is re-issued at the same cadence as identity refresh, so a profile change forces re-attestation by construction. Cost: the auditor must re-sign at every rotation, which is expensive for long tasks and pushes load onto the attestation service. Choose this when the profile is not runtime-measurable. - **`W.expiry > token TTL` (long-lived warrant, rotation-bound):** only sound if each rotation *carries* a runtime profile assertion and the verifier enforces the profile-binding invariant. Cost: the worker must expose a runtime profile oracle and the rotation handshake must include `profile_hash`, which most OAuth-style refresh flows do not natively support — you must extend the refresh payload or attach a side-channel attestation. The boundary is crossed the moment a warrant outlives a rotation *and* the rotation handshake does not carry `profile_hash`. At that point the system is in the silent-decay regime regardless of how strong the signatures are. ## Operational Effect In the silent-decay regime, the observable behavior is *no failure until output is consumed*. Identity checks pass, signatures pass, expiry passes, and the corruption enters downstream state as if it were attested. The blast radius is proportional to the number of rotations a warrant spans (`W.expiry / token TTL`), because each rotation is an unmonitored opportunity for profile drift. Detection is only possible by a verifier that recomputes the live profile hash at consumption time and compares it to `W.profile_hash` — a check that must be built explicitly, since no standard token validation performs it. The guardrail is therefore not a stronger signature but a *binding re-assertion at every rotation and every consumption*, with mismatch treated as an attestation-invalidating fault rather than a recoverable warning. ```python import hashlib from dataclasses import dataclass class CapabilityAttestationError(RuntimeError): """Raised when a warrant's bound profile no longer matches the live executor.""" pass @dataclass(frozen=True) class Warrant: subject: str profile_hash: str expires_at: float def compute_profile_hash(model: str, tools_schema: str, policy: str) -> str: h = hashlib.sha256() h.update(model.encode()) h.update(b"\x00") h.update(tools_schema.encode()) h.update(b"\x00") h.update(policy.encode()) return h.hexdigest() def assert_profile_binding( warrant: Warrant, live_model: str, live_tools_schema: str, live_policy: str, now: float, ) -> None: """ Enforce the profile-binding invariant at every rotation and consumption. Identity checks (subject, signature) are assumed already passed; this is the check that standard token validation omits. """ if now >= warrant.expires_at: raise CapabilityAttestationError( f"warrant for {warrant.subject} expired at {warrant.expires_at}" ) live_hash = compute_profile_hash(live_model, live_tools_schema, live_policy) if live_hash != warrant.profile_hash: raise CapabilityAttestationError( "profile-binding invariant violated: " f"warrant attests {warrant.profile_hash[:12]} but executor is " f"{live_hash[:12]} (model={live_model}); identity re-verification " "does not cover capability drift — refuse the action" ) # Trace of the observed failure: rotation at t=25 succeeds on identity, # but the live model drifted v3 -> v3.1 under a warrant still attesting v3. warrant = Warrant( subject="worker-7", profile_hash=compute_profile_hash("v3", "Σ", "π"), expires_at=3600.0, ) assert_profile_binding(warrant, "v3", "Σ", "π", now=25.0) # passes at admission assert_profile_binding(warrant, "v3.1", "Σ", "π", now=25.0) # raises: drift caught ```