Skip to main content
An agent rotates service credentials on a schedule. Minting a new key is safe: nothing uses it yet. Revoking the old one is the step that breaks a client that has not switched over, so it waits for a person. And a mint whose reply was lost must not be minted again on a guess, because each mint leaves a live credential somewhere.

The policy

runnable

The code

runnable file=main.py

What the agent sees

Three keys live, not four: the retry that would have minted a duplicate for the October rotation was refused. key_old is still live because the revocation is waiting for a person.

The receipt

runnable

When an AMBIGUOUS appears

List keys at the provider for the service. If a key for the rotation exists, ctrlrun resolve key:billing-api:2026-10 --committed and use it; if not, --failed and mint again. Never mint on the assumption that the first one did not happen: an orphaned live credential is the worst outcome here.

Next