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.

  1. Confirm which authentication method and organization Claude Code is using.
  2. Re-authenticate once and remove only the credential proven to be stale.
  3. 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.

0 18 35 53 70 2025-042025-092026-032026-08
2025-04 — First reports2026-06 — Most new reports (63)2026-07 — Peak backlog (70 open)

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:

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.

Related aggregations

  1. API Error 400 (invalid_request_error)

    2,591 issues
  2. API Error 500 (internal server error)

    603 issues
  3. API Error 429 (rate_limit_error)

    690 issues
  4. API Error 529 (overloaded_error)

    254 issues
  5. API Error 403 (permission_error)

    235 issues
  6. API Error 413 (request_too_large)

    38 issues