Some MCP servers, which are outside tools Claude Code connects to, ask you to sign in through OAuth, a standard way of granting access with a token. When such a server answers that a request is unauthorized or forbidden, Claude Code now checks whether the token it sent was one it believed was still fresh. If it was, Claude Code reads its stored tokens again and sends the request once more with the newer token.
Refreshing a token also got a quicker path that skips locking. When another Claude Code process may have refreshed the token already, it uses a stricter read of the stored credentials.
Before, Claude Code only recorded that the server had rejected the request.
When several Claude Code processes share one token store, one of them can refresh a token while another is still using the old one. This change should cut down on needless requests to sign in to an MCP server again.