[BUG] OAuth error: timeout of 15000ms exceeded can not login it keeps timout even though I tried token too

Open 💬 22 comments Opened Mar 11, 2026 by caelum0x

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

It does not login API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or
refresh your existing token."},"request_id":"req_011CYwTjasSQ6xFJ18bMBYyB"} · Please run /login

What Should Happen?

It should login but it keeps timing out

Error Messages/Logs

OAuth error: timeout of 15000ms exceeded

Steps to Reproduce

OAuth error: timeout of 15000ms exceeded

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.72

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

22 Comments

jpbroeders · 4 months ago

I got the same issue

jujumilk3 · 4 months ago

Same here

Oliver0804 · 4 months ago

Same here

tom-arnaud · 4 months ago

Same here

Hydrozyk · 4 months ago

Same problem OAuth error: timeout of 15000ms exceeded

github-actions[bot] · 4 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/33213
  2. https://github.com/anthropics/claude-code/issues/19078
  3. https://github.com/anthropics/claude-code/issues/30237

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

jpbroeders · 4 months ago

I see this also in my console when I'm on the Authentication Code Copy screen.
Maybe it has something to do with the issue!?

Framing 'https://a.claude.ai/' violates the following Content Security Policy directive: "frame-ancestors https://claude.ai https://.claude.ai https://anthropic.com https://.anthropic.com https://.ant.dev". The request has been blocked.

elliottower · 4 months ago

Same issue on macOS today. OAuth flow is very slow; CLI fails with:
OAuth error: timeout of 15000ms exceeded

Environment:

  • Claude Code 2.1.72 (native install)
  • macOS (iTerm2)
  • Account: Claude Max

Notes:

  • Initially DNS couldn’t resolve claude.ai / api.anthropic.com; after setting DNS to 1.1.1.1

and flushing, resolution works.

  • Browser auth page still loads very slowly; CLI times out before callback completes.
  • curl -I https://claude.ai returns Cloudflare challenge (403), which suggests WAF/latency in

auth path.

Repro:
1) claude
2) /login
3) Browser opens, slow load
4) After ~15s CLI errors

Edit: update: the auth page now says This isn't working right now. You can try again later.

theredsix · 4 months ago

same issue

ToInfinityForever · 4 months ago

CAN WE NOT HAVE THE DAMNED TOKEN TIMED OUT EVERY FEW HOURS? IS IT REALLY NECESSARY TO DO THIS AND FORCE US TO LOGIN MULTIPLE TIMES A DAY?

renavides · 4 months ago

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 was able to switch back and use the latest version (2.1.72) without any problems."

Coooky87 · 4 months ago

This worked for me, sharing as there is multiple issues open what seem like the same issue

Workaround: Increase OAuth timeout on Windows

The hardcoded 15000ms (15s) OAuth timeout in cli.js isn't long enough when auth.anthropic.com is slow to resolve. Bumping it to 45000ms (45s) fixed login for me.

Git Bash

CLI=$(find "$(cygpath "$(npm root -g)")/@anthropic-ai/claude-code" -name 'cli.js' 2>/dev/null | head -1)
echo "Patching: $CLI"
sed -i 's/timeout:15000/timeout:45000/g' "$CLI"
sed -i 's/AbortSignal.timeout(15000)/AbortSignal.timeout(45000)/g' "$CLI"

PowerShell

$CLI = Get-ChildItem -Path "$(npm root -g)\@anthropic-ai\claude-code" -Filter "cli.js" -Recurse | Select-Object -First 1
Write-Host "Patching: $($CLI.FullName)"
(Get-Content $CLI.FullName -Raw) -replace 'timeout:15000','timeout:45000' -replace 'AbortSignal\.timeout\(15000\)','AbortSignal.timeout(45000)' | Set-Content $CLI.FullName -NoNewline

Then run claude login again.

Notes

  • Tested on Windows 11, Claude Code v2.1.72
  • Re-apply after any npm update of claude-code
  • Adjust 45000 higher if needed (e.g. 60000 for 60s)
larssn · 4 months ago
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 was able to switch back and use the latest version (2.1.72) without any problems."

Thanks for the tip - I managed to log in with 2.1.71

juanclaudiopardo · 4 months ago

same issue today!!

mtlsn · 4 months ago

same on Mac, claude 2.1.76 via homebrew

NajibNawneet · 4 months ago

Same just now

chloe-obermeyer · 4 months ago

Adding a data point here: I'm based in SAST (UTC+2) and have noticed a consistent pattern where Claude Code sessions are stable throughout my morning, but begin experiencing 401/502 errors reliably in my early-to-mid afternoon — which maps directly to US East Coast morning hours and the broader American peak traffic window.

This pattern predates my current session and appears to have intensified noticeably since the rollout of the extended context window and the Sonnet 4.6 release. My suspicion is that the combination of increased user adoption and heavier per-session compute load (particularly from Claude Code with large context) is creating infrastructure strain during peak hours that manifests as auth token invalidation and upstream gateway failures.

Worth noting: /login as a recovery path is problematic for those of us mid-session, as it frequently causes terminal crashes rather than clean re-authentication.

Happy to provide session logs or timing data if useful for diagnosing the load correlation.

NajibNawneet · 4 months ago
Adding a data point here: I'm based in SAST (UTC+2) and have noticed a consistent pattern where Claude Code sessions are stable throughout my morning, but begin experiencing 401/502 errors reliably in my early-to-mid afternoon — which maps directly to US East Coast morning hours and the broader American peak traffic window. This pattern predates my current session and appears to have intensified noticeably since the rollout of the extended context window and the Sonnet 4.6 release. My suspicion is that the combination of increased user adoption and heavier per-session compute load (particularly from Claude Code with large context) is creating infrastructure strain during peak hours that manifests as auth token invalidation and upstream gateway failures. Worth noting: /login as a recovery path is problematic for those of us mid-session, as it frequently causes terminal crashes rather than clean re-authentication. Happy to provide session logs or timing data if useful for diagnosing the load correlation.

it worked for me after wiping the stored auth and relogin rm -rf ~/.claude
claude auth login

Seif-Sallam · 4 months ago

Using claude auth login in the terminal worked. Tried this on Mac OS Claude version 2.1.77 (Claude Code).

lastboy · 3 months ago
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 was able to switch back and use the latest version (2.1.72) without any problems."

Thank you @renavides
I also managed to log-in after changing the version like so,

Install an older version:
```bash
npm install -g @anthropic-ai/claude-code@2.1.50
claude --version

claude auth login (clear the browser cahce, hard refresh)


After the log-in succedded 
Upgrade back to latest
```bash
   npm install -g @anthropic-ai/claude-code@latest
   claude --version
   claude
Evan-zkLinkLabs · 3 months ago

same issue

pasquale95 · 3 months ago

Getting the same error. It's not the first time we get such issue. It's a bit odd paying for a service which is unavailable a lot of times...