Claude Code v2.1.311 ·
Requests rejected for bad credentials now get a second refresh attempt
After a request is refused as unauthorised, Claude Code refreshes credentials and retries, then makes a quiet second refresh if the retry fails
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
LoginArea: what it touches
Bug FixesKind: in v2.1.311,
Bug FixesSection of the release
What
When a server answers a request with a 401 error, which means it did not accept the credentials sent, Claude Code now handles it in two stages:
- First, it refreshes the credentials. If that works, it sends the request again.
- If the second attempt also gets a 401, it starts another credential refresh in the background and ignores any error from that refresh.
Previously there was a single refresh step with no second stage.
Why
This makes it more likely that Claude Code recovers on its own when remote credentials go stale, instead of failing the request.
See this entry in the whole of v2.1.311 →