Some MCP servers (outside tools Claude Code connects to) ask you to sign in with OAuth, a standard sign-in method that issues an access token that expires and a refresh token used to get a new one. Before, Claude Code tried to refresh the access token whenever it had 300 seconds or less left. It now uses a margin value instead of that fixed five minutes.
The refresh logic also behaves differently in these ways:
- Tokens that are not yet due for a refresh: Claude Code checks the credential store, where sign-in details are saved, for a newer token before doing anything else.
- Failed refreshes: Claude Code remembers which access token it could not refresh, so it does not keep retrying the same one.
- Saved tokens: each one now records when it was received.
- Debug log: it now separates a proactive refresh, an ordinary refresh, and a check of the credential store.
When several Claude Code sessions or other programs use the same MCP server, they can try to refresh the same token at once and get in each other's way. Picking up a token another session already refreshed reduces those clashes.