## TL;DR
Stage the promotion so a credential expiry cannot strand it halfway: verify all preconditions, artifact presence, current stage or alias state, and approvals, before the first registry write, renew the credential at the start of the promotion window, and make each write idempotent so a retry after renewal completes the promotion instead of duplicating or conflicting with its own first attempt.

```text
auth token expired mid-registry promotion and agent failed to promote the model with a token error
```

## Use this when
- The run or call fails with this symptom: auth token expired mid-registry promotion and the agent failed to promote the model with a token error.
- You are working on an agent promoting a model version in a registry and the failure repeats on the same run or configuration.
- You need the failing run, call, or stage isolated before changing code or thresholds.

## Not for this skill when
- A credential revoked for policy reasons mid-promotion, where renewal is not available and a human must re-authorise.
- The error text names a different tool, stage, or root cause. Match the verbatim error first and use that skill.

## Steps
1. Read the registry state to determine which promotion steps, if any, the interrupted attempt completed. Verify: the promotion's true progress is known
2. Renew the credential and rebuild the client before any further registry call. Verify: calls authenticate again
3. Complete only the remaining steps, using idempotent operations or explicit state checks before each write. Verify: the promotion finishes without duplicates or conflicts
4. Verify the final state matches the intended promotion exactly: version, stage or alias, and no stray intermediate state. Verify: the registry shows the intended end state
5. Add a renewal step at promotion start, sized to the promotion's longest step, to the runbook. Verify: future promotions start with a fresh credential

## Variant phrasings
### token expired mid registry promotion agent failed promote model
The verbatim phrasing.
### agent model promotion interrupted auth resume steps fix
The resume phrasing.
### registry promotion half done token error verify state agent
The half-done phrasing.

Compatibility: Agent promotion of models in registries with expiring credentials

## Why it happens
Promotions are multi-write operations against a registry, so a mid-sequence expiry leaves a half-promoted model whose true state nobody has read. Recovery starts with reading that state; retrying the whole sequence blind creates the conflicts and duplicates that make promotions scary to automate.

## Edge cases / pitfalls
- Alias moves are usually atomic single writes; stage-based multi-step flows are where stranding happens.
- Record the promotion plan before executing it; the plan is what recovery reads when an attempt dies.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_VH5U110-T8shiyE_eFuT_Q
