Skip to content
InnovateTechie
Troubleshooting

Claude Code OAuth Error: Timeout of 15000ms Exceeded

InnovateTechieBy InnovateTechie10 min read
Share
Claude Code OAuth error timeout of 15000ms exceeded shown in a terminal during login

Part ofWhat Is Claude Code? The Complete Guide

Quick answer

Fix the Claude Code OAuth error 'timeout of 15000ms exceeded.' Why login times out — DNS, the 15s browser step, or an outage — and the fastest ways to sign in.

The Claude Code OAuth error "timeout of 15000ms exceeded" means the sign-in flow didn't finish within 15 seconds — usually because auth.anthropic.com can't be reached, the browser approval step took too long, or Anthropic is having a login outage. The fastest fixes: retry /login and approve quickly, fix your DNS, or authenticate with an API key instead.

Login flow and API-key fallback verified 31 July 2026 against Anthropic's Claude Code setup documentation.

Few things are more frustrating than a coding agent that won't even let you log in. The failure appears right as you run /login or start the CLI: the browser opens, you approve access, and the terminal still fails with OAuth error: timeout of 15000ms exceeded. The good news is that this is almost always a network or timing problem, not a broken install — and it's fixable in a couple of minutes. This guide covers what the error means, why it happens, and exactly how to get signed in. Every step below was run by hand before publishing, so you are not testing our assumptions in production.

Key takeaway

The Claude Code OAuth error "timeout of 15000ms exceeded" means the sign-in callback didn't reach the CLI within its 15-second window — usually a DNS failure resolving auth.anthropic.com, a slow browser approval, or an outage — and setting an ANTHROPIC_API_KEY bypasses the browser flow entirely.

What the Claude Code OAuth error "timeout of 15000ms exceeded" means

The CLI opens your browser, waits for approval, and gives up after 15 seconds. The tell is that the browser usually succeeds while the terminal has already failed — authentication worked, the callback simply arrived too late.

When you sign in, Claude Code opens your browser to auth.anthropic.com, waits for you to approve, and expects the approval to come back within 15 seconds. If that round trip doesn't complete in time, the CLI gives up and prints: OAuth error: timeout of 15000ms exceeded.

The tell-tale symptom is that the browser often succeeds — it shows "You're all set for Claude Code" — while the terminal has already failed. That mismatch is the clue: the authentication itself worked, but the callback to the CLI didn't arrive inside the 15-second window. So the failure is really a timing-and-reachability problem between your browser, Anthropic's auth server, and the local CLI listener.

Why the login times out

Five causes produce one message: DNS that cannot resolve auth.anthropic.com, a browser step slowed by extra logins or 2FA, a VPN or proxy blocking Anthropic traffic, an Anthropic auth incident, or an old build carrying a known bug.

There are a handful of common causes behind it, and knowing which one you're hitting points straight to the fix:

CauseWhat's happening
DNS can't resolve auth.anthropic.comThe CLI never reaches the auth server, so the callback never returns in time
The browser step is too slowYou take longer than 15s to approve (extra logins, 2FA, a slow page)
VPN, proxy, or firewallTraffic to Anthropic is blocked, throttled, or rerouted
Anthropic outageA login/auth incident on Anthropic's side breaks the flow for everyone
Outdated Claude CodeAn old build with a known auth bug

Because several different problems produce the same message, the fixes below are ordered from fastest to most thorough — work down the list until sign-in succeeds.

Claude Code OAuth error timeout of 15000ms exceeded — the common causes from DNS to outages

How to fix the Claude Code OAuth timeout error

Work the list in order: retry and approve fast, switch to a public DNS resolver, disable the VPN or proxy, check the status page, update the CLI, then fall back to an API key. The first two clear most cases.

Work through these fixes in order, stopping as soon as sign-in succeeds:

  1. Retry /login and approve in the browser as fast as you can.
  2. Point your machine at a public DNS resolver (1.1.1.1 or 8.8.8.8).
  3. Disable any VPN, proxy, or firewall blocking *.anthropic.com.
  4. Check the Anthropic status page for an active auth outage.
  5. Fall back to an ANTHROPIC_API_KEY to skip the browser flow entirely.

In our own runs this error rarely survives the first two steps. A fast retry clears it a good share of the time, and switching to a public DNS resolver handles most of what's left; the cases that make it all the way down to the API-key fallback have almost always turned out to be a corporate proxy or a genuine auth incident rather than anything broken on the machine. So if you only have a minute, do the retry and the DNS swap first — they carry the load — and keep the API-key route in your back pocket for the locked-down networks where a browser callback will never round-trip inside 15 seconds.

1. Retry the login and approve quickly

Run the login again and move fast through the browser step:

claude
/login

When the browser opens, approve immediately — don't stop to log into Google or clear a 2FA prompt if you can avoid it. If you're already signed in to Anthropic in that browser, the approval returns almost instantly and beats the 15-second limit. A surprising share of these reports clear up on the second, faster attempt.

2. Fix DNS resolution for auth.anthropic.com

If retrying doesn't help, the most common real cause is DNS. Check that the auth host resolves:

nslookup auth.anthropic.com

If that fails or hangs, switch your machine to a public DNS resolver such as Cloudflare (1.1.1.1) or Google (8.8.8.8), then flush your DNS cache and try /login again. This single step resolves the largest bucket of cases, especially for users on ISPs whose resolvers don't return the Anthropic auth records.

3. Turn off VPN, proxy, or a blocking firewall

A VPN or corporate proxy is the next usual suspect. Temporarily disconnect the VPN, or configure your proxy so traffic to *.anthropic.com is allowed, then retry. On a locked-down network, ask IT to allowlist auth.anthropic.com and api.anthropic.com — a firewall silently dropping that traffic produces the exact 15000ms timeout.

4. Check the Anthropic status page

If your network is fine, the problem may not be yours. Anthropic has had login/auth incidents that break OAuth for everyone at once. Check the Anthropic status page before spending more time — if there's an active auth incident, the fix is simply to wait it out and retry once it's resolved.

5. Update Claude Code

Old builds sometimes carry auth bugs that newer releases fix. Make sure you're current:

claude update

If you're unsure how updates work, our guide on how to update Claude Code covers every install method. An up-to-date CLI rules out any Claude Code OAuth error that's already been patched.

6. Authenticate with an API key instead

If OAuth simply won't cooperate — common on restricted networks or during an outage — skip the browser flow entirely and use an API key. Create a key in the Anthropic Console and set it as an environment variable:

export ANTHROPIC_API_KEY=sk-ant-...

Claude Code will use the key directly, sidestepping the Claude Code OAuth error completely. This is the most reliable workaround when the interactive login keeps timing out; our guide on how to authenticate Claude Code in the terminal walks through key-based setup in detail.

How to fix the Claude Code OAuth error — retry, fix DNS, disable VPN, check status, update, or use an API key

Platform notes: Windows, macOS, and Linux

Same failure, different likely cause. Windows reports dominate, usually the default resolver or security software intercepting HTTPS. macOS and Linux more often trace to a VPN, a stale /etc/hosts entry, or a resolver that will not return the auth host.

The timeout shows up on all three platforms, but the likely cause shifts with each:

  • Windows sees the most login-timeout reports. The usual culprits are the default DNS resolver, corporate security software intercepting HTTPS traffic, or the browser being slow to hand control back to the terminal after approval. Switching DNS (Step 2) and finishing the browser step quickly clears most Windows cases.
  • macOS and Linux more often hit the Claude Code OAuth error because of a VPN, a stale /etc/hosts entry, or a resolver that won't return auth.anthropic.com. Test with nslookup first, then disable the VPN before anything else.

Whatever the platform, the API-key workaround in Step 6 sidesteps the browser flow entirely, so if you're blocked and need to work right now, that's the fastest way past the Claude Code OAuth error. Anthropic documents both login methods — browser OAuth and API key — in the official Claude Code documentation.

Still getting the Claude Code OAuth error?

After all six steps it is almost always one of two things: a network you do not control, or an active outage. The API-key route bypasses both. If the CLI cannot reach Anthropic at all, the problem is broader connectivity.

If you've worked through all six steps and still hit the timeout, it's almost always one of two things: a network you don't fully control (corporate laptop, campus Wi-Fi, certain regions) or an active outage. The API-key route in Step 6 bypasses both. And if the CLI can't reach Anthropic at all — not just for auth — the problem is broader connectivity; see our fix for the can't reach Claude error, and for a related login failure, the Claude OAuth error status 500 guide. For the full command reference while you troubleshoot, keep the Claude Code CLI documentation handy.

Frequently Asked Questions

It means the sign-in flow didn't complete within Claude Code's 15-second limit. The browser opened and you (or the auth server) didn't return the approval to the CLI in time — usually due to DNS failing to resolve auth.anthropic.com, a slow browser step, a VPN/firewall, or an outage.

Because the two happen separately. Your browser finished authenticating, but the callback to the local CLI arrived after the 15-second window had already closed, so Claude Code reported the OAuth error even though the browser side succeeded. Retrying quickly usually beats the timeout.

Retry /login and approve immediately. If it still times out, switch to a public DNS resolver (1.1.1.1 or 8.8.8.8), disable any VPN or proxy, and check the Anthropic status page. As a guaranteed workaround, authenticate with an ANTHROPICAPIKEY instead of the browser flow.

Yes. Set an ANTHROPICAPIKEY environment variable and Claude Code will authenticate with the key directly, skipping the OAuth browser flow entirely. This is the most reliable option on restricted networks or during a login outage.

Usually not — it's almost always a network, DNS, or timing issue on your side, or a temporary Anthropic outage. Occasionally an old build has an auth bug, so running claude update is worth doing, but the DNS and API-key fixes resolve the large majority of cases.

Often, yes. A VPN or corporate proxy can block, throttle, or reroute traffic to auth.anthropic.com, so the login callback never returns inside the 15-second window. Disconnect the VPN and retry, or have your network allowlist auth.anthropic.com and api.anthropic.com. If you must stay on the VPN, use the API-key login instead of the browser flow.
InnovateTechie

Written by

InnovateTechie

Writing about Claude and the Anthropic toolkit — models, Claude Code, pricing, features, and fixes, in clear, practical, hands-on guides tested by daily use.

View all posts →