claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[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 justjustinma opened this issue 4 months ago • 60 comments

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.

justjustinma avatar Aug 16 '25 03:08 justjustinma

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

github-actions[bot] avatar Aug 16 '25 03:08 github-actions[bot]

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! 😔

stopar avatar Aug 16 '25 06:08 stopar

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

Gerrit740 avatar Aug 16 '25 06:08 Gerrit740

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!

stopar avatar Aug 16 '25 06:08 stopar

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

noelmateng avatar Aug 16 '25 07:08 noelmateng

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

FrostbiteBear avatar Aug 16 '25 08:08 FrostbiteBear

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

FrostbiteBear avatar Aug 16 '25 08:08 FrostbiteBear

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

mohammad0720 avatar Aug 16 '25 08:08 mohammad0720

@mohammad0720 please try the above fix

FrostbiteBear avatar Aug 16 '25 08:08 FrostbiteBear

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: @.***>

Gerrit740 avatar Aug 16 '25 08:08 Gerrit740

Downgrading to 1.0.73 worked for me.

noelmateng avatar Aug 16 '25 08:08 noelmateng

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

ninthspace avatar Aug 16 '25 09:08 ninthspace

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

worked for me thx!

Heavy02011 avatar Aug 16 '25 09:08 Heavy02011

Worked for me on 2018 mac mini

roblevintennis avatar Aug 16 '25 10:08 roblevintennis

downgrading worked for me: npm install -g @anthropic-ai/[email protected]

wukimidaire avatar Aug 16 '25 14:08 wukimidaire

Exit also worked on windows

sijonelis avatar Aug 16 '25 15:08 sijonelis

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

LOL, works for me, thanks 😅!

jloguercio avatar Aug 16 '25 15:08 jloguercio

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!

trungkien2003ntk avatar Aug 16 '25 15:08 trungkien2003ntk

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

yeongchani avatar Aug 16 '25 15:08 yeongchani

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

LOL, works for me, thanks 😅!

Yep seems to work for me too

iddogino avatar Aug 16 '25 15:08 iddogino

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

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.

justjustinma avatar Aug 16 '25 20:08 justjustinma

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

worked for me thx! (win11)

marcoschipango avatar Aug 16 '25 20:08 marcoschipango

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

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

ysflghou avatar Aug 16 '25 23:08 ysflghou

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

Thank you, only this works well.

ShcherbakovMikhailAH avatar Aug 17 '25 05:08 ShcherbakovMikhailAH

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

worked for me, thx

leo-zz-shuu avatar Aug 17 '25 14:08 leo-zz-shuu

/exit worked for me

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

CatalanCabbage avatar Aug 17 '25 17:08 CatalanCabbage

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.

swoopsus avatar Aug 17 '25 17:08 swoopsus

/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

noelmateng avatar Aug 17 '25 17:08 noelmateng

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

swoopsus avatar Aug 17 '25 18:08 swoopsus

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.

swoopsus avatar Aug 17 '25 19:08 swoopsus