Follow Discord
Sweep 23 Nov 2026 · 19:13Z Build v2.1.331 548 read Stable v2.1.323 Latest v2.1.330 Next v2.1.331 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.331 ·

Claude Code now refuses unexpected redirects of model API requests

Redirected model API requests are now refused with a clearer error, and CLAUDE_CODE_DISABLE_REDIRECT_CHECK turns the new check off

Group of 3 Use it now Notable No documentation found New Features
JSON All of v2.1.331
Use it nowTier: how much it should matter to you
5Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
AuthArea: what it touches
New FeaturesKind: in v2.1.331,
What probably matters to youSection of the release

Unclear What the redirect check does, and whether CLAUDE_CODE_DISABLE_REDIRECT_CHECK turns it off, is not stated.

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 with Claude 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 generic Unable to connect to API message.
  • The new environment variable CLAUDE_CODE_DISABLE_REDIRECT_CHECK turns 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 as AWS_ENDPOINT_URL_STS and CLAUDE_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.

Read from
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhat the redirect check does, and whether `CLAUDE_CODE_DISABLE_REDIRECT_CHECK` turns it off, is not stated.

See this entry in the whole of v2.1.331 →

Feedback