Skip to content
BENIBIX Learn

CLAUDE_CODE_PROXY_RESOLVES_HOSTS

AI⌨️ Claude CodeConfiguration

Also known as CLAUDE_CODE_PROXY_RESOLVES_HOSTS=1

Set to 1, it lets the proxy look up host names.

Think of it like

It is like you give the driver a street name. Then they find the house.

Example

Jack's lab network has no name lookup for the outside world. Only the proxy can find api.anthropic.com, so he sets this to 1.

Why it matters

On a locked network, a request can fail at once if the computer must find the name.

Definition

CLAUDE_CODE_PROXY_RESOLVES_HOSTS set to 1 lets your proxy look up host names, not Claude Code. It is for networks where a computer cannot look up names on its own. Only the proxy can. Claude Code hands the name to the proxy, and the proxy finds the address.

Example code

bash
export HTTPS_PROXY=http://proxy.example.com:8080
export CLAUDE_CODE_PROXY_RESOLVES_HOSTS=1
claude
Let the proxy find api.anthropic.com.

Common mistake

Setting it with no proxy. It only changes who looks up names when a proxy is used.

Key takeaways

  1. 1
    Proxy does the lookup. Not Claude Code.
  2. 2
    Locked networks. No outside lookups.
  3. 3
    Off by default. Set 1 to use.