OAuth token expired / refresh failed — page 2
The stored OAuth token lapsed and the refresh did not recover it.
344 issues · 91 open · 253 resolved (74%) · first seen May 7, 2025
First response · account
What to do now
Most likely: Authentication, usage state or session size blocked the request.
- Check the exact account, organization and usage window currently selected.
- Try a new short session before deleting credentials or local history.
- If the state is inconsistent across machines, preserve diagnostics and re-authenticate once.
These are conservative triage steps, not an official Anthropic fix. Use the issue and workaround evidence below before making a destructive configuration change.
Is this getting better or worse?
This class of problem is holding steady. 119 new reports in the last 90 days vs 115 in the 90 before — +3%. The open backlog peaked at 91 in 2026-08 and sits at 91 today.
Derived by counting each matching issue from its creation date until it closed. First-party
computation over the anthropics/claude-code tracker — the trend is not published
anywhere upstream.
Which builds report this
191 of these reports name the Claude Code build they were running, spanning 103 releases. Heaviest reporters:
- Claude Code v2.1.220
- Claude Code v2.1.229
- Claude Code v2.1.39
- Claude Code v2.1.119
- Claude Code v2.1.203
- Claude Code v2.1.177
- Claude Code v2.1.218
- Claude Code v2.1.198
Report volume, not a defect count: an issue can mention a build without that build having caused the failure. Versions come from the version string in the bug-report template, matched against real published tags.
Do these get fixed?
Median time to close is 7 days across 253 closures. Of the 253 closures with a recorded reason, 17% were closed as completed and 210 as not-planned or duplicate. The most recent completed fix landed in 2026-08.
Workarounds reported by the community
116 of these issues post a workaround someone says worked. The highest-engagement ones:
- [FEATURE] Enable Claude Code to access chat history in Claude App
- …opt-in, no sync needed in the other direction. The current workaround (manually summarizing and pasting context) defeats the entire purpose of persistent memory and cross-session continuity that Anthropic is actively bu…
Found in the thread of #15542 · still open - Missing Token Refresh Mechanism for MCP Server Integrations
- …ll, it's an option. I notice Linear's MCP server chose that workaround too: their access tokens expire in 7 days by default. But I don't think it's the right solution, and neither do the MCP protocol authors, [who say](…
Found in the thread of #5706 · resolved - Frequent re-authentication required with multiple concurrent Claude Code sessions (OAuth refresh token race condition)
- …rocesses share a single token manager that handles refresh. Workaround Currently, the only workaround is to close stale Claude Code sessions to reduce the number of concurrent processes competing for token refresh. This…
Found in the description of #24317 · resolved - [BUG] OAuth token expiration disrupts autonomous workflows – refresh token handling needed
- …t working, giving the same error message again Update: Temp workaround is to go to the folder and start Claude CLI with , then continue the session from there.
Found in the thread of #12447 · still open - [BUG] OAuth error: timeout of 15000ms exceeded can not login it keeps timout even though I tried token too
- I found a workaround for this issue. I used the binary from a previous version (2.1.50), which can be found in ~/.local/share/claude/versions. I logged in using that version, and once the authentication was successful, I…
Found in the thread of #33214 · still open
Excerpts are quoted from the linked issue so you can judge relevance before opening it. Threads that only ask for a workaround, or report that there is none, are excluded. These are community suggestions, not official guidance from Anthropic — read the full thread before applying one.
Matching issues 101–200
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 344 matches; the statistics above cover all 344.
- Slack MCP (mcp.slack.com) OAuth stores empty accessToken after completing flow; complete_authentication also broken
- [BUG] HTTP MCP OAuth tokens written to macOS Keychain but not loaded at session start — re-auth required every session
- /mcp list view shows "connected" for HTTP MCP servers that lack valid OAuth — auth state not surfaced
- [BUG] Multiple custom MCP connectors stopped working simultaneously with "Couldn't reach the MCP server" error
- Plugin hooks that refresh OAuth tokens silently break authentication
- [BUG] 401 after successful /login on 2.1.87 — token not persisting FOR 12+ hours and 10+ attempts with success print
- [BUG] Unable to use Claude Code Web - Endless Timeouts
- Authentication method unexpectedly switched from Claude Max to Claude API mid-session
- [BUG] MCP server named "supabase" ignores stdio configuration and forces SSE/OAuth connection
- OAuth token expires when using Claude Code on multiple devices
- [BUG]
- [BUG] OAuth token has expired 라고해서 /login 했더니 cloudflare 500 에러 뜨는데 이러면 클로드코드를 어떻게 써야하나요?
- [BUG] Using Max 200 Plan but Charged for API Usage!
- [BUG] Gateway provider discards the refresh token and has no refresh-token grant, so every renewal is a full device-code re-grant
- MCP OAuth: stale dynamic client registration replayed forever after server prunes it ("Unrecognized client_id"); no clear-auth option in /mcp
- [BUG] macOS: token rotations persist to Keychain only while /login writes .credentials.json only — store split-brain revokes the token family, forcing repeated re-login
- Credential writes replace symlinks and clobber shared state: concurrent instances sharing .credentials.json cascade each other (and the user) to logged-out
- [Bug] Anthropic API Error: insufficient_scope not triggering step-up authorization flow
- Subscription-OAuth long-running Remote Control session dead-ends at 401 / "Please run /login" at the daily refresh boundary; /login cannot complete in a remote-controlled session
- [Bug][harness] ClAudit: auto-mode classifier denied — The action reads the MSAL token cache to extract a user refresh token
- [BUG] VS Code extension prompts re-login on every PC restart when access token is expired at startup
- Indeed MCP OAuth fails with `invalid_client / Client not allowed` — same pattern as #47185
- Gmail MCP connector: write operations (label_thread/archive/trash) fail in remote routines due to JIT scope upscoping
- HTTP MCP OAuth: refresh token not used; client drops to bootstrap tools when access token expires
- [DOCS] Authentication docs omit OAuth refresh behavior when the server revokes a token early
- [BUG] 401 Authentication Error — OAuth token rejected on all servers despite valid Max 20x subscription
- Vercel MCP plugin OAuth token not persisted between sessions
- MCP OAuth writes corrupt shared credential store, causing Team plan logout across all sessions
- OAuth token expires daily, no way to re-auth over SSH — locked out for 6 days while traveling
- OAuth token expired — login/logout/all commands fail with 401, no recovery path
- [BUG] inaccurate feedback during system outages
- Supabase MCP plugin requires daily re-authentication
- Add automatic MCP server health check on session start
- OAuth token refresh fails in non-interactive/headless mode
- [BUG] Step-up authorization not working for scope elevation in MCP TypeScript SDK
- [BUG] OAuth login fails with "Failed to start OAuth callback server: Failed to start server. Is port 0 in use?
- [BUG] API ERROR 401 after login on Ubuntu
- Deel MCP OAuth fails: redirect_uris must use HTTPS protocol
- [FEATURE] Save user input to clipboard when permission prompt steals focus
- [BUG] Claude Code can't find refresh_token in connecting with MCP Server using OAuth
- [Bug] Claude Code freezes with token consumption but no task progress
- I am getting this API error more frequently it seems over...
- [Bug] Terminal UI Flickering and Inconsistent Code Generation Behavior
- OAuth Token Refresh Failure During Active Session
- macOS: Claude Code accumulates a new Keychain credential entry per login (110 in 5 weeks) and fails to reuse them, causing repeated forced re-auth
- [BUG] Cross-session message written to target transcript but excluded from model's context
- HTTP MCP: valid token treated as expired — "OAuth session expired and could not be refreshed" when provider issues no refresh token (mcp.facebook.com/ads)
- [BUG] Claude Code unexpectedly clears OAuth tokens and requires full re-authentication before refreshTokenExpiresAt
- [BUG] 2.1.218 (native build): OAuth MCP servers report "requires authentication" in --print/headless sessions despite valid keychain tokens (regression from 2.1.210)
- [BUG] Multiple concurrent local sessions race on OAuth refresh-token rotation → near-daily forced /login
- [BUG] Successful auto-retry after api_error orphans the assistant turn: stop_hook_summary + next user message get parented to the api_error node instead of the recovered reply
- Remote OAuth MCP server shows "✔ Connected" but registers 0 tools in-session (Linear / mcp.linear.app)
- [BUG] /login → Third-party → Claude Platform for AWS re-auth loops back to the top-level login menu; underlying 401 retries ~10× before surfacing
- [Bug] HTTP/SSE MCP OAuth client doesn't persist refresh_token for offline_access
- Re-authentication required after every clean restart due to auto-update wiping credentials
- [BUG] VS Code extension requires re-authentication every ~8 hours — OAuth token refresh blocked by Cloudflare
- [DOCS] Errors reference omits the "Your organization has disabled API key authentication" message and v2.1.169 guidance about which credential source to check
- [BUG] MCP OAuth: token exchange silently fails for Robinhood MCP servers -- empty accessToken persisted, empty error from complete_authentication (manual exchange with identical params succeeds)
- Stale OAuth refresh token causes persistent 401 "Invalid authentication credentials" that `/login` does not recover from (manual deletion of ~/.claude/.credentials.json required)
- Notion MCP token invalidated after context compaction, requires re-authorization every session
- claude.ai connector via mcp-proxy.anthropic.com rejected with mcp_unauthorized_after_token_refresh while claude.ai backend uses the same grant successfully (OAuth 2.1 refresh rotation race)
- [Feature Request] Add timestamp display for conversation interactions
- 3P Bedrock SSO: credentials silently expire without triggering re-auth on day 2+
- CLI auto-logout after ~8h idle: expired access token not silently refreshed via refresh token
- [FEATURE] Inline option selection with feedback in Plan Mode
- [FEATURE] Persist MCP OAuth client registrations and refresh tokens across CLI launches
- Auth credentials not reused between sessions after 2.1.139 auto-update (Max subscription, macOS)
- [Bug] Keychain race condition causes DELETE of canonical credentials entry on concurrent token refresh with stale tokens
- Multiple CLI sessions race on ~/.claude/.credentials.json token refresh
- [BUG] claudeCode.disableLoginPrompt: true silently stops working after async CLI auth check resolves with loggedIn: false
- [BUG]
- MCP: OAuth authorize requests intermittently corrupted
- /mcp dialog hangs for several seconds when an HTTP MCP server has stale OAuth tokens but reports "Connected"
- Custom MCP connector wedges silently after MCP server restart (requires full remove+re-add to recover)
- [Bug] MCP OAuth refresh fails with static clientId—not persisted to credentials
- [Slack MCP] Hardcoded OAuth callback port 3118 prevents authentication when multiple Claude Code sessions run in parallel
- [BUG] [Windows] Claude Code CLI hangs & VSCode extension errors "Query closed before response received" across all versions 2.1.98 / 2.1.112 / 2.1.114 since 2026-04-18
- macOS keychain credentials not reused after auto-update — forces re-login on every version bump
- Remote HTTP MCP (Slack): cohort with tengu_mcp_retry_failed_remote=false forces frequent re-OAuth despite valid refresh tokens
- Multiple concurrent CLI sessions cause auth failure on token refresh (race condition)
- MAX 5x subscriber stuck at 200K context window instead of 1M
- [BUG] Vercel and Notion MCP server re-auth persistently failing
- OAuth token auto-refresh broken in long-running --channels sessions
- Title: CLI login flow is unreliable — takes multiple attempts, inconsistent behavior
- MCP OAuth re-authentication required every few hours (Notion, Atlassian) on Windows
- [BUG] OAuth token refresh race condition when running multiple Claude Code agents in parallel
- OAuth token race condition causes session logouts when running multiple concurrent sessions
- [DOCS] MCP OAuth docs omit step-up re-authorization for `403 insufficient_scope`
- [Bug] Subagent token inheritance not working correctly
- OAuth token not refreshed/persisted to macOS Keychain, requiring re-login every session
- OAuth session silently invalidated: client_data returns empty, repeated /login prompts
- OAuth token refresh race condition kills parent session during parallel agent spawns
- [BUG] Log in via OAuth is far too frail
- Desktop app injects empty ANTHROPIC_API_KEY, bypasses Max plan subscription — context stuck at 200K
- [BUG] Claude Code CLI/VS Code — repeated connection timeouts followed by OAuth token expiry, forces re-login every few minutes
- Remote control bridge should auto-refresh OAuth token before expiry
- [BUG] --brief mode silently swallows authentication errors (401), showing no output
- [Bug] claude auth login does not complete on headless servers (SSH)
- [Feature Request] Add internationalization (i18n) support for CLI interface
- [Bug] MCP OAuth tokens for Google Workspace accounts require re-authorization every session