Your explicitly set OAuth token is no longer silently swapped for a stored credential after a 401.
What's wrong with this entry?
A 401 no longer causes Claude Code to swap in a credential from disk when you explicitly supplied CLAUDE_CODE_OAUTH_TOKEN.
- When the token came from the user's environment, and this is not a remote child session or a unix-socket setup, an explicit error is logged and the supplied token is kept
- The disk-recovery path now additionally requires the stored credential to be unexpired
- The whole env/disk recovery block is skipped when credentials are host-managed via
CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST - The recovery failure reason gained a third value for the skipped-user-env-token case, alongside background-worker and interactive no-refresh-token
OAuth 401: keeping the user-supplied CLAUDE_CODE_OAUTH_TOKEN instead of adopting the stored credential., oauth_401_skipped_user_env_token
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.229
OpenTelemetry can be sent through Anthropic's first-party gateway
Both mention token provider managed host auth
-
v2.1.222
Host-managed provider sessions take model policy from the parent process
Both mention provider managed host
-
v2.1.229
OAuth token warning no longer tells you to unset the variable
Both mention oauth token auth