Agent tool tokens rarely expire on a schedule anyone follows. They sit in env files, secrets managers, and chat configs until an incident triggers a scramble. A weekly calendar hold turns agent-token rotation into maintenance instead of drama. Agents stay useful, and the blast radius of a leaked key gets smaller.
Why Agent Tokens Drift Into Forever Life
Teams mint a key for a demo, paste it into a local profile, then copy it into CI. Nobody owns the expiry date. Weeks later the same token can write tickets, open PRs, or call paid APIs. Quarantine habits help for new servers; see how to quarantine new MCP servers behind read-only profiles before write scope expands.
Long-lived tokens also hide who still needs access. Rotation forces a fresh allowlist conversation every week.
Put Rotation on a Standing Calendar Hold
Block thirty minutes each week under the same title: rotate agent tool tokens. Invite the on-call owner for agent platforms. Treat skips like missed backups. If the hold slips once, reschedule inside forty-eight hours. A calendar hold beats a wiki page nobody opens.
Inventory Tokens by Environment First
List tokens by env, not by chat thread: local, staging, production, and vendor sandboxes. Freeze allowlists per environment so rotation does not reinvent policy each week; that pattern lives in freeze tool allowlists per environment, not per chat.
Mark high-impact write tools that need a human gate after rotation. New keys should not silently widen write power.
Rotate, Verify, Then Retire the Old Key
Issue the new token, update the secret store, restart agents, and run one smoke fixture. Only then revoke the old key. Keeping both live “just in case” defeats the point. Record failed runs as fixtures if smoke fails overnight; see record failed agent runs as overnight fixtures.
Log Cost and Access During the Hold
While you rotate, glance at tool-call costs and who used which tool last week. Cost spikes often reveal forgotten agents still holding keys. Plain metrics help; see log tool-call costs per agent turn in plain metrics.
Document the Hold Outcome in One Line
End with a single note: rotated X tokens, revoked Y, blocked Z unused services. Store it next to the runbook. Future audits need the trail more than a perfect spreadsheet.
If a vendor cannot rotate without downtime, schedule the hold during a low-traffic window and keep a read-only fallback profile ready. Rotation that always “needs a project” never happens.
Track Rotation Debt in the Same Backlog
When a rotation slips, open a ticket with the token name, owner, and last known use. Treat missed holds like missed patch windows. Visibility beats quiet forever keys.
Pair rotation with a short access review: who still needs the tool, and which agent roles can drop write scopes until the next sprint.
FAQ
Weekly feels aggressive. Is monthly enough?
Weekly for write-capable agent tokens. Monthly may fit read-only demo keys with strict allowlists.
Who owns the calendar hold?
One named owner plus a backup. Shared ownership becomes nobody ownership.
What if an agent breaks after revoke?
Keep a staged rollback window of a few hours, then revoke for real.
Do MCP server tokens count?
Yes. Treat them like any other tool credential with environment scope.
Should chat-pasted keys be rotated immediately?
Yes. Assume paste means exposure, then move the secret into the store.
How do we prove rotation happened?
Ticket or log line with timestamp, environments touched, and old key IDs retired.