Unclear Which request addresses the redirect check applies to is not known.
What
A redirect is a server's reply telling the program to send its request somewhere else. Networks that ask you to sign in first, such as hotel or office Wi-Fi, and some proxies redirect traffic this way. Claude Code now checks for this on the requests it sends to the model:
- Model API requests that send data (POST requests) and set no redirect option of their own are now retried with
redirect: error. An unexpected redirect goes to a handler that either follows it or stops withClaude Code refused a redirect of this request. Before, redirected responses were only logged after the fact and never blocked. - A refused redirect now has its own error code,
RedirectRefused, and its own message:Unable to connect to API: sign in to network or proxy. The request was redirected. The message then asks you to have your network administrator allow api.anthropic.com. Before, this case fell through to the genericUnable to connect to APImessage. - The new environment variable
CLAUDE_CODE_DISABLE_REDIRECT_CHECKturns the check off. An environment variable is a named value set in your shell before Claude Code starts. Only the environment Claude Code starts with, your own settings or managed settings (settings an administrator sets for an organisation) may set it, so Claude itself cannot. It joins the same list of names asAWS_ENDPOINT_URL_STSandCLAUDE_CODE_DISABLE_EARLY_KEY_GUARD. - The check that decides whether an error is a sign-in problem now also requires an HTTP 401 status, the server's "not authorised" reply.
Why
A redirect could send model requests, along with your credentials, to a different server. Requests are now stopped instead. If you are behind a sign-in page or proxy, the error now tells you what to do. If the check gets in the way on your network, you can set CLAUDE_CODE_DISABLE_REDIRECT_CHECK.
tengu_nifty_chipmunk Gate removed from the codeThis release deleted the gate from the code while it was still reading on for the account this site reads, so the code path no longer asks a flag before running.
This account: on · anonymous baseline: on · compiled default in v2.1.331: not a boolean we can read
These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.
Read once, for one account on one subscription tier, against v2.1.331. It isn't a statement about your account. What a flag value here can and cannot tell you
The code path no longer asks a flag before it runs.
The code path no longer asks a flag before it runs.
Which request addresses the redirect check applies to is not known.