API Error 401 (authentication_error)
The API rejected the credential attached to the request.
441 issues · 48 open · 393 resolved (89%) · first seen Apr 7, 2025
First response · account
What to do now
Most likely: The credential is missing, expired or belongs to a different account context.
- Confirm which authentication method and organization Claude Code is using.
- Re-authenticate once and remove only the credential proven to be stale.
- If a gateway is involved, verify that it forwards the expected authorization header.
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. 114 new reports in the last 90 days vs 131 in the 90 before — -13%. The open backlog peaked at 70 in 2026-07 and sits at 48 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
223 of these reports name the Claude Code build they were running, spanning 102 releases. Heaviest reporters:
- Claude Code v2.1.165
- Claude Code v2.1.92
- Claude Code v2.1.177
- Claude Code v2.1.185
- Claude Code v2.1.150
- Claude Code v2.1.121
- Claude Code v2.1.87
- Claude Code v2.1.72
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 5 days across 393 closures. Of the 393 closures with a recorded reason, 19% were closed as completed and 317 as not-planned or duplicate. The most recent completed fix landed in 2026-08.
Workarounds reported by the community
80 of these issues post a workaround someone says worked. The highest-engagement ones:
- [BUG] In the middle of running I get `⎿ API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."}}`
- …rompt and the 401 error goes away Thank you so much for the workaround! However, I am on the lower Max Plan and it was not like this before. --- Expected behavior After the Opus limit message, the conversation should con…
Found in the thread of #5893 · still open - [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 - [Bug] OAuth token expiration causing repeated 401 authentication errors during active sessions
- …igned certificate in certificate chain ), and I was able to work around it by running: and then executing . For reference.
Found in the thread of #18225 · still open - OAuth Authentication Not Supported for Highest Plan Tier
- …out/closing terminal, and logging back in is indeed only a temporary fix (tested on both Mac + PC/Windows). I also downgraded to 1.0.81 and so far no issues.
Found in the thread of #5956 · resolved
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 1–100
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 441 matches; the statistics above cover all 441.
- API Error: 401 {"type":"error","error":{"type":"authenticati...
- [BUG] In the middle of running I get `⎿ API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."}}`
- [BUG] OAuth token expiration disrupts autonomous workflows – refresh token handling needed
- [BUG] OAuth error: timeout of 15000ms exceeded can not login it keeps timout even though I tried token too
- API Error: 401 {"type":"error","error":{"type":"authenticati...
- While using it, API 401 errors appear. Even after I log out and log in, the same errors pop up.
- [BUG] Auth Flow Broken (Windows)
- [BUG] CLAUDE OAUTH IS DOWN - FIX PLZ
- [Bug] OAuth token expiration causing repeated 401 authentication errors during active sessions
- OAuth Authentication Not Supported for Highest Plan Tier
- I keep getting 401 errors about Oauth authentication after...
- [BUG] Claude Code Won't Authenticate
- [BUG] OAuth credentials shared across CLAUDE_CONFIG_DIR profiles causing data isolation failure (compliance risk)
- [BUG] API Error: 401 Invalid authentication credentials
- API Error: 401 {"type":"error","error":{"type":"authenticati...
- Claude Code responding with 401 across multiple machines even though login flow (Max plan), desktop, web apps work.
- [BUG] Can't authenticate on individual account - OAuth error
- [BUG] CLAUDE OAUTH IS DOWN
- API Error: 401 {"type":"error","error":{"type":"authenticati...
- [BUG] OAuth Authorize button returns 500 Internal Server Error — cannot login to Claude Code in VSCode
- [BUG] OAuth callback server hangs after authorization - setup-token and /login both fail
- i keep having this error when i ran Claude code today.\
- Fix: Claude Code 403 "Request not allowed" on macOS with Proxy/VPN (China & Region-restricted Areas)
- [Bug] OAuth callback timeout causes "Failed to fetch user roles" error
- OAuth token expired immediately after fresh login - cannot use Claude Code (blocking)
- [Bug] Conversation scroll-up shows duplicate content and prompt field gaps
- ⎿ API Error: 401
- [BUG] OAuth refresh returns 400 after early 401 before local expiresAt; concurrent sessions forced to /login
- [BUG] API Error 401 - OAuth error
- [BUG] OAuth timeout loop
- Bug Report
- [BUG] Builtins Subagents use hardcoded model names
- login oauth keeps failing! cant login!
- Claude Code login fails with service unavailability and rate limit errors
- OAuth refresh token not used when credentials are copied to remote/headless machines
- API Error: 401
- [BUG] Server is busy Claude cowork desktop error
- Claude Code MAX — Web Fetch returns 401 API Error: “OAuth authentication is currently not supported.”
- API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid OAuth token. The provided token was not found or is malformed."}}
- [BUG] v2.1.121: CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 + Opus 4.7 causes 401 "OAuth authentication is currently not supported" retry-loop
- Bug: /login Does Not Recover Active Session After OAuth Token Expiration
- [BUG] claude --teleport shows non-helpful error message if OAuth token has expired
- when I start again with working after a night of rest I...
- [BUG] Remote Web session cannot be created using CLAUDE_CODE_OAUTH_TOKEN
- [Bug] Anthropic API Error: 500 Internal Server Error
- I have been asked to log in 6 times since the release of sonnet 4.5
- Here is the error message: API Error: 401...
- [BUG] authentication_error and login failed
- relogin many time but : "API Error: 401...
- [BUG] OAuth access token expires after ~8 hours and refresh token is not used — requires full re-login every day (Windows 11)
- [Bug] Egress proxy blocks GitHub subdomains, breaking git operations in web bash environment
- [BUG] Claude Desktop Code/Cowork mode returns 403 "Request not allowed" while CLI and Chat work fine
- [BUG] WebFetch tool returns 401 OAuth error after successful login
- Login worked, but it’s still returning a 401 error:
- [Bug] Anthropic API Error: Tool Call Parsing Failure
- [BUG] Claude code not conecting in CLI or extension
- [Bug] Plan mode "Write your own text" step blocks submission and progress
- I am seeing API Error: 401 {"type":"error","error":{"type":"...
- 401 error oauth not supported
- API Error: 401 {"type":"error","error":{"type":"authenticati...
- Anthropic API Authentication Failure: OAuth Not Supported
- [Bug] API Error: Rate limit reached on Max Plan subscription
- [Bug] OAuth token expiration requiring frequent re-authentication
- API Error: 401 {"type":"error","error":{"type":"authenticat...
- [BUG] MCP 403 insufficient_scope step-up authorization is dropped and misreported as "token expired"
- OAuth expiration causes retry storm consuming 100% session usage (3.75M wasted tokens)
- API Error: 401 {"type":"error","error":{"type":"authenticati.../su
- The provided token was not found or is malformed
- I am getting a 401 error with the message Invalid OAuth token.
- [BUG] Bug Report: 401 Invalid Bearer Token Immediately After Successful Login
- [BUG] Claude code for VS Code OAuth token expiry not handled gracefully
- [BUG] claude code web sandbox: .NET NuGet Package Restore Fails Due to Proxy Authentication
- [Bug] Anthropic API Error: Duplicate Tool Names in Subagent Configuration
- [BUG] Still not fixed the auth bug? How long?
- Claude Code is using massive amounts of memory and heating up my computer.
- Constant flickering.
- [BUG] Claude code version npm-global (1.0.128), vs code plugin, constantly disconnected and request for re-login
- OAuth token not persisted — Max subscribers forced to /login every session for months
- [BUG] OAuth token expired — `claude login` fails with 401, no browser flow initiated, no recovery path after 34+ hours
- claude code is very slow to take in keyboard input.
- i receved this erro: ⎿ API Error: 401...
- [BUG]Title: claude -p fails with "OAuth session expired and could not be refreshed" while interactive mode works fine
- Login OAuth URL wraps in WebStorm terminal causing "Missing state parameter" error
- org_level_disabled error with active Pro subscription as personal org admin
- claude setup-token outputs OAuth token wrapped across two lines, breaks copy-paste
- [BUG] API Error: 401
- MCP server not receiving environment variables from mcp_settings.json
- [BUG] Setting DISABLE_PROMPT_CACHING Environment Variable Causes 401 Unauthorized Errors
- Unable to login to Claude Code - authentication_error
- [BUG] Remote Control fails at bridge init: /v1/code/sessions intermittently 401s a valid OAuth token (~50-70% of requests, split backend fleet)
- [Bug] Rate Limit: Anthropic API Overloaded (Error 529)
- [BUG] Failed to authenticate. API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid authentication credentials"},"request_id":"xxxxxxxxx"}
- [BUG] OAuth access token not auto-refreshed on startup — forces re-login after every PC restart
- [BUG] Authentication issue with Visual Studio Code Plugin
- Cannot --resume. OAuth authentication errors contaminating session files.
- [BUG] /resume shows different sessions and incorrect data between TUI and VSCode extension
- [BUG] Errore di autenticazione persistente con Claude Code - Token OAuth scaduto
- [BUG] Vertexai - Claude should use updated google credentials files when they change to support reauthentication
- [BUG] macOS sleep/wake causes 401 authentication errors requiring full reboot
- [BUG] OAuth token expires excessively — multiple times per day