Generated: 2026-04-01 Extraction basis:
- environment-variable reads across the product codebase
The product references 473 unique environment variable names.
That does not mean all 473 are stable public knobs. Many are:
- test-only
- internal rollout/debug flags
- environment-detection signals
- provider-specific credentials
- bridge/session plumbing
Still, the source clearly exposes a large operational contract that is worth cataloging.
Companion raw inventory in this analysis bundle:
analysis/environment-variable-inventory.md
Most frequently referenced environment variables:
| Variable | Approx. Ref Count | Main Meaning |
|---|---|---|
USER_TYPE |
357 | internal/external build behavior, ant-only surfaces |
NODE_ENV |
43 | dev/test/prod branching |
CLAUDE_CODE_ENTRYPOINT |
41 | mode of invocation: cli, sdk, local-agent, remote, desktop, etc. |
CLAUDE_CODE_REMOTE |
27 | remote/session-bridge mode |
TERM_PROGRAM |
17 | terminal integration behavior |
CLAUDE_CODE_SIMPLE |
16 | reduced tool and prompt surface |
ANTHROPIC_API_KEY |
16 | direct API auth |
CLAUDE_CODE_USE_BEDROCK |
14 | provider routing |
CLAUDE_CODE_USE_VERTEX |
13 | provider routing |
ANTHROPIC_BASE_URL |
13 | API endpoint override |
This is enough to say the real execution mode is heavily environment-driven.
Examples:
USER_TYPENODE_ENVCLAUDE_CODE_ENTRYPOINTCLAUDE_CODE_ACTIONCLAUDE_CODE_ENVIRONMENT_KINDCLAUDE_CODE_SESSION_KINDCLAUDE_CODE_IS_COWORK
These determine which product surface is active:
- interactive CLI
- SDK CLI
- local-agent
- desktop
- bridge
- remote
- GitHub Action
Examples:
ANTHROPIC_API_KEYANTHROPIC_AUTH_TOKENANTHROPIC_BASE_URLANTHROPIC_MODELANTHROPIC_SMALL_FAST_MODELCLAUDE_CODE_USE_BEDROCKCLAUDE_CODE_USE_VERTEXCLAUDE_CODE_USE_FOUNDRYCLAUDE_CODE_SKIP_BEDROCK_AUTHCLAUDE_CODE_SKIP_VERTEX_AUTHAWS_BEARER_TOKEN_BEDROCKMCP_CLIENT_SECRETMCP_XAA_IDP_CLIENT_SECRET
The provider contract is broader than “Anthropic API key”. The codebase actively supports multiple backends and proxying strategies.
Examples:
CLAUDE_CODE_REMOTECLAUDE_CODE_REMOTE_SESSION_IDCLAUDE_CODE_REMOTE_MEMORY_DIRCLAUDE_CODE_SESSION_ACCESS_TOKENCLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTORCLAUDE_BRIDGE_SESSION_INGRESS_URLCLAUDE_CODE_USE_CCR_V2CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPECLAUDE_CODE_WORKER_EPOCH
These variables are a strong sign that session transport and remote execution are wired through environment handoff between cooperating processes.
Examples:
CLAUDE_CODE_SIMPLECLAUDE_CODE_BRIEFCLAUDE_CODE_PROACTIVECLAUDE_CODE_ENABLE_PROMPT_SUGGESTIONCLAUDE_CODE_DISABLE_FAST_MODECLAUDE_CODE_DISABLE_THINKINGCLAUDE_CODE_DISABLE_TERMINAL_TITLECLAUDE_CODE_STREAMLINED_OUTPUTCLAUDE_CODE_EXIT_AFTER_FIRST_RENDERCLAUDE_CODE_DISABLE_BACKGROUND_TASKS
These are often internal or automation-oriented, but they materially change the user-visible harness behavior.
Examples:
ENABLE_LSP_TOOLCLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECKCLAUDE_CODE_BASH_SANDBOX_SHOW_INDICATORCLAUDE_CODE_USE_POWERSHELL_TOOLCLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMINGCLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY
These are important because they alter tool exposure, safety checks, or execution semantics.
Examples:
CLAUDE_CODE_SYNC_PLUGIN_INSTALLCLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MSCLAUDE_CODE_PLUGIN_CACHE_DIRCLAUDE_CODE_PLUGIN_SEED_DIRCLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALLCLAUDE_CODE_DISABLE_POLICY_SKILLSENABLE_TOOL_SEARCH
Examples:
CLAUDE_CODE_ENABLE_TELEMETRYCLAUDE_CODE_ENHANCED_TELEMETRY_BETAOTEL_EXPORTER_OTLP_ENDPOINTOTEL_EXPORTER_OTLP_HEADERSOTEL_LOG_TOOL_DETAILSOTEL_LOG_USER_PROMPTSCLAUDE_CODE_PROFILE_QUERYCLAUDE_CODE_PROFILE_STARTUPCLAUDE_CODE_PERFETTO_TRACECLAUDE_CODE_DEBUG_LOG_LEVEL
This is a major operational contract in its own right.
Examples:
CLAUDE_CODE_TEST_FIXTURES_ROOTVCR_RECORDFORCE_VCRCLAUDE_CODE_STALL_TIMEOUT_MS_FOR_TESTINGCLAUDE_CODE_VERIFY_PLANCLAUDE_CODE_FRAME_TIMING_LOGCLAUDE_CODE_COMMIT_LOGDEBUG_SDK
This variable is used to label major execution modes, including:
clisdk-clisdk-tssdk-pyclaude-vscodelocal-agentclaude-desktopremotemcpclaude-code-github-action
This is one of the most important env vars in the repo because analytics, UI behavior, and remote handling all branch on it.
This variable radically shrinks the tool surface. In simple mode, the system exposes only:
BashReadEdit
or REPLTool in REPL mode.
This appears across setup, analytics, printing, upstream proxying, memdir handling, and transport code. It is not cosmetic. It changes transport and session behavior throughout the app.
This variable enables the LSP tool surface.
This variable gates detailed tool-name and tool-input logging. This is privacy-sensitive and intentionally off by default.
The source strongly suggests three stability tiers:
- provider auth vars like
ANTHROPIC_API_KEY - provider routing vars like
CLAUDE_CODE_USE_BEDROCK - major mode vars like
CLAUDE_CODE_ENTRYPOINTandCLAUDE_CODE_REMOTE - telemetry endpoint vars under
OTEL_*
CLAUDE_CODE_USE_CCR_V2CLAUDE_CODE_SYNC_PLUGIN_INSTALLCLAUDE_CODE_ENABLE_PROMPT_SUGGESTIONCLAUDE_CODE_DISABLE_*flags- bridge/session ingress vars
CLAUDE_CODE_VERIFY_PLANCLAUDE_CODE_TEST_FIXTURES_ROOTCLAUDE_CODE_FRAME_TIMING_LOGFORCE_VCRVCR_RECORD
Even without documenting all 473 names individually, the source yields several useful artifacts:
- a stable-enough “ops knobs” shortlist
- a provider-routing contract
- a remote-session handoff contract
- a telemetry/debugging contract
- a list of dangerous override flags that weaken safety or change behavior
If you want the exhaustive raw list, the command used here was:
rg -o --no-filename "process\\.env\\.[A-Z0-9_]+" src \
| sed 's/process.env.//' \
| sort | uniqThat currently returns 473 unique names.
For self-contained transfer, the full alphabetical inventory is preserved separately in:
analysis/environment-variable-inventory.md