You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
AuthArea: what it touches
ImprovementsKind: in v2.1.314,
ImprovementsSection of the release
What
When you sign in with your Claude account through the browser (the OAuth sign-in flow), Claude Code now checks your organization's configuration before it saves the new credentials. Your organization's policy can therefore refuse a sign-in.
A refused sign-in revokes the token that was just issued, so it can no longer be used, and the error is shown to you.
claude setup-token, the command that creates a long-lived sign-in token, now ends when the sign-in is refused. Its sign-in screen gained an onOrgConfigRefused callback (a step that runs when this happens) next to the existing onAccountOnHold, and the command exits with an org_config_refused status.
The onboarding, login and session-resume dialogs now reload your organization's documents and settings after sign-in, through the new onOrgDocumentsReload and onSettingsReload callbacks and an orgConfigGateFollows option.
The error shown when --bg (start a session as a background agent) is combined with bypass-permissions mode now tells you when your user settings are not being read.
Why
If you work under an organization that manages Claude Code, signing in or creating a token can now fail because of that organization's policy, and the failure is reported instead of the token being kept. Organization-managed settings are reloaded as part of signing in.
Read from
Names in the bundleclaude setup-token
What the documentation says
claude setup-tokenPersist sessions to external storagemodified, high confidence* **Long-lived token**: if you run the agent yourself under your own Claude subscription, set `CLAUDE_CODE_OAUTH_TOKEN` in `env` to a token from [`claude setup-token`](https://code.claude.com/docs/en/authentication#generate-a-long-lived-to…see the edit
Since it was published
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.
Confirmed sinceAnthropic's documentation has since written up claude setup-token, on Claude Code changelog.* Fixed the sign-in failure when a stored claude.ai login reaches its time limit: it now says so, and in `claude -p` names `claude auth login` and `claude setup-token`changelogsee the edit
Added sinceA small documentation edit on Authentication touched a line naming claude setup-token after this was published.5. `CLAUDE_CODE_OAUTH_TOKEN` environment variable. A long-lived OAuth token generated by [`claude setup-token`](#generate-a-long-lived-token). Use this for CI pipelines and scripts where browser login isn't available. If you run `/login` w…authenticationsee the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesclaude setup-token on Persist sessions to external storage