Skip to main content
The command line reads your shell’s environment. The app reads the one it was started with, not a terminal’s: on macOS what launchd gives, which 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, rename and stow of a Claude Code account, and the same in the app.
  • repair and uninstall.
  • abandon of a Claude Code switch, and every change while one is interrupted.
Changes to Codex accounts go ahead. The automatic switch decides nothing for Claude Code, and says so with 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_PROFILE names, where it signs in with oidc_federation, or with user_oauth and a login in its credentials file.
  • With ANTHROPIC_PROFILE unset, the federation ANTHROPIC_FEDERATION_RULE_ID and ANTHROPIC_ORGANIZATION_ID set together.
  • Otherwise the active profile, the one active_config names or default, where it signs in with oidc_federation.
Claude Code keeps the profiles in 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, then http_proxy, and takes the first that holds a proxy’s address.
  • An address with no scheme is http://.
  • Pitboard goes through http:// and https:// proxies, not SOCKS ones: socks://, socks4://, socks4a://, socks5:// and socks5h://.
  • While a SOCKS proxy is named, each request to a host outside NO_PROXY fails 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.