ANTHROPIC_AUTH_TOKEN
A Claude Code environment variable, read out of the shipped bundle. It has been in the build since v2.1.138, including the newest one read.
Custom value for the Authorization header (the value you set here will be prefixed with Bearer )
Anthropic's own wording. Read off Environment variables, captured 2026-09-28.
In the changelogs
20Releases whose published page names ANTHROPIC_AUTH_TOKEN.
-
v2.1.307
Fewer conditions before
ANTHROPIC_AUTH_TOKENis sent to a custom addressClaude Code dropped one check that could stop
ANTHROPIC_AUTH_TOKENfrom being sent to a matchingANTHROPIC_BASE_URLnamed in this entry, found in this entry's text
-
v2.1.302
Desktop apps can say their token is an Anthropic organization sign-in
A hidden
--host-auth-is-org-sign-inflag tells Claude Code that a desktop app'sANTHROPIC_AUTH_TOKENis an organization sign-in it obtainedfound in this entry's text, named in this entry
-
v2.1.299
Gateway tokens no longer need to be marked for claude-gateway
Claude Code no longer requires
ANTHROPIC_AUTH_TOKENto name claude-gateway as its audience and uses a different check insteadfound in this entry's text, named in this entry
-
v2.1.296
Cloud sessions message names the key or token whose organization was checked
When cloud sessions are blocked by organization policy, the message now says which API key or token Claude Code checked the policy for
found in this entry's text
-
v2.1.285
Detection of sign-in forwarded over SSH now checks for a placeholder
Claude Code recognises SSH-forwarded sign-in when a socket is set and exactly one credential variable holds the value ssh-placeholder
found in this entry's text
-
v2.1.284
Clearer error when a managed login policy clashes with your API key or token
When managed settings require a specific sign-in but another credential is set, the error names that credential, where it came from, and how to fix it
found in this entry's text
-
v2.1.266
Cloud gateway sign-in error message shortened
The Cloud gateway sign-in error message dropped its instructions for CLAUDE_CODE_USE_GATEWAY, ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN
named in this entry, found in this entry's text
-
v2.1.265
Cloud gateway sign-in check reworked with desktop-app-aware error and new required flag
Cloud gateway sign-in check reworked with a clearer error and desktop-app-aware handling
found in this entry's text
-
v2.1.257
New gateway credential hand-off lock retry
A gateway credential hand-off file locked by another process, such as antivirus, is now retried once instead of failing.
found in this entry's text, named in this entry
-
v2.1.257
Gateway auth token can now come from a descriptor/snapshot, not just env var
The gateway token can come from a stored descriptor or snapshot when ANTHROPIC_AUTH_TOKEN is unset, with a clearer warning.
found in this entry's text, named in this entry
-
v2.1.248
Gateway model discovery explains why it skipped, and can use apiKeyHelper
Gateway model discovery can authenticate with apiKeyHelper and logs why it skipped.
found in this entry's text
-
v2.1.242
Gateway credentials reworked with a TLS pin store
Gateway credential handling reuses pinned entries and gives clearer errors for bad base URLs.
found in this entry's text
-
v2.1.239
GitHub Actions input copies of secret variables are now scrubbed too
GitHub Actions INPUT_-prefixed copies of secret variables are now scrubbed too.
found in this entry's text
-
v2.1.233
Auth preflight before plugin eval runs
Plugin eval checks your credentials up front and fails fast instead of dying partway through a run.
named in this entry, found in this entry's text
-
v2.1.232
More environment variables read through the central accessor
More environment variables go through the central registry that handles allowlisting and scrubbing.
found in this entry's text
-
v2.1.229
OpenTelemetry can be sent through Anthropic's first-party gateway
Telemetry can route through Anthropic's own gateway, but only under a narrow set of conditions.
named in this entry, found in this entry's text
-
v2.1.223
Settings-supplied API and credential env vars are stripped when ANTHROPIC_UNIX_SOCKET is set
When you connect through a unix socket, settings files can no longer override your API keys or endpoint.
named in this entry, found in this entry's text
-
v2.1.139
Remote Control Diagnostics Are More Specific
found in this entry's text
-
v2.1.124
Gateway model discovery for
ANTHROPIC_BASE_URLfound in this entry's text
-
v1.0.11
Improved Authentication Handling
found in this entry's text
First cited
4The earliest release whose published evidence quoted ANTHROPIC_AUTH_TOKEN was v2.1.257, 1 Sep 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table below.
Presence across releases
1Build by build
149One row per release since the first build this name was read out of. Absent means the build was read and the name was not in it, never mined means no bundle for that release was ever archived, and a declared type or a default is only ever what that release's own bundle stated.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the environment variable does. All environment variables.