claude/for
Search
Subscribe
Claude Code

“403 Attention Required! | Cloudflare”: Claude Code fix

Cloudflare blocked one request before it reached Claude, so your login is usually fine. Check status.claude.com, resend, then try another network.

"Please run /login · API Error: 403 Attention Required! | Cloudflare" means Cloudflare, the network that sits in front of Anthropic's API, refused one request before it reached Claude. Your login is usually fine: in most public reports the next message went through without /login, and the biggest wave matched an Anthropic incident, so check status.claude.com and resend before you change anything.

claude-for is an independent guide, not affiliated with Anthropic. Everything below was checked on December 5, 2026 against Claude Code's error reference, its CHANGELOG, the status page history and public GitHub issues. Anthropic does not document this message.

TL;DR. Don't run /login first. Check the status page, then type "continue" or resend your message. If it keeps failing on a green status page, change network and run fewer parallel sessions.

The exact wording, and where it shows

The words "Attention Required!" don't come from Claude Code: the string is absent from the Claude Code 2.1.337 binary, checked December 5, 2026. It is the title of Cloudflare's block page, whose heading reads "Sorry, you have been blocked" in the copies pasted into #35595 and #55521. Claude Code prints that title after "API Error: 403". The forms quoted in GitHub reports:

  • In the terminal: "Please run /login · API Error: 403 Attention Required! | Cloudflare" (#109508, and #109521 on Claude Code 2.1.323).
  • In the Claude desktop app's Code tab, in claude -p and in the Agent SDK: "Failed to authenticate. API Error: 403 Attention Required! | Cloudflare" (#109517, #111337).
  • For a subagent: "Agent terminated early due to an API error: Please run /login · API Error: 403 Attention Required! | Cloudflare" (#109676).
  • Before version 2.1.281 (September 23, 2026): the raw page, starting API Error: 403 <!DOCTYPE html> (#30437, March 2026). That release stopped HTML error pages "printing the page's raw markup", per the CHANGELOG.
  • In a claude.ai connector's tool result: "Streamable HTTP error: Error POSTing to endpoint:" followed by the same page (#35595).

Anthropic's side or your network?

Anthropic's API answers through Cloudflare: checked on December 5, 2026, a plain request to api.anthropic.com came back with the headers server: cloudflare and cf-ray. Anthropic sets the rules. Cloudflare's documentation lists the usual triggers: firewall rules, rate limiting, IP access rules, bot protection and DDoS protection.

Cloudflare's bot score runs from 1 to 99 and "indicates how likely that request came from a bot". A challenge "asks the browser to perform a series of checks", and Claude Code has no browser. Anthropic's thresholds are not public, but the reports fall into two patterns.

Many people at once: Anthropic's side

On November 13, 2026, failures came in two windows, 09:47 to 09:52 UTC and 10:15 to 10:19 UTC, per comments on #109516 and #108761. Reporters were on macOS, Linux and Windows. One was on a residential connection in Taiwan with no VPN or proxy. Anthropic posted an incident at 09:58 UTC, "an issue with users authenticating to Claude.ai and Claude Code", and resolved it at 11:58 UTC.

The first GitHub report, #109508, went up at 09:57 UTC, before the incident note. On machines running many sessions, some failed while others succeeded in the same second, and failed sessions resumed later without /login. A valid login doesn't flip on and off like that: the edge does.

One network, again and again: your side

Single-user reports differ. In #54692 (April 2026), every request from a Spectrum connection in Ohio got a Cloudflare challenge, with no VPN involved. In #30502 (March 2026), opening a second session at the same time triggered it. In #35595, about eight quick Jira writes through a connector got blocked for more than 12 hours, even across a VPN.

The common thread is something Cloudflare can score: an IP range, a burst from one address or, for connectors, a request's content (#61390 blamed shell heredocs in Notion pages). VPN exits and cloud servers share addresses with many strangers, so they likely score worse. That is our inference: Anthropic publishes no list.

If the error instead reads "Request blocked before it reached Anthropic's API (HTTP 403)", Anthropic's edge refused your network itself, and our guide to that message covers it.

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.

Why Claude Code asks you to log in

The "Please run /login" part is misleading. In #109521, a reporter pointed Claude Code 2.1.323 at a local server that answers the way Cloudflare does. The server saw one request, with no retry, and the run ended as "authentication_failed". In #111337, another repeated it on 2.1.329 and found that a JSON 403 gets the same label, so the label follows the status code, not the page.

Version 2.1.317 (November 2, 2026) "Fixed a region or network block (HTTP 403) being shown as a sign-in failure", per the CHANGELOG. Yet the November 13 reports came from 2.1.322 and 2.1.323, and the CHANGELOG through 2.1.337 (December 4) lists nothing newer for this page. This 403 is also missing from the documented automatic retries, so raising CLAUDE_CODE_MAX_RETRIES should not help.

Two side effects hit unattended runs. An active /goal is cleared with "Goal cleared after an unrecoverable error (authentication failed)" (#111337). In #110203, a desktop session quietly answered from a different model for about 44 hours after this error.

How to fix it

Work down the list and stop when your message goes through. None of these steps loses your conversation.

now

Check status.claude.com

An incident naming Claude Code or sign-in means wait. On November 13 the note came about 12 minutes after the first failures.

next

Type continue, or resend the message

Don't run /login yet. In the November reports, the next request usually worked with the same login.

next

Restore what the error cleared

Set /goal again if you used one, and check that /model shows the model you picked.

next

Run fewer sessions at once

Many parallel sessions or subagents send bursts from one address. Pause the extras for a few minutes.

next

Change network

Turn your VPN off, or switch to another exit if you need one. A phone hotspot is the quickest test.

next

Only then run /login

If Claude Code now says you are not logged in, or the error survives a clean network, sign in again.

Test the route with curl

Anthropic's error reference suggests curl -I https://api.anthropic.com as a reachability check. Run curl -I https://api.anthropic.com/v1/messages instead. On December 5, 2026, an open route answered HTTP/2 405 with content-type: application/json. A 403 with content-type: text/html means Cloudflare is blocking your address: copy the cf-ray value for a bug report. A short blip like November 13 can pass this test and still fail your next prompt.

If you route through a gateway

If ANTHROPIC_BASE_URL is set, requests go to that address, so the Cloudflare page may belong to your gateway. Check with echo $ANTHROPIC_BASE_URL, as the error reference suggests, and ask whoever runs the gateway. Anthropic's network configuration page covers corporate proxies.

When to stop and wait

Stop troubleshooting when the status page shows an incident, when two of your machines fail in the same minute, or when a colleague on another network sees it too. Your network is not the cause then. Wait for the resolved note, then type "continue".

If a steady block lasts more than a day on one connection, report it with the UTC time and the cf-ray value, through /bug or a GitHub issue. Claude Code is only offered in supported countries, so a VPN exit abroad brings its own problems.

The honest limits

Anthropic has not explained the November 13 blocks. Its status note never mentions Cloudflare, and beyond closing #109521 as a duplicate of #109508, Anthropic has not answered the reports. Linking the incident to the 403s is our reading of the timestamps.

We don't know which Cloudflare rules Anthropic runs, whether some VPN providers fare worse, or whether a future version will retry this error. We have not triggered the block ourselves: the local reproductions above are their authors' work.

Questions people ask

Do I need to run /login after "403 Attention Required"?

Usually not. The page came from Cloudflare, not from Anthropic's sign-in check, and in the November 13 reports the next request worked with the same login. Resend first. Run /login only if Claude Code then says you are not logged in.

Is Claude down when Claude Code shows a Cloudflare 403?

Sometimes. The biggest wave, on November 13, 2026, matched an Anthropic incident about sign-in. If status.claude.com is green and only your connection fails, the block is more likely about your network's address.

Will a VPN fix the Cloudflare block?

It can go either way. One November 13 commenter wrote that it "works with some vpn", while a shared VPN exit can just as well be the cause. Try the opposite of your current setup, then a phone hotspot.

Why does a web page error appear in my terminal?

Claude Code reaches Anthropic through the same web infrastructure a browser uses. When Cloudflare blocks the request, it answers with an HTML page meant for people, and Claude Code shows that page's title where a normal API error would go.

On claude.ai, the same morning produced "Temporarily unable to authenticate". App connection errors live in Couldn't connect to Claude, and running parallel Claude Code agents shows how to cap concurrency. We'll flag in the newsletter when a Claude Code release starts retrying this error.

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.