[BUG] In the middle of running I get `⎿ API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."}}`

Open 💬 64 comments Opened Aug 16, 2025 by justjustinma
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

In the middle of running I get:


⎿ API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."}}

I tried the solution below already:

/logout and log back in.

_Originally posted by @adagradschool in #3624_

I logged out and login again, then tried to resume the conversation, but I still encountered the same error.

View original on GitHub ↗

64 Comments

github-actions[bot] · 11 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/2542
  2. https://github.com/anthropics/claude-code/issues/4138
  3. https://github.com/anthropics/claude-code/issues/2633

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

stopar · 11 months ago

I have the same issue but unlike you I am trying to use Claude Code for the first time via my Claude Pro subscription and meet with this issue. Not the best first impression! 😔

Gerrit740 · 11 months ago

I am experiencing the same issue, API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."}}

stopar · 11 months ago
Found 3 possible duplicate issues: 1. Authentication Failure: OAuth Not Supported for Claude CLI #2542

This first suggestion worked for me. Basically rm -rf ~/.claude and rm ~/.claude.json, then reopen my terminal and followed again claude instruction for Pro Subscription and after that it worked!

noelmateng · 11 months ago

Tried all these steps but doesn't work.
Just got the subscription. I just want it to work

FrostbiteBear · 11 months ago

Same issue
API Error: 401
{"type":"error","error":{"type":"authentication_error","message":"OAuth
authentication is currently not supported."}}

FrostbiteBear · 11 months ago

I seem to have found a fix, for Ubuntu and macOS

  1. /login
Complete those steps to get the API Error: 401
  1. /exit (quit)
  2. claude
  3. Type any prompt and the 401 error goes away
mohammad0720 · 11 months ago

API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently
not supported."}}

FrostbiteBear · 11 months ago

@mohammad0720 please try the above fix

Gerrit740 · 11 months ago

Restart your PC

Regards

Gerrit Van Wyk

On Sat, 16 Aug 2025, 10:23 am mohammad0720, @.***>
wrote:

mohammad0720 left a comment (anthropics/claude-code#5893) <https://github.com/anthropics/claude-code/issues/5893#issuecomment-3193494349> API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."}} — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/5893#issuecomment-3193494349>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BT3F6BQAZ5QC6XHLKOMYZDL3N3S67AVCNFSM6AAAAACEA4Z46KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOJTGQ4TIMZUHE> . You are receiving this because you commented.Message ID: @.***>
noelmateng · 11 months ago

Downgrading to 1.0.73 worked for me.

ninthspace · 11 months ago

Re-installing with npm install -g @anthropic-ai/claude-code worked for me.

Heavy02011 · 11 months ago
I seem to have found a fix, for Ubuntu and macOS 1. /login > Complete those steps to get the API Error: 401 2. /exit (quit) 3. claude 4. Type any prompt and the 401 error goes away

worked for me thx!

roblevintennis · 11 months ago

Worked for me on 2018 mac mini

wukimidaire · 11 months ago

downgrading worked for me: npm install -g @anthropic-ai/claude-code@1.0.73

sijonelis · 11 months ago

Exit also worked on windows

jloguercio · 11 months ago
I seem to have found a fix, for Ubuntu and macOS 1. /login > Complete those steps to get the API Error: 401 2. /exit (quit) 3. claude 4. Type any prompt and the 401 error goes away

LOL, works for me, thanks 😅!

trungkien2003ntk · 11 months ago

So overall, after logged in successfully using ``/login`, just exit claude code using `/exit`, then use `claude`` to have it back on again and you're ready to go!

yeongchani · 11 months ago

최신버전 깔았는데 왜 이럼 이거? 내 110달러 시발련들아

iddogino · 11 months ago
> I seem to have found a fix, for Ubuntu and macOS > > 1. /login > > > Complete those steps to get the API Error: 401 > > > > 2. /exit (quit) > 3. claude > 4. Type any prompt and the 401 error goes away LOL, works for me, thanks 😅!

Yep seems to work for me too

justjustinma · 11 months ago
I seem to have found a fix, for Ubuntu and macOS 1. /login > Complete those steps to get the API Error: 401 2. /exit (quit) 3. claude 4. Type any prompt 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.

---

● Claude Opus limit reached, now using Sonnet 4
  ⎿  API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."}}

Expected behavior
After the Opus limit message, the conversation should continue automatically on Sonnet 4 without interruption (this is how it behaved previously).

Actual behavior
Conversation halts with the 401 authentication error shown above.

---

Using the workaround means that I have to do /exit, claude, and /resume in the middle of every conversation where the model switches, which was something I didn't have to do before. This is mildly infuriating to have tasks interrupted all the time like this.

Request
Keeping this issue open. The workaround restores functionality but does not address the root cause.

marcoschipango · 11 months ago
> I seem to have found a fix, for Ubuntu and macOS > > 1. /login > > > Complete those steps to get the API Error: 401 > > > > 2. /exit (quit) > 3. claude > 4. Type any prompt and the 401 error goes away worked for me thx! (win11)
ysflghou · 11 months ago
I seem to have found a fix, for Ubuntu and macOS 1. /login > Complete those steps to get the API Error: 401 2. /exit (quit) 3. claude 4. Type any prompt and the 401 error goes away

That worked for me under Windows as well, thank you!

ShcherbakovMikhailAH · 11 months ago
Re-installing with npm install -g @anthropic-ai/claude-code worked for me.

Thank you, only this works well.

leo-zz-shuu · 11 months ago
I seem to have found a fix, for Ubuntu and macOS 1. /login > Complete those steps to get the API Error: 401 2. /exit (quit) 3. claude 4. Type any prompt and the 401 error goes away

worked for me, thx

CatalanCabbage · 11 months ago

/exit worked for me

I was all pumped up after getting the subscription just to get slapped with this error smh

swoopsus · 11 months ago

That worked a few times. But then stopped working. I get this error now on multiple pro accounts, multiple devices, all fully paid pro accounts.

noelmateng · 11 months ago
/exit worked for me I was all pumped up after getting the subscription just to get slapped with this error smh

Exactly my thought. I downgraded to 1.0.73 and its working well. Didn't face this issue since yesterday. Already used over 12 hours

swoopsus · 11 months ago

Wow, thankyou! That actually worked. SO there is a ... bug ahem

swoopsus · 11 months ago

CONFIRMED: This is a bug introduced in 1.0.82 and remains in 1.0.83. 1.0.81 is fine and does not have the bug.

Shashikant86 · 11 months ago

After resisting for months, finally I got subscription and after hours of coding.. I got hit by this issue. No the best onboarding

DarkTraveler · 11 months ago

I also had to downgrade to version 81 npm install -g @anthropic-ai/claude-code@1.0.81

KrzysztofZabolotny · 11 months ago

Not a fix, but a patch.
/login
after successful login, close terminal session
open again
works

aryan877 · 11 months ago

login twice, it worked

EricPsy · 11 months ago
I seem to have found a fix, for Ubuntu and macOS 1. /login > Complete those steps to get the API Error: 401 2. /exit (quit) 3. claude 4. Type any prompt and the 401 error goes away

thanks! this worked for me

swoopsus · 11 months ago

Temporary. Multiple people have walked this path, and that fix does not hold.

Its a curiously consistent sort of bug, that escalates on a fixed set of rules, each time making harder to keep working after you hit the rate limit:

  • Hit rate limit: Logout and back in fixes it. Twice.
  • Third time? That stops working no matter what you do.
  • After that, you have to downgrade to 1.0.81 to get back to work.
  • GREAT, that works a few times, BUT,
  • THEN it starts ignoring your no auto update rule, and updates you to the latest versions (82, 83, and now 84), with the BUG
  • NOW you have to downgrade every time you hit the limit.

Curiouser and curiouser...all that escalation in 5 days.

Arizaroo · 11 months ago

Im receiving this error in all Claude Code Sessions, I tried downgrading but it persists (I also have a Max Plan) :

API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not
supported."},"request_id":"req_011CSHa1FurUZv2Lu8mxQdXf"}

Environment Info

Platform: darwin
Terminal: Apple_Terminal
Version: 1.0.83
Feedback ID: 1433c0af-44fb-4a46-8ef0-92f9d3ce2580
Errors

[{"error":"Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."},"request_id":"req_011CSHa1FurUZv2Lu8mxQdXf"}\n at new tW (unknown:1:28)\n at new wY (/$bunfs/root/claude:794:1964)\n at new RW0 (unknown:1:28)\n at generate (/$bunfs/root/claude:794:2456)\n at makeRequest (/$bunfs/root/claude:811:5330)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-08-19T18:49:45.007Z"}]

Matthew-Herman1 · 11 months ago

Running in WSL2 Ubuntu

This didn't work for me

Just removing the .claude/ directory in your current project seems to work. I've faced this issue several times, that has solved it each time. Unsure why though.

This worked
/login
/exit (quit)
claude

peterwillcn · 11 months ago

any news

Arizaroo · 11 months ago

The other thing I tried that worked, was to log into Claude code using your anthropic account, close the terminal window without logging out, then reopening it and it started working without issues using the latest version not needing to downgrade.

noelmateng · 11 months ago

Looks like we are getting into superstitions territory here 🙈

bentheye · 11 months ago

You just need to open terminal, auth, close/terminate, re-open

Arizaroo · 11 months ago
Looks like we are getting into superstitions territory here 🙈

hahaha it actually worked, and the Issue has not appeared again

sanjaya-sena · 11 months ago

cp -r ~/.claude ~/.claude_bak
cp ~/.claude.json ~/.claude.json_bak

Worked for me. I didn't want to lose my sub agents :)

ObiWahn · 11 months ago

npm install --prefix ~/claude-installation -g @anthropic-ai/claude-code@1.0.84 worked for me. I could not log into version 85 at all.

amitsadhu · 10 months ago

Faced the same issue after the login and authentication session. However, exiting and running Claude Code again, solved the issue for me.
TLDR - Type 'exit' in Claude CLI and then run 'claude' in your terminal again.

Seithx · 10 months ago

Exit thing works...

ymw0331 · 10 months ago

I solved it by starting a new terminal session, which works too.

ahmadswalih · 10 months ago
> Found 3 possible duplicate issues: > > 1. Authentication Failure: OAuth Not Supported for Claude CLI #2542 This first suggestion worked for me. Basically rm -rf ~/.claude and rm ~/.claude.json, then reopen my terminal and followed again claude instruction for Pro Subscription and after that it worked!

worked for me . first log out from the account , then log In , then close the existing terminal and start it again.

ant-kurt collaborator · 10 months ago

This should be working better in 1.0.88, which just released. If folks can confirm they're no longer running into this, I'll go ahead and close this issue out tomorrow.

Impacted versions are 1.0.82-1.0.87, affecting both main loop execution and sub-agents.

For folks unable to upgrade, downgrading to 1.0.81 (npm install -g @anthropic-ai/claude-code@1.0.81 or the appropriate native installer command) and setting env var DISABLE_AUTOUPDATER=1 will also mitigate.

florath · 10 months ago

I can confirm that the problem "OAuth authentication is currently not supported" disappeared for me in version 1.0.88.

Arizaroo · 10 months ago
This should be working better in 1.0.88, which just released. If folks can confirm they're no longer running into this, I'll go ahead and close this issue out tomorrow. Impacted versions are 1.0.82-1.0.87, affecting both main loop execution and sub-agents. For folks unable to upgrade, downgrading to 1.0.81 (npm install -g @anthropic-ai/claude-code@1.0.81 or the appropriate native installer command) and setting env var DISABLE_AUTOUPDATER=1 will also mitigate.

I updated to 1.0.88 and the issue kept appearing! so annoying

noeljackson · 9 months ago

still a problem for me.

ibtisamdev · 7 months ago
I seem to have found a fix, for Ubuntu and macOS 1. /login > Complete those steps to get the API Error: 401 2. /exit (quit) 3. claude 4. Type any prompt and the 401 error goes away

This worked for me, Thanks.

brianmjohnson · 7 months ago

Still an issue in "Claude 1.0.1405 (2d4b4f) 2025-12-01T17:31:02.000Z"

I logged out and relogged in on the claude desktop app (with claude code now integrated) which didn't help. I can access in the chat side, but the claude code sessions consistently report the error.

This is a well-known, ongoing issue with Claude Code's OAuth implementation. Based on the GitHub issues, here's what I'm seeing: The Problem: OAuth tokens expire during long-running tasks, causing 401 authentication_error failures that require manual / GitHublogin intervention. The exact expiration timing is unpredictable (reports range from 2-4 hours). The issue requesters note that OAuth has a standard solution for this—refresh tokens—but Claude Code doesn't seem to handle token refresh automatically. GitHub Why logout/login isn't fixing it: Several users report the same experience you're having. One user noted: "I logged out and login again, then tried to resume the conversation, but I still encountered the same error." github Potential workarounds to try: Clear the stored credentials completely (not just logout): On macOS: Delete the credential from Keychain Access (search for "claude" or "anthropic") Then run /login fresh Check for multiple Claude Code instances - if you have Claude Code running elsewhere (terminal, VS Code, etc.), they may be fighting over the same token Use an API key instead of OAuth - If you have an Anthropic API key, you can set it via environment variable (ANTHROPIC_API_KEY) which bypasses OAuth entirely Restart the Desktop app completely after clearing credentials The core issue (OAuth tokens expire and Claude Code lacks proper refresh token handling GitHub) appears to still be unresolved in the codebase. Issue #12447 from just a week ago is specifically requesting proper refresh token implementation.

Note that the switch to an API key changes your billing from the subscription to token based pricing!

mohammed-saalim · 6 months ago

same issue with claude desktop, when u use the code chat, the oauth token expires in like 12 hours, and everytime i have to open new chat, for every 12 hours. Its so irritating.

mann1x · 6 months ago

this should be really fixed, /login does not work in claude for desktop and issuing a /login via terminal is completely messing up the current session

adenaufal · 6 months ago

happen just today. maybe it's because of expiring token. tried accessing thru CLI and it works again

duffner · 6 months ago

On Claude Desktop on Mac, I ran "Help -> Troubleshooting -> Clear Cache and Restart", after doing so the issue was fixed. Not sure if this helps anyone else, but thought I'd share.

jaaaamIron · 5 months ago

Still an issue for me - tried all these fixes

viniciustrindade · 4 months ago

For me, it works when I use the native terminal. When I use Electron applications Auto-Claude or third terminal like Warp, it gives me those exceptions. Maybe it's a problem with Non native terminal In MacOS.

Pichardescu · 4 months ago

Still an Issie

amebahead · 4 months ago

I haved same issue, I solved it.

Step 1.
rm -rf ~/.claude

Step 2
rm ~/.claude.json

Step 3
Clear Browser cache (ex. chrome, ie..)

Step 4
Open Terminal and Try Claude ReLogin

marcusbonfim · 2 months ago

Still an issue on Claude Desktop v1.5354.0 (macOS)

Environment:

  • macOS 15.4 (Darwin 25.4.0)
  • Claude desktop app: v1.5354.0
  • Claude Code CLI: v2.1.123
  • Auth method: claude.ai (OAuth), enterprise org
  • Auth status confirmed working: claude auth status returns authenticated

Symptom:
Sending any message in the desktop app UI results in infinite loading with:

Failed to authenticate. API Error: 401
{"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."},"request_id":"req_011CaY23iTfobpZHRYj97qCH"}

What works:

  • Claude Code CLI (terminal) ✅
  • Claude Code VS Code extension ✅
  • claude.ai in Chrome/Safari ✅

Fixes attempted (none worked):

  • Logout/login in the app
  • Help → Troubleshooting → Clear Cache and Restart
  • Cleared Cache, Code Cache, GPUCache manually
  • Cleared Session Storage and Local State
  • Deleted ~/.claude.json and re-authenticated
  • Cleared stale claude-code-sessions from ~/Library/Application Support/Claude/claude-code-sessions/
  • Reinstalled app via Homebrew cask

Started after automatic update to v1.5354.0 on 2026-04-29.