[BUG] claude.ai connectors silently missing for the whole session when the connector-list fetch gets a 401 at first launch of the day — 401 is never retried, even after the token refresh succeeds
Preflight Checklist
- [x] I have searched existing issues. Related, but not the same: #91708 (concurrent OAuth refresh race on Windows/VS Code) and #79688 (first daily launch: expired token, fatal 401). This report is about a downstream, non-fatal consequence of that race that nobody seems to have reported yet: the claude.ai connector list is never re-fetched.
- [x] This is a single bug report
What's Wrong?
On the first launch of the day (the OAuth access token expired overnight), the request that lists the user's claude.ai connectors (GET /v1/mcp_servers) can be sent before the token refresh has landed. It gets a 401. Claude Code treats this as final: it never retries, and it never re-fetches the list once the refresh succeeds a few seconds later.
The session then works normally. Chat requests are retried up to 11 times and eventually go through with the refreshed token. But every claude.ai connector (Gmail, Google Drive, Notion, Figma, Canva, …) is missing for the entire life of the session. Nothing visible tells the user. The connectors are not even listed as "needs auth". The only signal is that the model has no Gmail/Drive tools and says so.
Observed on one Windows machine. Between Oct 1 and Oct 9, it happened on 2 of the 9 session starts we could trace. Both were the first launch of the morning, after a night without any Claude Code activity, so the access token had expired. The other 5 starts were fine on the same machine and the same networks. We first suspected the office network and then ruled it out: connectors loaded fine on that same Wi-Fi at other times of day.
Error Messages/Logs
VS Code extension output, 2.1.286, timestamps in UTC, 2026-10-02 (first VS Code launch of the morning; previous Claude Code activity ~16 h earlier):
06:47:27.775Z [DEBUG] [MCP] claude.ai connectors running fully async (nonblocking)
06:47:28.638Z [DEBUG] GrowthBook: pre-init OAuth refresh failed (timeout)
06:47:32.784Z [DEBUG] [claudeai-mcp] Fetching from https://api.anthropic.com/v1/mcp_servers?limit=1000&include_additional_installs=true
06:47:38.741Z [DEBUG] [claudeai-mcp] Fetch failed (401) after 1 attempt(s)
06:47:38.787Z [ERROR] [Bootstrap] fetchBootstrapData failed: AxiosError: Request failed with status code 401
06:47:52.458Z [DEBUG] [claudeai-mcp] Fetch failed (401) after 1 attempt(s)
06:47:55.860Z [DEBUG] [servedCatalog] stale_refresh settled after its 2000ms wait: fetch:error, request took 14183ms
06:48:11.684Z [ERROR] API error (attempt 1/11): OAuth access token could not be refreshed: another Claude Code process is holding the refresh lock
06:48:11.690Z [ERROR] API oauth_refresh_lock_timeout: OAuth access token could not be refreshed: another Claude Code process is holding the refresh lock
In the session transcript (deferred_tools_delta), all 9 mcp__claude_ai_* servers appear in removedNames at 06:48Z, and needsAuthMcpServers contains no claude.ai entry. The connectors stayed absent for the next 4.5 hours. After Developer: Reload Window at 11:12Z, the new process logged [claudeai-mcp] Fetched 12 servers and all connectors came back.
The second occurrence was on 2026-10-07 with 2.1.288. It had the same signature: first launch after the PC slept overnight, all claude.ai connectors absent for the whole session, which lasted two days. The VS Code log for that window was not retained.
Root cause (as far as we can read it in the shipped 2.1.292 native binary, minified)
- The connector-list fetch has a retry loop, but its predicate excludes 401:
if(... He===void 0||He===401||He===429) return !1. A 401 is classifiedfetch_needs_authand thrown immediately (after 1 attempt(s)). - On failure, the cached fetch is cleared (
claudeAiConfigsFetch=null). But the connector mount (Itn) only runs again whenmcpIdentityChangedSinceLastCheck()is true or withforce:!0, i.e. on a login or account switch. A successful token refresh is not an identity change, so nothing re-runs the fetch for the rest of the process lifetime. - The 401 itself comes from the refresh race already described in #91708. Several VS Code tabs, each with its own
claude.exe, refresh at the same moment when VS Code starts or the PC wakes ("another Claude Code process is holding the refresh lock"). The network was also slow at that moment (one request took 14 s).
What Should Happen?
Any one of these would fix it:
- When the connector-list fetch gets a 401, await the in-flight or next token refresh, then retry once with the new token.
- Or re-run the claude.ai connector mount whenever the access token changes, not only on identity change.
- At minimum, show the failure ("claude.ai connectors failed to load — retry") and offer a retry in
/mcp, instead of a silent absence.
Steps to Reproduce
- Windows, VS Code extension, subscription login with the file credential store (
%USERPROFILE%\.claude\.credentials.json), several claude.ai connectors enabled. - Keep 2–3 Claude Code tabs open and let the PC sleep overnight, so the access token expires.
- In the morning, wake the PC and open a new Claude Code conversation (or start VS Code, which restores several tabs) within a minute or two.
- Intermittently: no
mcp__claude_ai_*tools in that session, and the log shows[claudeai-mcp] Fetch failed (401) after 1 attempt(s).
Workaround: Developer: Reload Window.
Claude Code Version
2.1.286 (Oct 2) and 2.1.288 (Oct 7), VS Code extension with bundled native binary. The same retry logic is present in 2.1.292. We found nothing related in the changelog up to 2.1.296.
Platform
Anthropic API (Claude Max subscription, OAuth)
Operating System
Windows 11 Pro, build 26300
Terminal/Shell
VS Code extension (Claude Code panel)