Unclear It is not clear whether more or fewer secrets are now passed to programs Claude Code starts.
What
ANTHROPIC_UNIX_SOCKET is an environment variable (a named value set before starting a program) that sends Claude Code's API traffic through a local socket, for example in a sandboxed or proxied setup. When it is set, Claude Code changes how it handles credentials for the programs it starts (child processes):
- A new check treats
CLAUDE_CODE_OAUTH_TOKENorANTHROPIC_API_KEYas a placeholder value, not a real secret. - The code that gives
ANTHROPIC_AUTH_TOKENorANTHROPIC_API_KEYto a child process now gives it nothing in this case. - The list of values removed from a child process's environment now uses this new check instead of the old inline comparison against a placeholder, and draws on one more source list (including
CLAUDE_CODE_SUBSCRIPTION_TYPE).
Why
If you run Claude Code behind a socket that substitutes credentials, programs it starts no longer receive those auth tokens from it. Anything that depended on finding ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY there may need another way to get them.
It is not clear whether more or fewer secrets are now passed to programs Claude Code starts.