{"name":"CLAUDE_CODE_USE_GATEWAY","slug":"claude-code-use-gateway","family":"env","title":"Environment variables","noun":"environment variable","description":"CLAUDE_CODE_USE_GATEWAY now passes down to spawned agent processes, so gateway routing is no longer dropped.","description_source":"entry","described_by":{"version":"2.1.242","anchor":"gateway-routing-is-passed-down-to-spawned-agent-team-process"},"presence":{"first_seen":"2.1.195","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":102,"mined_builds":149,"first_cited":{"version":"2.1.242","released_at":"2026-08-24 19:16:14","spans":4}},"aliases":[],"entries":[{"version":"2.1.305","anchor":"plugin-eval-can-pass-the-session-api-key-to-its-test-runs-by","heading":"claude plugin eval passes your session's API key to its test runs","line":"With an API key session, `claude plugin eval` now hands the key to its test runs itself, except on Windows, where you must set `ANTHROPIC_API_KEY`","released_at":"2026-10-20 19:29:36","reason":"found in this entry's text"},{"version":"2.1.293","anchor":"gateway-managed-claude-code-setting","heading":"New setting lets Claude Desktop run Claude Code in gateway mode","line":"With `inferenceGatewayManagedClaudeCode` on, Desktop runs Claude Code in gateway mode for gateway sign-ins, turning off usage analytics","released_at":"2026-10-07 17:18:04","reason":"found in this entry's text, named in this entry"},{"version":"2.1.293","anchor":"provider-selector-env-flags-now-cleared-for-awsgcpgateway","heading":"Leftover AWS, Google Cloud and gateway provider variables are now cleared","line":"When Claude Code sets up a provider's environment, it now also blanks `CLAUDE_CODE_USE_ANTHROPIC_AWS`, `CLAUDE_CODE_USE_ANTHROPIC_GOOGLE_CLOUD` and `CLAUDE_CODE_USE_GATEWAY`","released_at":"2026-10-07 17:18:04","reason":"found in this entry's text"},{"version":"2.1.290","anchor":"auth-status-handles-token-sourceapi-key-conflicts-via-helpe","heading":"Auth status marks the unused credential, and a clearer gateway file error","line":"The auth status display marks the credential not in use, and gateway credential restore explains when the file is refused","released_at":"2026-10-05 18:12:44","reason":"found in this entry's text"},{"version":"2.1.281","anchor":"remote-managed-settings-are-not-written-to-disk-when-the-pro","heading":"Remote managed settings are not written to disk when the provider is managed by the host","line":"When a host manages the provider through a gateway, remote managed settings are no longer cached to disk and host policy merges by default","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text, named in this entry"},{"version":"2.1.281","anchor":"remote-managed-settings-fetch-public-address-gateway-refusa","heading":"Remote managed settings fetch: public-address gateway refusal and richer diagnostics","line":"Fetching remote managed settings now refuses gateways that resolve to a public address and reports more about failures","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text"},{"version":"2.1.281","anchor":"claude-code-host-gateway-lineage-new-env-var-that-marks-s","heading":"CLAUDE_CODE_HOST_GATEWAY_LINEAGE : new env var that marks sessions spawned by a Claude Desktop gateway","line":"New CLAUDE_CODE_HOST_GATEWAY_LINEAGE variable keeps child processes of a Desktop-hosted gateway session treated as host-managed","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text"},{"version":"2.1.281","anchor":"background-session-child-environment-auth-and-new-variables","heading":"Background-session child environment: auth and new variables handled explicitly","line":"Background sessions now start from a cleaned environment, with login variables added back and some internal variables left out","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text"},{"version":"2.1.281","anchor":"new-managed-policy-check-for-desktop-hosted-gateways","heading":"New managed-policy check for Desktop-hosted gateways","line":"When Claude Desktop runs Claude Code through a gateway, Claude Code now checks that gateway against your organization's policy and explains failures","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text, named in this entry"},{"version":"2.1.266","anchor":"cloud-gateway-sign-in-error-message-shortened","heading":"Cloud gateway sign-in error message shortened","line":"The Cloud gateway sign-in error message dropped its instructions for CLAUDE_CODE_USE_GATEWAY, ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN","released_at":"2026-09-08 23:32:32","reason":"named in this entry, found in this entry's text"}],"entries_total":16,"docs":[],"docs_total":0,"gates":[],"related":[{"name":"CLAUDE_CODE_USE_ANTHROPIC_AWS","slug":"claude-code-use-anthropic-aws","description":"A new provider-managed env var list decides gateway sign-in error wording."},{"name":"CLAUDE_CODE_USE_ANTHROPIC_GOOGLE_CLOUD","slug":"claude-code-use-anthropic-google-cloud","description":"A new provider-managed env var list decides gateway sign-in error wording."},{"name":"CLAUDE_CODE_USE_BEDROCK","slug":"claude-code-use-bedrock","description":"CLAUDE_CODE_USE_GATEWAY now passes down to spawned agent processes, so gateway routing is no longer dropped."},{"name":"CLAUDE_CODE_USE_CCR_V2","slug":"claude-code-use-ccr-v2","description":"Set by Claude Code to `1`, together with `CLAUDE_CODE_WORKER_EPOCH`, in the environment of a session child process that bridge mode spawns after registering it as a CCR v2 worker. It is declared as a boolean in the env schema, but no code in this version reads it."},{"name":"CLAUDE_CODE_USE_COWORK_PLUGINS","slug":"claude-code-use-cowork-plugins","description":"Claude Code shows notices saying why hooks are off, covering unreadable managed settings, bare mode, safe mode, managed policy and `--settings`"},{"name":"CLAUDE_CODE_USE_FOUNDRY","slug":"claude-code-use-foundry","description":"Base-URL safety checks now group Foundry and Bedrock Mantle with the other providers."},{"name":"CLAUDE_CODE_USE_MANTLE","slug":"claude-code-use-mantle","description":"CLAUDE_CODE_USE_GATEWAY now passes down to spawned agent processes, so gateway routing is no longer dropped."},{"name":"CLAUDE_CODE_USE_NATIVE_FILE_SEARCH","slug":"claude-code-use-native-file-search","description":null},{"name":"CLAUDE_CODE_USE_POWERSHELL_TOOL","slug":"claude-code-use-powershell-tool","description":"New structured reason codes let a host app tell why Claude Code refused to start"},{"name":"CLAUDE_CODE_USE_VERTEX","slug":"claude-code-use-vertex","description":"A new provider-managed env var list decides gateway sign-in error wording."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-use-gateway","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}