Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.251 ·

Custom headers from settings are now validated before reaching the environment

Custom headers from settings are validated before entering the environment.

You'll notice Improvements
JSON All of v2.1.251
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
SettingsArea: what it touches
ImprovementsKind: in v2.1.251,
ImprovementsSection of the release
What

A ANTHROPIC_CUSTOM_HEADERS value supplied through settings used to be copied into the process environment unchecked. It now has to pass a validation step first, closing a path where settings could inject arbitrary header material.

Details
  • Rejects bare carriage-return line endings and any header line whose value looks like a redirect payload.
  • Rejects header names matching a broad sensitive-key pattern covering auth, key, token, cookie, secret, credential, session, signature, passw and jwt.
  • Always enforced; this removes a previous bypass rather than adding an opt-in.
Evidence

ANTHROPIC_CUSTOM_HEADERS

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

Read from
Names in the bundleANTHROPIC_CUSTOM_HEADERS
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Added since A small documentation edit on Configure server-managed settings touched a line naming ANTHROPIC_CUSTOM_HEADERS after this was published. Whether [`ANTHROPIC_CUSTOM_HEADERS`](/docs/en/env-vars#variables) needs approval also depends on the delivered value. Headers that only tag requests, such as `Accept-Language`, apply without the dialog. A line that names a credential, an o… server-managed-settings see the edit
Confirmed since Anthropic's documentation has since written up ANTHROPIC_CUSTOM_HEADERS, on Connect Claude Code to an LLM gateway. * **Amazon Bedrock, Google Cloud's Agent Platform, or Claude Platform on AWS**: add `ANTHROPIC_AUTH_TOKEN` after the block. Claude Code sends it to the gateway as an `Authorization: Bearer` header. For a credential in a different scheme or… llm-gateway-connect see the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up ANTHROPIC_CUSTOM_HEADERS, on Connect Claude Code to an LLM gateway.
Anthropic's release notes agreeChanged ANTHROPIC_CUSTOM_HEADERS from managed or project settings to require approval when it sets a credential, org/tenant, routing, or…

See this entry in the whole of v2.1.251 →

Feedback