What
The command now errors on excess arguments instead of silently ignoring them.
Usage
claude setup-tokenEvidence
Set up a long-lived authentication token (requires Claude subscription)
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Names in the bundleclaude setup-token
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added since
A small documentation edit on Test self-hosted environments end to end touched a line naming claude setup-token after this was published.
There is no long-lived CI token for this today. The scope that grants cloud-session control, `user:sessions:claude_code`, is capped server-side at 30 days, so `claude setup-token`, which mints a one-year inference-only token, doesn't cover…self-hosted-environments-testing see the edit
Confirmed since
Anthropic's documentation has since written up claude setup-token, on CLI reference.
| `claude setup-token` | Generate a long-lived OAuth token for CI and scripts. Prints the token to the terminal without saving it. Requires a Claude subscription. See [Generate a long-lived token](/docs/en/authentication#generate-a-long-li…cli-reference see the edit
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up claude setup-token, on CLI reference.
Anthropic's release notes agree
claude setup-token now rejects unexpected extra arguments instead of silently ignoring them