A new internal check decides when Claude Code sends extra gateway hint headers on first-party requests
Claude Code has a new internal helper that decides whether to attach gateway hint headers to outgoing requests. It turns them on automatically if the CLAUDE_CODE_GATEWAY_HINT_HEADERS environment variable is set, or under another internal condition, turns them off entirely outside of "first-party" surfaces, and otherwise follows a feature flag.
This is an internal request-routing detail; it does not change anything a user needs to do.
tengu_splendid_sutton Not enough to sayNothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.
This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.273: off
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.273. It isn't a statement about your account. What a flag value here can and cannot tell you
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.
| `CLAUDE_CODE_GATEWAY_HINT_HEADERS` | Sends the [gateway hint headers](/docs/en/llm-gateway-protocol#gateway-hint-headers), which classify each request for routing and scheduling decisions at the gateway. Requires Claude Code v2.1.273 or …llm-gateway-rollout see the edit
| `CLAUDE_CODE_GATEWAY_HINT_HEADERS` | Set to `1` to send the [gateway hint headers](/docs/en/llm-gateway-protocol#gateway-hint-headers), such as `x-claude-code-request-class` and `x-claude-code-compaction`, on a custom proxy or a third-pa…env-vars see the edit
What the gateway hint headers are used for once sent is not stated.
Anthropic's documentation has since written up CLAUDE_CODE_GATEWAY_HINT_HEADERS, on Environment variables.
Added x-claude-code-request-class, x-claude-code-agent-type, x-claude-code-prev-tool-durations, x-claude-code-compaction and…
New in this build: CLAUDE_CODE_GATEWAY_HINT_HEADERS