Skip to main content

System and Third-Party

Claude Code reads many variables that it does not define. Your system, your terminal, CI services, and other tools own them. Examples are HOME, PATH, EDITOR, TERM, and ALL_PROXY. Claude Code reads them to find files, pick colors, and detect where it runs.

This page lists 130 variables. You set many of them for your system anyway. Set them in your shell, or in the env key of a settings file.

Example​

export EDITOR="code --wait"
claude

Claude Code opens this editor for files, for example for /memory. VISUAL wins over EDITOR.

Variables​

The rows are in name order. See Environment Variables for what each column and badge means.

VariableStatusWhat it doesValues and defaultNotes
__CFBundleIdentifier
Undocumented: Only the program shows this item. It can change without notice.
Gives the macOS bundle id of the app that started the process. Claude Code uses it to find the host app and the URL handler.Text. Non-empty string. com.anthropic.claude-code-url-handler starts the deep link pathMacOS
AGENT_NAME
Undocumented: Only the program shows this item. It can change without notice.
Confirms an Azure Pipelines agent for the terminal color level.Text. Presence test together with TF_BUILDAll sessions
ALACRITTY_LOG
Undocumented: Only the program shows this item. It can change without notice.
Helps Claude Code detect the terminal. A set value counts as an Alacritty terminal in a terminal-feature check and rules out a plain VTE terminal.On or off. Truthy test only. Read from the env object and from the env of the terminal detectorTerminal UI rendering, all. Not set from project env before trust
ALACRITTY_WINDOW_ID
Undocumented: Only the program shows this item. It can change without notice.
Helps Claude Code detect the terminal. A set value rules out a plain vte-based or gnome-terminal guess, because Alacritty sets it.On or off. Truthy test only, in the terminal detectorTerminal UI rendering, all. Not set from project env before trust
ALL_PROXY
Documented: An official docs page names this item.
This is a standard proxy variable. Claude Code passes it to git as http.proxy and remote.origin.proxy when it runs git commands.Text. Read after HTTPS_PROXY and https_proxy, with the lowercase all_proxy as the last fallbackGit helper commands, all. Not set from project env before trust
ALLUSERSPROFILE
Undocumented: Only the program shows this item. It can change without notice.
This is a Windows path variable. It is the last fallback for the ProgramData folder when Claude Code builds the Windows Start Menu path.Text. Order is ProgramData, then PROGRAMDATA, then ALLUSERSPROFILE. Also in a list of Windows path namesWindows. Not set from project env before trust
ANDROID_HOME
Undocumented: Only the program shows this item. It can change without notice.
Helps detect the environment. If the path exists, Claude Code records android-sdk in the detected build tools.Text. Read first, with ANDROID_SDK_ROOT as the fallback. Only the path check mattersEnvironment report, all. Not set from project env before trust
ANDROID_SDK_ROOT
Undocumented: Only the program shows this item. It can change without notice.
Helps detect the environment. It is the fallback for ANDROID_HOME. If the path exists, Claude Code records android-sdk in the detected build tools.Text. Read only when ANDROID_HOME is unsetEnvironment report, all. Not set from project env before trust
APPDATA
Documented: An official docs page names this item.
This is a Windows path variable. Claude Code uses it for the gcloud config folder, the Alacritty config path, and a Windows path list.Text. Used on Windows only for gcloud and Alacritty pathsWindows. Not set from project env before trust
APPVEYOR
Undocumented: Only the program shows this item. It can change without notice.
Names AppVeyor for the terminal color level.Presence test, only when CI is set. Gives color level 1All sessions
AWS_EXECUTION_ENV
Undocumented: Only the program shows this item. It can change without notice.
Names the AWS runtime. Claude Code uses it to detect aws-fargate and aws-ecs as the deployment environment. The AWS SDK adds it to its user agent.Compared with AWS_ECS_FARGATE and AWS_ECS_EC2All (deployment detection) and AWS SDK calls
AWS_LAMBDA_FUNCTION_NAME
Undocumented: Only the program shows this item. It can change without notice.
Marks an AWS Lambda host. Claude Code reports aws-lambda as the deployment environment when it is set.Text. Any non-empty value. The AWS SDK also reads it for trace headersAll (deployment detection)
AWS_PAGER
Undocumented: Only the program shows this item. It can change without notice.
Sets the pager of the AWS CLI. Claude Code lists it among env names that can run a program, for safety checks.Text. No direct readSettings env and Bash safety checks
AZURE_AUTH_LOCATION
Undocumented: Only the program shows this item. It can change without notice.
Names an Azure auth file path. Claude Code lists it among credential file names to protect.Text. No direct readSettings env and sandbox credential lists
AZURE_CONFIG_DIR
Undocumented: Only the program shows this item. It can change without notice.
Sets the Azure CLI config folder. Claude Code treats it as a credential path to protect, default ~/.azure.TextSandbox credential deny paths
AZURE_FUNCTIONS_ENVIRONMENT
Undocumented: Only the program shows this item. It can change without notice.
Marks an Azure Functions host. Claude Code reports azure-functions as the deployment environment when it is set.Any non-empty valueAll (deployment detection)
BASH_ENV
Documented: An official docs page names this item.
Names the startup file that bash reads. Claude Code treats it as an unsafe inlet and flags it in settings and plugin env.Claude Code never reads it for its own useSettings env, plugin env, sandbox checks
BROWSER
Documented: An official docs page names this item.
Names the command that opens URLs. Claude Code uses it before open on macOS, and the browser setting wins over it.Text. The browser setting wins over it. On Linux with no display the open step fails with no_displayAll sessions
BUILDKITE
Undocumented: Only the program shows this item. It can change without notice.
Marks a Buildkite CI run. Claude Code uses it for CI detection, deployment detection, and color depth hints.Text. Any non-empty value countsAll sessions
C9_PID
Undocumented: Only the program shows this item. It can change without notice.
Marks an AWS Cloud9 workspace. Claude Code reports aws-cloud9 as the environment when it is set.Any non-empty value. Read directly in deployment detectionAll (deployment detection)
C9_USER
Undocumented: Only the program shows this item. It can change without notice.
Marks an AWS Cloud9 workspace. Claude Code reports aws-cloud9 as the environment when it is set.Any non-empty value. Read directly in deployment detectionAll (deployment detection)
CDPATH
Undocumented: Only the program shows this item. It can change without notice.
Holds the shell cd search path. Claude Code blanks it in cd helper commands and treats it as an unsafe env name to override.TextBash tool, Git and settings env checks
CF_PAGES
Undocumented: Only the program shows this item. It can change without notice.
Marks Cloudflare Pages. Claude Code reports cloudflare-pages as the deployment environment and counts it as a CI signal.On or off. Truthy value checkAll (deployment detection)
CI
Documented: An official docs page names this item.
Marks a CI run for the terminal color level.Presence test ("CI" in env), any value counts. A CI vendor variable then picks the levelAll sessions
CI_NAME
Undocumented: Only the program shows this item. It can change without notice.
Names the CI vendor. Claude Code checks for codeship when it picks the terminal color depth.Text. Only the value codeship mattersTerminal color detection (all)
CIRCLECI
Undocumented: Only the program shows this item. It can change without notice.
Marks a CircleCI run. Claude Code uses it for CI detection, deployment detection, and terminal color depth.Text. Presence countsAll sessions
CODER
Undocumented: Only the program shows this item. It can change without notice.
Marks a Coder workspace. The environment detector records deployment coder.--
CODER_WORKSPACE_NAME
Undocumented: Only the program shows this item. It can change without notice.
Marks a Coder workspace by name. The environment detector records deployment coder.Text-
CODESPACES
Undocumented: Only the program shows this item. It can change without notice.
Marks GitHub Codespaces. The environment detector records deployment codespaces.--
COLORTERM
Undocumented: Only the program shows this item. It can change without notice.
Reports terminal color support. truecolor or 24bit means 24-bit color.--
COLUMNS
Documented: An official docs page names this item.
Gives hook commands the terminal width.--
COMPUTERNAME
Undocumented: Only the program shows this item. It can change without notice.
Gives the Windows host name. Claude Code uses it as the device name.--
COMSPEC
Undocumented: Only the program shows this item. It can change without notice.
Gives the Windows command interpreter path. Claude Code uses it as a shell path fallback in environment info.--
ComSpec
Documented: An official docs page names this item.
Gives the Windows command interpreter path. The terminal opener uses it for the Command Prompt entry.--
ConEmuANSI
Undocumented: Only the program shows this item. It can change without notice.
Marks ConEmu. Any of the three ConEmu vars turns on terminal progress reporting.--
ConEmuPID
Undocumented: Only the program shows this item. It can change without notice.
Marks ConEmu. Any of the three ConEmu vars turns on terminal progress reporting.--
ConEmuTask
Undocumented: Only the program shows this item. It can change without notice.
Marks ConEmu. The value {cmd::Cmder} also selects Unicode symbols.--
CONTAINER_SANDBOX_MOUNT_POINT
Undocumented: Only the program shows this item. It can change without notice.
Marks a Windows container. The check turns off the registry sweep.--
COREPACK_ENABLE_AUTO_PIN
Undocumented: Only the program shows this item. It can change without notice.
Claude Code sets it to 0 at startup so that corepack does not edit package.json.--
CURSOR_TRACE_ID
Undocumented: Only the program shows this item. It can change without notice.
Marks the Cursor editor. Claude Code uses it to name the terminal host.Text-
DAYTONA_WS_ID
Undocumented: Only the program shows this item. It can change without notice.
Marks a Daytona workspace. The environment detector records deployment daytona.Text-
DENO_DEPLOYMENT_ID
Undocumented: Only the program shows this item. It can change without notice.
Marks Deno Deploy. The environment detector records deployment deno-deploy.Text-
DEVPOD
Undocumented: Only the program shows this item. It can change without notice.
Marks a DevPod workspace. The environment detector records deployment devpod.--
DEVPOD_WORKSPACE_UID
Undocumented: Only the program shows this item. It can change without notice.
Marks a DevPod workspace by ID. The environment detector records deployment devpod.--
DISPLAY
Undocumented: Only the program shows this item. It can change without notice.
Tells Claude Code whether a local display exists on Linux. With no DISPLAY and no WAYLAND_DISPLAY, it treats the browser open as not possible.Text. Matched against :N or unix:N formsLinux. Not set from project env before trust
DRONE
Undocumented: Only the program shows this item. It can change without notice.
Names Drone CI for the terminal color level.Presence test, only when CI is set. Gives color level 1All sessions
DYNO
Undocumented: Only the program shows this item. It can change without notice.
Heroku sets it. Environment detection reports the deployment platform as heroku when it is non-empty.Any non-empty value countsAll sessions. Environment detection only
EDITOR
Documented: An official docs page names this item.
Names the editor that Claude Code opens for files, for example for /memory. VISUAL wins over it, and the fallback is the first of code, vi, nano found.Text. Also sent in environment detection as the editor valueInteractive. Not set from project env before trust
FLY_APP_NAME
Undocumented: Only the program shows this item. It can change without notice.
Fly.io sets it. Environment detection reports the platform as fly.io when it is non-empty.TextAll sessions. Environment detection only
FLY_MACHINE_ID
Undocumented: Only the program shows this item. It can change without notice.
Fly.io sets it. Environment detection reports the platform as fly.io when it is non-empty.TextAll sessions. Environment detection only
FORCE_COLOR
Documented: An official docs page names this item.
Forces the color depth. The Bun runtime maps "", 1, true to 16 colors and 2 to 256 colors.Text. Untrimmed stringAll sessions. Not set from project env before trust
GH_CONFIG_DIR
Undocumented: Only the program shows this item. It can change without notice.
Names the gh config directory. Claude Code checks it for hosts.yml or config.yml to see if gh has a login.Text. Falls back to XDG_CONFIG_HOME/gh, then ~/.config/gh. Also used in a secrets scanGitHub features. Not set from project env before trust
GH_HOST
Documented: An official docs page names this item.
Names the GitHub host. It picks the enterprise token and is passed to the gh stand-in shim.TextGitHub features. Not set from project env before trust
GH_REPO
Undocumented: Only the program shows this item. It can change without notice.
Names the repository for gh. Claude Code passes it to the gh shim, which uses a host in it to choose the route.TextGitHub features. Not set from project env before trust
GITEA_ACTIONS
Undocumented: Only the program shows this item. It can change without notice.
Names Gitea Actions for the terminal color level.Presence test, only when CI is set. Gives color level 3 in one helperAll sessions
GITHUB_ACTION_PATH
Undocumented: Only the program shows this item. It can change without notice.
Gives the path of the running action. Claude Code protects it in the scrub path list and logs the claude-code-action ref.A pathGitHub Actions. Not set from project env before trust
GITHUB_ACTIONS
Undocumented: Only the program shows this item. It can change without notice.
Marks a GitHub Actions run. It adds run metadata to telemetry and turns on the subprocess env scrub unless you turn that scrub off.On or off. Truthy parse. CLAUDE_CODE_SUBPROCESS_ENV_SCRUB set to 0, false, no, or off turns the scrub offGitHub Actions. Not set from project env before trust
GITHUB_ACTOR
Undocumented: Only the program shows this item. It can change without notice.
Gives a user label for a cache diagnostic. It falls back to USER, USERNAME, then the git email name.Text. The label drops characters outside a-zA-Z0-9._-. Claude Code cuts it to 64 characters. Telemetry also reads it in ActionsGitHub Actions. Not set from project env before trust
GITHUB_ENV
Undocumented: Only the program shows this item. It can change without notice.
Gives the path of the runner env file. Claude Code adds it to the protected path list of the subprocess scrub.Claude Code resolves it to a pathGitHub Actions. Not set from project env before trust
GITHUB_EVENT_PATH
Undocumented: Only the program shows this item. It can change without notice.
Gives the path of the event payload file. Claude Code adds it to the protected path list of the subprocess scrub.A pathGitHub Actions. Not set from project env before trust
GITHUB_WORKSPACE
Undocumented: Only the program shows this item. It can change without notice.
Gives the path of the workspace. If it differs from the cwd, Claude Code protects its .git hooks and config in the scrub path list.-GitHub Actions. Not set from project env before trust
GITLAB_CI
Undocumented: Only the program shows this item. It can change without notice.
This is the GitLab CI marker. It appears in CI vendor lists of the Bun runtime and the color support code.Text. Use is by name in lists. No direct Claude Code read was seenGitLab CI. Not set from project env before trust
GITPOD_WORKSPACE_ID
Undocumented: Only the program shows this item. It can change without notice.
Gitpod sets it. Environment detection reports the deployment as gitpod when it is non-empty.TextAll sessions. Environment detection only
GNOME_TERMINAL_SERVICE
Undocumented: Only the program shows this item. It can change without notice.
This is the terminal marker for GNOME Terminal. Environment detection records if it is set.Presence onlyTerminal detection
GOOGLE_CLOUD_WORKSTATIONS
Undocumented: Only the program shows this item. It can change without notice.
Marks Google Cloud Workstations. Environment detection reports gcp-cloud-workstations when it is set.Presence checkAll sessions. Environment detection only
HISTFILE
Undocumented: Only the program shows this item. It can change without notice.
Gives the shell history path to a context step that reads the shell history for tool usage.Text. Passed as the history file input. The step does not run if the home is a network pathContext gathering. Not set from project env before trust
HOME
Documented: An official docs page names this item.
Holds the home directory. Many paths start from it, such as the config and XDG fallback dirs.Text. Falls back to the OS home dirAll sessions. Not set from project env before trust
HOMEDRIVE
Undocumented: Only the program shows this item. It can change without notice.
Holds the Windows home drive. Claude Code sets it in a child env and uses it to expand paths in a Windows lookup.Set by Claude Code from the home path for a Windows child envWindows
HOMEPATH
Undocumented: Only the program shows this item. It can change without notice.
Holds the Windows home path. Claude Code sets it in a child env and uses it to expand paths in a Windows lookup.Set by Claude Code from the home path for a Windows child envWindows
HOMESHARE
Undocumented: Only the program shows this item. It can change without notice.
Holds the Windows network home. Claude Code uses it to expand %HOMESHARE% in a Windows registry lookup.TextWindows
KUBERNETES_SERVICE_HOST
Undocumented: Only the program shows this item. It can change without notice.
Detects a Kubernetes pod so Claude Code reports a Kubernetes container runtime.--
NODE_ENV
Documented: An official docs page names this item.
Claude Code sets production in the env of some helper child processes. It also lists it in env reports.--
NODE_OPTIONS
Undocumented: Only the program shows this item. It can change without notice.
Holds Node options. Claude Code adds --max-old-space-size=8192 when CLAUDE_CODE_REMOTE is true.--
NODE_PATH
Documented: An official docs page names this item.
Holds the Bun runtime module search path. Claude Code removes it from the env of some helper child processes.A path-
PATH
Documented: An official docs page names this item.
Holds the standard executable search path. Claude Code reads it to find tools and sets it in shell and pwsh child environments.TextAll sessions. Not set from project env before trust
PATHEXT
Documented: An official docs page names this item.
Lists the Windows executable extensions. Claude Code uses it when it looks for commands.Text, .EXE by default. For pwsh child shells Claude Code sets its own valueWindows. Not set from project env before trust
PIP_CERT
Undocumented: Only the program shows this item. It can change without notice.
Sets the CA bundle path for pip. Claude Code sets it in the egress-proxy child env.Text. Also in the sandbox CA listSessions with the agent proxy or sandbox. Not set from project env before trust
PLAYWRIGHT_BROWSERS_PATH
Undocumented: Only the program shows this item. It can change without notice.
Forms part of the key of the local Chrome search for artifact preview.TextLocal sessions with artifact preview. Not set from project env before trust
PREFIX
Documented: An official docs page names this item.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Gives the Termux install prefix. Claude Code uses $PREFIX/tmp for daemon and socket paths.Text. Used only when TERMUX_VERSION is set. Else /tmpTermux (Android). Not set from project env before trust
PROGRAMDATA
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Gives the Windows ProgramData folder. Claude Code uses it to find the Start Menu folder and as a protected env name in shell checks.Text. Looked up as ProgramData, then PROGRAMDATA, then ALLUSERSPROFILEWindows. Not set from project env before trust
ProgramData
Documented: An official docs page names this item.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Gives the Windows ProgramData folder for the sandbox runtime and the Azure Arc token path.Text. The sandbox throws ProgramData is not set when it is missingWindows. Not set from project env before trust
ProgramFiles
Documented: An official docs page names this item.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Gives the Windows Program Files folder. Claude Code uses it to locate PowerShell and Azure Arc tools.TextWindows. Not set from project env before trust
PROJECT_DOMAIN
Undocumented: Only the program shows this item. It can change without notice.
Marks the host as Glitch in deployment-environment detection.TextAll platforms. Not set from project env before trust
PWD
Documented: An official docs page names this item.
Holds the standard working directory. Claude Code adds it as a session directory when it differs from the original cwd.Text. Used in startup permission setup and shell-expression checksAll sessions. Not set from project env before trust
RAILWAY_ENVIRONMENT_NAME
Undocumented: Only the program shows this item. It can change without notice.
Marks the host as Railway in deployment-environment detection.TextAll platforms. Not set from project env before trust
RAILWAY_SERVICE_NAME
Undocumented: Only the program shows this item. It can change without notice.
Marks the host as Railway in deployment-environment detection.TextAll platforms. Not set from project env before trust
RENDER
Undocumented: Only the program shows this item. It can change without notice.
Marks the host as Render in deployment-environment detection.TextAll platforms. Not set from project env before trust
REPL_ID
Undocumented: Only the program shows this item. It can change without notice.
Marks the host as Replit in deployment-environment detection.TextAll platforms. Not set from project env before trust
REPL_SLUG
Undocumented: Only the program shows this item. It can change without notice.
Marks the host as Replit in deployment-environment detection.TextAll platforms. Not set from project env before trust
REQUESTS_CA_BUNDLE
Undocumented: Only the program shows this item. It can change without notice.
Sets the CA bundle path for Python requests. Claude Code sets it in the egress-proxy and sandbox child env.Text. Listed with the other CA variablesSessions with the agent proxy or sandbox. Not set from project env before trust
RUNNER_ENVIRONMENT
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Holds the GitHub Actions runner kind. github-hosted marks a hosted runner in diagnostics.Text. Read only when GITHUB_ACTIONS is trueGitHub Actions. Not set from project env before trust
RUNNER_OS
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Holds the GitHub Actions runner OS. Claude Code reports it in telemetry.Text. Read only when GITHUB_ACTIONS is trueGitHub Actions. Not set from project env before trust
SESSIONNAME
Undocumented: Only the program shows this item. It can change without notice.
Holds the Windows console session name. Claude Code only records whether it is set, as telemetry about the terminal.Text. Any non-empty string. No behavior changeAll sessions, telemetry only
SPACE_CREATOR_USER_ID
Undocumented: Only the program shows this item. It can change without notice.
This is a Hugging Face Spaces variable. Claude Code uses it to detect the huggingface-spaces deployment environment for telemetry.Text. Non-empty string means presentAll sessions, telemetry only
SSH_AUTH_SOCK
Undocumented: Only the program shows this item. It can change without notice.
Holds the SSH agent socket. The agent proxy tests whether it is unset before it sets up git access.Text. Non-empty string. Used with GIT_SSH_COMMAND in a check on the agent proxy git setupAgent proxy (remote sessions)
SSH_CLIENT
Undocumented: Only the program shows this item. It can change without notice.
Marks an SSH session. Claude Code uses it to decide not to open a browser and for terminal detection.Text. Non-empty string means SSH. One of SSH_CONNECTION, SSH_TTY or this on WindowsAll sessions
SSH_CONNECTION
Undocumented: Only the program shows this item. It can change without notice.
Marks an SSH session. Claude Code treats the terminal as remote and skips opening a browser.Text. Non-empty string. Sets the terminal ssh flagAll sessions
SSH_TTY
Undocumented: Only the program shows this item. It can change without notice.
Marks an SSH session. Used with SSH_CONNECTION and SSH_CLIENT in Windows terminal checks and in the no-browser check.Text. Non-empty string means present. Also recorded as hasSshTty in the environment reportAll sessions
STY
Undocumented: Only the program shows this item. It can change without notice.
Holds the GNU screen session id. Claude Code uses it to detect a screen multiplexer.Text. Non-empty string. Sets the multiplexer to screen when TMUX is not setAll sessions
SYSTEMROOT
Undocumented: Only the program shows this item. It can change without notice.
Holds the Windows system directory. Claude Code uses it to find powershell.exe and other Windows tools.Text. Non-empty string. Falls back to SystemRoot, then to windir, then to C:\WindowsWindows
SystemRoot
Documented: An official docs page names this item.
Holds the Windows system directory in its usual mixed case. Claude Code reads it as a fallback and sets it in a clean git env.Text. Non-empty string. On Windows a sanitized env sets it to C:\WindowsWindows
TERM
Documented: An official docs page names this item.
Holds the terminal type. Claude Code reads it to pick color level, key dialect, and terminal-feature support.Text. Non-empty string. Names like xterm-kitty or xterm-ghostty raise the color level to 3All sessions
TERM_PROGRAM
Documented: An official docs page names this item.
Holds the terminal program name. Claude Code reads it to detect vscode, iTerm.app, ghostty, tmux, and others and tune features.Text. Non-empty string. Used for color level, hyperlinks, clipboard and key supportAll sessions
TERM_PROGRAM_VERSION
Undocumented: Only the program shows this item. It can change without notice.
Holds the terminal program version. Claude Code reads the major version to pick a color level for iTerm.app and a hyperlink check for tmux.Text. Non-empty string. For example iTerm2 major 3 or later gives true colorAll sessions
TERMINAL_EMULATOR
Undocumented: Only the program shows this item. It can change without notice.
JetBrains sets it to JetBrains-JediTerm. Claude Code uses it to detect a JetBrains IDE terminal.Compared to JetBrains-JediTerm. On non-macOS it sets the terminal name to pycharmAll sessions, JetBrains terminals
TERMINATOR_UUID
Undocumented: Only the program shows this item. It can change without notice.
Holds the Terminator terminal id. Claude Code records only whether it is set, as a telemetry flag.Text. Non-empty string means present. No behavior changeAll sessions, telemetry only
TF_BUILD
Undocumented: Only the program shows this item. It can change without notice.
Names Azure Pipelines for the terminal color level.Presence test together with AGENT_NAME. Gives color level 1 in one helper and 4 in anotherAll sessions
TILIX_ID
Undocumented: Only the program shows this item. It can change without notice.
Holds the Tilix terminal id. Claude Code records only whether it is set, as a telemetry flag.Text. Non-empty string means present. No behavior changeAll sessions, telemetry only
TMUX
Documented: An official docs page names this item.
Tmux sets it. Claude Code uses it to detect tmux, to find the tmux socket, and to tune colors and features.Text. Non-empty string. Also gives a true color step down, and blocks some terminal features inside tmuxAll sessions
TMUX_PANE
Undocumented: Only the program shows this item. It can change without notice.
Tmux sets it. Claude Code uses it to find the current pane when it runs tmux commands.Text. Non-empty string. Needs TMUX as wellTmux
TRAVIS
Undocumented: Only the program shows this item. It can change without notice.
Names Travis CI for the terminal color level.Presence test, only when CI is set. Gives color level 1All sessions
USER
Documented: An official docs page names this item.
Holds the login name. Claude Code uses it as a fallback for the user name, for example in a browser bridge socket name.Text. Non-empty string. Read when the OS user lookup fails, then USERNAME, then defaultAll sessions
USERNAME
Undocumented: Only the program shows this item. It can change without notice.
Holds the Windows user name. Claude Code uses it as a name fallback and to spot Windows container users.Text. Non-empty string. ContainerAdministrator or ContainerUser turns off a registry sweepWindows
USERPROFILE
Documented: An official docs page names this item.
Holds the Windows home directory. Claude Code uses it to find Desktop, Documents, Downloads, and IDE lock files, and in WSL path mapping.Text. Non-empty string. Used on Windows and WSLWindows and WSL
UV_THREADPOOL_SIZE
Undocumented: Only the program shows this item. It can change without notice.
Holds the Node libuv thread pool size. Claude Code only prints it in MCP HTTP debug logs.Text. Non-empty string. Shown as default when unsetMCP HTTP transport debug
VERCEL
Undocumented: Only the program shows this item. It can change without notice.
This is a Vercel variable. Claude Code uses it to detect the vercel deployment environment for telemetry.On or off. Truthy stringAll sessions, telemetry only
VSCODE_GIT_ASKPASS_MAIN
Undocumented: Only the program shows this item. It can change without notice.
VS Code sets this path. Claude Code checks it to tell Cursor from VS Code and to find remote VS Code servers.Text. Non-empty string. A path with cursor means CursorVS Code and Cursor terminals
VTE_VERSION
Undocumented: Only the program shows this item. It can change without notice.
Holds the VTE terminal version. Claude Code uses it for terminal bug workarounds and hyperlink support.A number. A value under 5300 gets a workaround for unknown sequence printing. 4400 or more enables a featureVTE terminals
WAYLAND_DISPLAY
Undocumented: Only the program shows this item. It can change without notice.
Holds the Wayland display name. Claude Code uses it to detect whether a local display exists, and to pick a clipboard tool.Text. Non-empty string. With no DISPLAY and no WAYLAND_DISPLAY on Linux, it takes no browser or GUI pathLinux
WEBSITE_SITE_NAME
Undocumented: Only the program shows this item. It can change without notice.
This is an Azure App Service variable. Claude Code uses it to detect the azure-app-service environment for telemetry.Text. Non-empty string means presentAll sessions, telemetry only
WEBSITE_SKU
Undocumented: Only the program shows this item. It can change without notice.
This is an Azure App Service variable. Claude Code uses it to detect the azure-app-service environment for telemetry.Text. Non-empty string means presentAll sessions, telemetry only
WEZTERM_PANE
Undocumented: Only the program shows this item. It can change without notice.
Holds the WezTerm pane id. Claude Code uses it to exclude WezTerm when it detects a VTE-based terminal.Text. Non-empty string. Used as a presence check onlyAll sessions
WINDIR
Undocumented: Only the program shows this item. It can change without notice.
Holds the Windows directory. Claude Code reads it once at load to build the explorer.exe path for a Windows app filter.Lowercased with a trailing backslash. Also a fallback for powershell.exe pathWindows
WSL_DISTRO_NAME
Undocumented: Only the program shows this item. It can change without notice.
Holds the WSL distro name. Claude Code uses it to detect WSL and to match IDE workspace paths.Text. Non-empty string. Either this or WSL_INTEROP on Linux sets the platform to wslWSL
WSL_INTEROP
Undocumented: Only the program shows this item. It can change without notice.
Holds the WSL interop socket. Claude Code uses it to detect WSL.Text. Non-empty string. Either this or WSL_DISTRO_NAME on Linux sets the platform to wslWSL
WT_SESSION
Undocumented: Only the program shows this item. It can change without notice.
Holds the Windows Terminal session id. Claude Code uses it to detect Windows Terminal for key and link support.Text. Non-empty string. Enables hyperlinks and some featuresWindows Terminal
XTERM_VERSION
Undocumented: Only the program shows this item. It can change without notice.
Holds the xterm version. Claude Code uses it to tell xterm from a VTE terminal and as a telemetry flag.Text. Non-empty string. Presence check onlyAll sessions
ZDOTDIR
Documented: An official docs page names this item.
Holds the zsh config directory. Claude Code uses it to find the zsh rc files when it checks for a claude alias.Text. Non-empty string. Falls back to the home dirZsh users
ZED_TERM
Undocumented: Only the program shows this item. It can change without notice.
This is the Zed terminal marker. Claude Code uses it to detect the Zed terminal for hyperlink and feature support.Text. Non-empty string. Presence check onlyZed terminal
ZELLIJ
Undocumented: Only the program shows this item. It can change without notice.
This is the Zellij marker. Claude Code uses it to detect the zellij multiplexer.Any value other than undefined. Turns off some terminal featuresZellij

How It Works​

Many rows here are detection names. Claude Code checks whether a name is set to learn the terminal, CI service, or host. For example, TRAVIS or GITLAB_CI tell it that it runs in CI, which affects the terminal color level. You rarely set these by hand. Set one only to fake or hide a detection result.

Source: the program (variable names found in the 2.1.312 binary) and the Environment Variables page of the official docs.