launchctl setenv adds to, and on Windows your account’s and the machine’s variables. Daily renewal gets its scheduler’s, plus what schedule gives it.
A variable that names a folder must hold a full path: home_not_absolute lists which may be empty. On Windows, a variable’s name has no case: PATH and Path are one variable.
Variables
Custom OAuth endpoint
CLAUDE_CODE_CUSTOM_OAUTH_URL counts when set in the environment or in an env block of Claude Code’s settings. As read in Claude Code 2.1.284 and 2.1.289, Claude Code then keeps its login and config under names Pitboard does not read. Pitboard refuses these with custom_oauth_endpoint:
enroll,use,forget,renameandstowof a Claude Code account, and the same in the app.repairanduninstall.abandonof a Claude Code switch, and every change while one is interrupted.
custom_oauth_endpoint.
Variables that override the login
As read in Claude Code 2.1.309, each of these makes Claude Code ignore the login Pitboard switches:ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, CLAUDE_CODE_OAUTH_TOKEN, CLAUDE_CODE_USE_BEDROCK, CLAUDE_CODE_USE_VERTEX, CLAUDE_CODE_USE_FOUNDRY, CLAUDE_CODE_USE_GATEWAY, CLAUDE_CODE_USE_ANTHROPIC_AWS, CLAUDE_CODE_USE_ANTHROPIC_GOOGLE_CLOUD, CLAUDE_CODE_USE_MANTLE.
Pitboard reads them from its environment and from Claude Code’s settings, along with apiKeyHelper and Claude Code’s remote token files. Managed settings that set forceLoginMethod to gateway, or name a forceLoginGatewayUrl, send every session through the Cloud gateway and count the same way. In your own settings.json, those two only aim /login at a gateway. While any is set, changes to Claude Code accounts go ahead but warn with auth_overridden, as does pitboard doctor. The automatic switch holds back. A forceLoginMethod of claudeai or console only chooses how Claude Code signs in, and a session still takes the login Pitboard switches.
Anthropic profiles
As read in Claude Code 2.1.309, a session signs in with an Anthropic profile before the login Pitboard switches:- The profile
ANTHROPIC_PROFILEnames, where it signs in withoidc_federation, or withuser_oauthand a login in its credentials file. - With
ANTHROPIC_PROFILEunset, the federationANTHROPIC_FEDERATION_RULE_IDandANTHROPIC_ORGANIZATION_IDset together. - Otherwise the active profile, the one
active_confignames ordefault, where it signs in withoidc_federation.
configs in ~/.config/anthropic, or in anthropic in XDG_CONFIG_HOME. On Windows, they are in %APPDATA%\Anthropic. ANTHROPIC_CONFIG_DIR names another folder on every system.
Pitboard reads these variables and ANTHROPIC_CONFIG_DIR from the env of managed settings, of your own settings.json and of ~/.claude.json, in that order, as Claude Code does, and from its own environment where none sets them. A project’s settings and a --settings file can set them too, and Pitboard does not read those. A profile counts as a variable that overrides the login does.
Proxies
Pitboard’s requests go through the proxy these variables name. It does not read the system’s proxy settings. On Windows,pitboard doctor says where Windows’ proxy settings send Codex’s requests while HTTPS_PROXY is unset.
- Pitboard reads
ALL_PROXY,all_proxy,HTTPS_PROXY,https_proxy,HTTP_PROXY, thenhttp_proxy, and takes the first that holds a proxy’s address. - An address with no scheme is
http://. - Pitboard goes through
http://andhttps://proxies, not SOCKS ones:socks://,socks4://,socks4a://,socks5://andsocks5h://. - While a SOCKS proxy is named, each request to a host outside
NO_PROXYfails before anything is sent, naming the variable. - Pitboard then follows no redirect.
NO_PROXY lists the hosts Pitboard reaches directly, separated by commas. Pitboard reads no_proxy only while NO_PROXY is unset. Entries ignore case, and a space is part of an entry.
Pitboard reaches these hosts without looking up the proxy’s name, which need not resolve.