Claude Code v2.1.225 · 7 Aug 2026
OAuth 401 recovery no longer silently replaces a user-supplied token
Your explicitly set OAuth token is no longer silently swapped for a stored credential after a 401.
Use it now Tier: how much it should matter to you
4 Useful: my rating, 1 to 5
0 Signal: worth watching, 1 to 5
Auth Area: what it touches
Improvements Kind: in v2.1.225, 07 Aug 26
What probably matters to you Section of the release
What
A 401 no longer causes Claude Code to swap in a credential from disk when you explicitly supplied CLAUDE_CODE_OAUTH_TOKEN .
Details
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 Evidence
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.
How sure we are
One source agrees One thing we can check says the same as this entry.
Anthropic's release notes agree Fixed a transient 401 replacing a long-lived CLAUDE_CODE_OAUTH_TOKEN with a stored login's short-lived token, breaking headless sessions…
See this entry in the whole of v2.1.225 →
7 Aug 2026 · 155 entries, this one is #9.
Use it now15 You'll notice87 Nothing to try yet16 Under the hood37
Open the release →
Names in this entry
env CLAUDE_CODE_OAUTH_TOKEN Three artifact environment variables are now recognised, with the API token stripped from spawned processes as a secret.
env CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST Setting CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST makes the parent process dictate your model settings, ignoring your settings file.
Anthropic's note
Upstream's own release notes for v2.1.225 name something this entry names, so the two are probably about the same change. Probably: the pairing is made on a shared name rather than on the words around it.
Fixed a transient 401 replacing a long-lived CLAUDE_CODE_OAUTH_TOKEN with a stored login's short-lived token, breaking headless sessions until restart
Is this right?
0
0
Feedback
What's wrong with this entry?
Hard to understand Too vague Looks wrong Not relevant to me Too long Missing the detail I wanted Duplicate of another card
Clear Learned something new I can act on this Good catch
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
← Previous · 8 of 155
Auto-default nudge actually flips the mode, and reports the outcome
Use it now Permissions
In v2.1.225 What probably matters to you release-page order
Next → · 10 of 155
Routine trigger tool can create webhook triggers
Use it now Background Tasks