You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
AuthArea: what it touches
ImprovementsKind: in v2.1.326,
ImprovementsSection of the release
Unclear What the new condition is that can make a sign-in count as not valid is not known.
What
ANTHROPIC_API_KEY is an environment variable holding an API key, a named value you set in your shell before starting Claude Code. Claude Code now shows hints about it:
"ANTHROPIC_API_KEY is set but not in use · /config to use it"
The checks that decide whether your sign-in is valid now also stop early when a new condition fails. Checking a pinned organization now also takes into account which organization signed the credential.
Why
If you set an API key and Claude Code is not using it, the hint tells you why and where to change it in /config.
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 sinceA small documentation edit on Best practices for Claude Code touched a line naming ANTHROPIC_API_KEY after this was published.* [`--bare`](https://code.claude.com/docs/en/headless#start-faster-with-bare-mode) skips your hooks, skills, plugins, MCP servers, and `CLAUDE.md` files from the repo and your home directory. It also doesn't use your claude.ai login: auth …best-practicessee the edit
Confirmed sinceAnthropic's documentation has since written up ANTHROPIC_API_KEY, on Beta.-H "Authorization: Bearer $ANTHROPIC_API_KEY" \api/betasee the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhat the new condition is that can make a sign-in count as not valid is not known.
Anthropic's documentation agreesAnthropic's documentation has since written up ANTHROPIC_API_KEY, on Beta.
Anthropic's release notes agreeFixed /login ending on "Login successful" while an approved ANTHROPIC_API_KEY was still used; it now says requests still use the key