CLAUDE_GATEWAY_IDP_CONNECT_BY_HOSTNAME
Updated by Alex Sorokoletov
CLAUDE_GATEWAY_IDP_CONNECT_BY_HOSTNAME is a Claude Code environment variable. Added between v2.1.326 and v2.1.331 and still present in v2.1.332. It is not in the official reference.
| Status | Present in v2.1.332 |
|---|---|
| Added | Added between v2.1.326 and v2.1.331 |
| Category | Network and proxy |
| Official docs | Not listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_GATEWAY_IDP_CONNECT_BY_HOSTNAME=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_GATEWAY_IDP_CONNECT_BY_HOSTNAME": "<value>"
}
}Related variables
CLAUDE_CODE_AUTO_CONNECT_IDE: Auto-connect to IDE on startup.CLAUDE_CODE_CCR_EARLY_REMOTE_CONNECT: Set to start early remote work that opened the remote connection link when resuming a remote SDK session; read until v2.1.309.CLAUDE_CODE_CONNECT_TIMEOUT_MSCLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS: Extends the LLM gateway /v1/models discovery timeout; default 3 seconds.CLAUDE_GATEWAY_DRAIN_TIMEOUT_MS: Milliseconds the gateway gives in-flight requests to finish during shutdown before closing them; defaults to 25000.CLAUDE_GATEWAY_PROXY_IS_EGRESS_BOUNDARY: Set in the gateway to treat the configured HTTPS_PROXY as the egress boundary, handing it hostnames and relying on its allowlist instead of resolving and checking addresses locally.MCP_CONNECT_TIMEOUT_MSANTHROPIC_BASE_URL: Custom endpoint for Anthropic services.
Frequently asked questions
Which Claude Code version has CLAUDE_GATEWAY_IDP_CONNECT_BY_HOSTNAME?
Added between v2.1.326 and v2.1.331 and still present in v2.1.332.
How do I set CLAUDE_GATEWAY_IDP_CONNECT_BY_HOSTNAME?
Export it before starting Claude Code (export CLAUDE_GATEWAY_IDP_CONNECT_BY_HOSTNAME=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.