How to Invalidate a Claude Code setup-token (and What Works Today) Anthropic's `claude setup-token` command can only mint credentials, with no `--list` or `--revoke` option, and three feature requests asking for revocation tooling were closed without a fix, according to a guide published in October 2026. Tokens generated by the command last one year per Anthropic's authentication documentation, are not saved anywhere by the tool, and can only make model requests against a Pro, Max, Team or Enterprise subscription; users must revoke them manually at claude.ai under Settings, Claude Code, Authorization tokens. The guide notes one tester reports that re-running the command does not invalidate the old token, and recommends confirming a kill by sending a request with the old token from a clean machine and expecting a 401. If you ran claude setup-token for a CI job and the token has now ended up in a log, a screenshot, or a repository, the question is simple: how do you kill it? The honest answer in October 2026 is that the command only mints tokens. It has no --list and no --revoke , and the feature requests asking for them were closed without a fix. This guide covers what Anthropic documents, the manual revoke path, the reports that revocation does not always take effect, and a playbook you can run in about ten minutes. TL;DR: revoking a setup-token token | Question | Answer | |---|---| | Is there a CLI command to revoke it? | No. claude setup-token is mint-only, per the open feature requests | | How long does the token last? | One year, per Anthropic's authentication docs | | Where do I revoke it by hand? | claude.ai, Settings, Claude Code, Authorization tokens one entry per token, no label for setup-token | | Does the command save the token for me? | No. Anthropic says it "does not save the token anywhere" | | What can a leaked token do? | Make model requests on your subscription. No Remote Control, no claude.ai connectors | | Does re-running the command kill the old token? | One tester reports it does not | | How do I confirm the kill? | Send one request with the old token from a clean machine and expect a 401 | Agents that act on your behalf need rules. Agentbeam stops the dangerous actions → https://app.agentbeam.com/login What claude setup-token actually creates A vault door with a green key, showing how a claude setup-token token is a long-lived credential to store in a secret manager Anthropic's authentication docs https://code.claude.com/docs/en/authentication?ref=explainx describe the command in one line: for CI pipelines, scripts, or other environments where interactive browser login is not available, you generate "a one-year OAuth token with claude setup-token ". The flow is the same browser authorization as /login . After you approve access, the token prints to your terminal. The docs add that it "does not save the token anywhere", so you copy it into whatever secret store your pipeline uses and expose it as the CLAUDE CODE OAUTH TOKEN environment variable. Three properties matter for security: - It uses your subscription. The token needs a Pro, Max, Team or Enterprise plan. It is not an API key and it bills against subscription usage, not a Console balance. - It is narrow. Anthropic says it "can only make model requests", so it cannot establish Remote Control sessions or fetch claude.ai connectors. MCP servers you configure locally still work. - It outranks your normal login. In the credential precedence list, CLAUDE CODE OAUTH TOKEN sits above the subscription login from /login . Docs note that if you run /login while the variable is set, Claude Code reads the variable again in every new session until you remove it from your shell profile or the env block of a settings file. That last point is the most common reason a "revoked" credential seems to keep working on a laptop: the variable is still exported in a shell profile. For the full command and credential reference, see the Claude Code commands guide https://explainx.ai/blog/claude-code-commands-complete-reference-guide-2026 . Why there is no revoke command People have asked for one repeatedly, and all three requests ended without a feature: | Issue | What it asked for | Outcome | |---|---|---| | 48373 April 15, 2026 | claude setup-token --list and --revoke