Claude Code v2.1.334 · 1 Dec 2026
OpenTelemetry exports can reuse the host's login and retry refused batches
OpenTelemetry exports can reuse the host's credential, and batches refused for a bad credential are re-sent once
You'll notice Tier: how much it should matter to you
3 Useful: my rating, 1 to 5
2 Signal: worth watching, 1 to 5
Telemetry Area: what it touches
Improvements Kind: in v2.1.334, 01 Dec 26
Improvements Section of the release
Unclear It is not clear whether CLAUDE_CODE_HOST_AUTH_ENV_VAR is meant to be set by users or by an app that launches Claude Code.
What
Claude Code can send monitoring data to your own collector using OTLP, the OpenTelemetry format. Two things are different:
The exporter can reuse the host's login header. CLAUDE_CODE_HOST_AUTH_ENV_VAR names the variable to take it from, either ANTHROPIC_AUTH_TOKEN or ANTHROPIC_CUSTOM_HEADERS . This happens only when the collector address and headers match the host's configuration.
When the collector refuses a batch with a 401 or 403 error (a login refusal), Claude Code keeps the batch and sends it once more under the current credential. A log line reports how many batches were re-sent.
Why
Monitoring data refused because a credential expired is no longer quietly lost.
How sure we are
Something disagrees Something we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt It is not clear whether `CLAUDE_CODE_HOST_AUTH_ENV_VAR` is meant to be set by users or by an app that launches Claude Code.
See this entry in the whole of v2.1.334 →
1 Dec 2026 · 544 entries, this one is #101.
Use it now15 You'll notice322 Nothing to try yet40 Under the hood167
Open the release →
Names in this entry
env CLAUDE_CODE_HOST_AUTH_ENV_VAR When Claude Code removes certain environment variables, it now keeps the one named by CLAUDE_CODE_HOST_AUTH_ENV_VAR
env ANTHROPIC_AUTH_TOKEN Custom value for the Authorization header (the value you set here will be prefixed with Bearer )
env ANTHROPIC_CUSTOM_HEADERS Custom headers to add to requests (Name: Value format, newline-separated for multiple headers). If a name or value contains a character an HTTP header can't carry, such as a curly quote or a zero-width space, the request fails with an error that identifies the pair by position. Requires Claude Code v2.1.227 or later. Invalid request header value lists the exact character set and where the check runs. A value that sets a credential, org or tenant, routing, or API-behavior header, such as Authorization or Host, counts as a setting that needs approval when server-managed settings deliver it. From project or local settings, such a value follows the rules for when env values apply
Is this right?
0
0
Feedback
What's wrong with this entry?
Hard to understand Too vague Looks wrong Not relevant to me Too long Missing the detail I wanted Duplicate of another card
Clear Learned something new I can act on this Good catch
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
← Previous · 100 of 544
Rewriting of command allow rules now runs for everyone
You'll notice Permissions
In v2.1.334 Improvements release-page order
Next → · 102 of 544
Transcript sharing gets a typed confirmation, and survey dismissals record why
You'll notice Transcript Sharing