Claude Code can now attach a new header, x-claude-code-prompt-id, to its API requests. A header is a small labelled value sent along with a request. This one holds an id for the prompt that led to the request. It is only sent when that id passes a format check.
It follows the same rule as the existing gateway hint headers:
CLAUDE_CODE_GATEWAY_HINT_HEADERSdecides whether it is sent, when that variable is set.- Without that variable, it is not sent to third-party providers such as Amazon Bedrock.
- On a direct connection to Anthropic, it depends on an internal condition. Failing that, it depends on a remote setting that is off unless it is switched on remotely.
A gateway is a proxy that sits between Claude Code and the model provider. The header lets a gateway, or the API, link every request back to the prompt that caused it.
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.283: 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.283. It isn't a statement about your account. What a flag value here can and cannot tell you
It is not clear that any request Claude Code makes actually supplies a prompt id yet.
Added x-claude-code-prompt-id to the gateway hint headers so LLM gateways can group the requests that serve one user prompt; opt in with…