{"name":"CLAUDE_CODE_ATTRIBUTION_HEADER","slug":"claude-code-attribution-header","family":"env","title":"Environment variables","noun":"environment variable","description":"Set to `0` to omit the [attribution block](\/docs\/en\/llm-gateway-protocol#system-prompt-attribution-block), which carries the client version and a prompt fingerprint, from the start of the system prompt. Caching on a direct connection to the Anthropic API is unaffected either way. In some direct-connection setups, Claude Code keeps the block on [auto mode](\/docs\/en\/permission-modes#eliminate-prompts-with-auto-mode) classifier requests even when you set `0`. In [System prompt attribution block](\/docs\/en\/llm-gateway-protocol#system-prompt-attribution-block), check which connections and credentials this covers. Before v2.1.181 the block included a per-request token on custom base URLs and Microsoft Foundry connections, so on those versions set it to `0` when your LLM gateway caches on the request body or forwards requests to a third-party provider, or when you connect to Microsoft Foundry directly","description_source":"docs","described_by":{"doc":"claude-code\/env-vars","title":"Environment variables"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":150,"mined_builds":150,"first_cited":{"version":"2.1.299","released_at":"2026-10-14 00:23:19","spans":1}},"aliases":[],"entries":[{"version":"2.1.305","anchor":"claude-code-attribution-project-and-attributionproject-setti","heading":"How Claude Code picks the claude.ai Project for usage reports","line":"The claude.ai Project used for usage reports now comes from an environment variable, a setting or a managed default, and bad IDs are flagged","released_at":"2026-10-20 19:29:36","reason":"found in this entry's text"},{"version":"2.1.302","anchor":"attribution-header-gains-project-tag-fork-subagent-gating-r","heading":"Attribution block can name a project, and one fork subagent check no longer reads its variable","line":"The attribution block can now carry a project tag, and one fork subagent check now depends on remote sessions instead of `CLAUDE_CODE_FORK_SUBAGENT`","released_at":"2026-10-16 16:48:28","reason":"found in this entry's text, named in this entry"},{"version":"2.1.299","anchor":"policy-managed-claude-code-attribution-header-is-protected-f","heading":"Managed settings can hold their CLAUDE_CODE_ATTRIBUTION_HEADER value against a host program","line":"Under some conditions, the managed-settings value of `CLAUDE_CODE_ATTRIBUTION_HEADER` now wins over one passed in by the program that starts Claude Code","released_at":"2026-10-14 00:23:19","reason":"found in this entry's text, named in this entry"},{"version":"2.1.284","anchor":"billing-attribution-header-adds-cc-prompt-index-and-cc-turn","heading":"Billing header now includes the prompt and turn position","line":"Requests sent directly to Anthropic now carry the prompt and turn number in their billing header, unless `CLAUDE_CODE_ATTRIBUTION_HEADER` turns it off","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text"},{"version":"2.1.284","anchor":"billing-attribution-header-gains-prompt-and-turn-indexes-fi","heading":"Attribution header can now include prompt and turn numbers","line":"On direct Anthropic connections, the attribution header can now also carry a prompt number and a turn number for each request","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text"},{"version":"2.1.229","anchor":"attribution-header-can-override-the-environment-opt-out","heading":"Attribution header can override the environment opt-out","line":"One first-party request path sends the attribution header even if you opted out via env var.","released_at":"2026-08-12 19:28:48","reason":"named in this entry, found in this entry's text"},{"version":"2.1.229","anchor":"auto-mode-side-queries-always-send-the-billing-attribution-h","heading":"Auto-mode side queries always send the billing attribution header","line":"Auto-mode's side queries send billing attribution metadata even if you set the opt-out variable.","released_at":"2026-08-12 19:28:48","reason":"named in this entry"},{"version":"2.1.227","anchor":"billing-attribution-header-carries-a-prompt-id-and-validates","heading":"Billing attribution header carries a prompt id and validates its values","line":"Usage attribution headers can carry a prompt id, and one env var suppresses the header entirely.","released_at":"2026-08-10 20:56:57","reason":"named in this entry, found in this entry's text"}],"entries_total":8,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true},{"source":"claude-code","path":"changelog","title":"Claude Code changelog","documented":false},{"source":"claude-code","path":"llm-gateway-protocol","title":"Claude Code gateway compatibility guide","documented":false}],"docs_total":3,"gates":[],"related":[{"name":"CLAUDE_CODE_ATTRIBUTION_ANNOUNCEMENT","slug":"claude-code-attribution-announcement","description":"Boolean (`1`\/`true`\/`yes`\/`on` or `0`\/`false`\/`no`\/`off`); when unset, the `tengu_reflective_wolf` flag decides (default `true`). The value is read once and cached. When on, the Bash tool's instructions no longer contain the commit and PR attribution lines and say to end commit messages and PR bodies with \"the attribution lines given in the conversation's system-reminder, when one is present\", and the lines are sent in a system-reminder; when off, the lines are written into the Bash instructions directly."},{"name":"CLAUDE_CODE_ATTRIBUTION_PROJECT","slug":"claude-code-attribution-project","description":"Claude Code now recognises `CLAUDE_CODE_ATTRIBUTION_PROJECT` and drops a value that is not a valid claude.ai Project ID from saved jobs"},{"name":"CLAUDE_CODE_ATTRIBUTION_STATUS_TIMEOUT_MS","slug":"claude-code-attribution-status-timeout-ms","description":"Four more environment variables are now recognized and passed through by Claude Code"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-attribution-header","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}