Remote and Cloud Sessions
These variables matter when Claude Code runs away from your terminal. They cover cloud sessions, the remote bridge, the desktop app, the Chrome extension, Cowork, and Slack. Most are set by the host, and Claude Code reads them. Set one yourself only when you run your own host.
This page lists 139 variables. Many are set by the host program that starts Claude Code, so you can change them only if you control that process. They live in the environment of the Claude Code process.
Example
CLAUDE_CODE_REMOTE=true claude -p "Summarize the repo"
CLAUDE_CODE_REMOTE=true marks the run as a cloud session. Claude Code then raises its Node heap limit to 8192 MB.
Variables
The table is sorted by name. See Environment Variables for what each column and badge means.
| Variable | Status | What it does | Values and default | Notes |
|---|---|---|---|---|
CCR_ | Undocumented Gated | Gives the agent proxy CA certificate as base64 PEM. Claude Code uses it instead of fetching the CA. | Text. Read once at startup then removed from the env. A bad value logs a warning and the CA is fetched | Cloud remote sessions |
CCR_ | Undocumented Gated | Turns on the CA file watch of the agent proxy relay. | On or off. Read at agent proxy startup with CCR_. Purpose of the watch is not shown beyond the flag name | Cloud remote sessions |
CCR_ | Undocumented Gated | Turns on the hosted agent proxy relay that routes git and GitHub traffic of a remote session. | On or off. Needs CLAUDE_ true and a session id and token. Off by default | Cloud remote sessions |
CCR_ | Undocumented Gated | Lists hosts for the frame tunnel. A malformed value logs a warning and keeps the gateway routes. | Text. Unset means no frame tunnel host | Cloud remote sessions |
CCR_ | Undocumented Gated | Lists the hosts that the agent proxy relays in selective mode. Other hosts use normal networking. | Text. Comma separated string. An empty list in selective mode fails closed and tunnels everything | Cloud remote sessions |
CCR_ | Undocumented Gated | Limits the proxy bypass list of the agent proxy relay to local hosts only. | On or off. Used with standalone mode and in the no-proxy list choice | Cloud remote sessions |
CCR_ | Undocumented Gated | Turns off the receive gate of the agent proxy relay. | On or off. Removed from the env after reading | Cloud remote sessions |
CCR_ | Undocumented Gated | Selects the relay mode of the agent proxy. agent_ starts a standalone relay and selective relays only listed hosts. | Text. Standalone mode needs CLAUDE_ to be byoc. Removed from the env after reading | Cloud remote sessions |
CCR_ | Undocumented Gated | Gives the URL of the standalone agent proxy relay in a bring-your-own-cloud session. | Text. Used when the relay mode is agent_. An invalid URL stops startup | Cloud byoc sessions |
CCR_ | Undocumented Gated | Gives the file descriptor number that holds the relay token for a tool container daemon. | A number. Digits only, number 3 or more. Read once then removed from the env | Cloud tool containers |
CCR_ | Undocumented Gated | Turns off the upload gate of the agent proxy relay. | On or off. Removed from the env after reading | Cloud remote sessions |
CCR_ | Undocumented Gated | Carries auto mode allow rules from the host to a self-hosted runner. The runner removes it from the session env. | Read from session environment_ only when CCR_ is 1. Entries with line breaks or blanks are refused | Self-hosted runner (cloud byoc) |
CCR_ | Undocumented Gated | Switches on the host-sent auto mode rules for a self-hosted runner. The runner removes it from the session env. | Active only when the session environment_ value is exactly 1. Set to undefined for the child | Self-hosted runner (cloud byoc) |
CCR_ | Undocumented Gated | Carries auto mode environment entries from the host to a self-hosted runner. The runner removes it from the session env. | Read from session environment_ only when CCR_ is 1. Set to undefined for the child | Self-hosted runner (cloud byoc) |
CCR_ | Undocumented Gated | Carries auto mode soft_ rules from the host to a self-hosted runner. The runner removes it from the session env. | Read from session environment_ only when CCR_ is 1. Set to undefined for the child | Self-hosted runner (cloud byoc) |
CCR_ | Undocumented Gated | Turns on a delta reset path in the CCR git fetch step and adds a delta_ field to startup timing data. | On or off. Truthy check on the env value. The fetch step then checks HEAD is a valid commit before it fetches | Cloud remote and self-hosted runner sessions |
CCR_ | Undocumented Gated | Lets claude -- seed a cloud session from an uploaded local git bundle instead of a remote clone. | On or off. Not used for byoc environments | Local CLI, cloud session start |
CCR_ | Documented | Forces claude -- to bundle and upload the local repository instead of cloning from its remote. | On or off. Docs name only 1. Skipped for byoc environments and agent sessions | Local CLI, cloud session start |
CCR_ | Undocumented Gated | Sets how the guard acts when an -- cloud start targets the default branch. The guard has three modes. | One of a fixed set of values. Enum enforce, observe, off. Unset gives enforce, or observe when a feature flag is on | Local CLI, cloud session start |
CCR_ | Undocumented Gated | Carries the network prefetch result of a CCR runner. Claude Code only reports it as prefetch_ in startup timing data. | Text | Cloud remote and self-hosted runner sessions |
CCR_ | Undocumented Gated | Carries the prewarm stat result of a CCR runner. Claude Code only reports it as prewarm_ in startup timing data. | Text | Cloud remote and self-hosted runner sessions |
CCR_ | Undocumented Gated | Carries the prewarm VDA result of a CCR runner. Claude Code only reports it as prewarm_ in startup timing data. | Text | Cloud remote and self-hosted runner sessions |
CCR_ | Undocumented Gated | Marks a CCR session profile. It turns off default inline tools and prompt cache keepalive, and enables the session ingress check. | On or off. The ingress check also needs SESSION_ and a session id that starts with cse_ | Cloud remote sessions |
CCR_ | Undocumented Gated | Makes the self-hosted runner open a server-sent events stream for work hints, so it wakes sooner. | On or off. Logs CCR_ when on | Self-hosted runner |
CCR_ | Undocumented Gated | Names a start marks key that the self-hosted runner blanks in the session env. It is also tied to prewarm marker files in /. | Set to undefined in the child env | Self-hosted runner |
CLAUDE_ | Undocumented | Holds the host app grant for local MCP servers. Artifact publish uses it to check the MCP manifest of a page. | raw, parsed by a grant reader. The app that launches the session sets it | Artifact publish in a host-launched session. Not set from project env before trust |
CLAUDE_ | Undocumented | Tells a reattached bridge session to skip the history backfill. | On or off. Set to 1 by Claude Code on a reattach spawn. The new process reads it once and deletes it | Remote Control bridge reattach. Not set from project env before trust |
CLAUDE_ | Undocumented | Makes a reattached bridge session send only outbound (mirror mode). Without it the reattach is a full bridge. | On or off. Claude Code sets 1 unless the caller passes false. It feeds the bridge enable logic | Remote Control bridge reattach. Not set from project env before trust |
CLAUDE_ | Undocumented | Passes the owner account UUID to a reattached bridge session. | Text. Set by Claude Code on a reattach spawn. The new process reads it once and deletes it | Remote Control bridge reattach. Not set from project env before trust |
CLAUDE_ | Undocumented | Passes the owner organization UUID to a reattached bridge session. | Text. Set by Claude Code on a reattach spawn. The new process reads it once and deletes it | Remote Control bridge reattach. Not set from project env before trust |
CLAUDE_ | Undocumented | Passes the last sequence number to a reattached bridge session. | A number. Whole number. Claude Code sets it only when the number is above 0 | Remote Control bridge reattach. Not set from project env before trust |
CLAUDE_ | Undocumented | Gives the bridge session id that a relaunched process must reattach to. | Text. Set by Claude Code on a reattach spawn. The new process reads it once and deletes it | Remote Control bridge reattach. Not set from project env before trust |
CLAUDE_ | Undocumented | Names the paired browser extension device for the Chrome bridge. | Text. Must match a device id pattern. Else Claude Code logs a warning and ignores it | Claude in Chrome bridge. Not set from project env before trust |
CLAUDE_ | Undocumented | Sets the browser tab group key for Claude Code browser calls. | Text. Honored only with CLAUDE_. Claude Code then unsets it | Claude in Chrome in remote sessions. Not set from project env before trust |
CLAUDE_ | Documented | Names a marker file that tells Claude Code you are at the computer. While it exists, Claude Code skips Remote Control mobile pushes. | Text. The code checks with a file stat on each presence check | Remote Control. Not set from project env before trust |
CLAUDE_ | Undocumented Gated | Turns on an attachments-in-user-data step in cloud sessions. The step stops when data retention rules apply. | On or off. Needs CLAUDE_ and a cloud session | Cloud sessions |
CLAUDE_ | Undocumented | Marks a Remote Control child session as allowed to use artifacts. Set by Claude Code for the child. | On or off. Claude Code sets 1 in the child env. It first clears the inherited value | Remote Control child sessions |
CLAUDE_ | Undocumented | Makes auto mode the default mode of a Remote Control child session. Set by Claude Code for the child. | On or off. Set to 1 in the child env. It also ignores default auto if disable is set | Remote Control child sessions |
CLAUDE_ | Undocumented | Marks a Remote Control child session that uses machine settings. Set by Claude Code for the child. | On or off. Set to 1 in the child env | Remote Control child sessions |
CLAUDE_ | Undocumented | Marks a Remote Control child that carries the bridge MCP config. Set by Claude Code. | One of a fixed set of values. Enum 1 or spent. 1 means a child | Remote Control sessions |
CLAUDE_ | Undocumented | Carries the owner account UUID into a Remote Control child session. Set by Claude Code. | Text. The child reads it as the bridge owner identity | Remote Control child sessions |
CLAUDE_ | Undocumented | Carries the owner organization UUID into a Remote Control child session. Set by Claude Code. | Text. Used with CLAUDE_ | Remote Control child sessions |
CLAUDE_ | Undocumented | Holds the SHA-256 of the appended system prompt that the bridge passes to a carrier child. The child checks the prompt file against it. | Text. Set by Claude Code. The child removes it after the first read | Remote Control carrier children |
CLAUDE_ | Documented | Holds the session_ ID of the active Remote Control connection. Set by Claude Code. | Text. Set while connected and deleted when the connection ends. Claude Code removes it from some child envs | Remote Control, Bash and hook subprocesses |
CLAUDE_ | Undocumented | Carries the source directory into a Remote Control child session. Set by Claude Code. Purpose of the read side is not clear from the bundle. | Text. Set from the spawn option source | Remote Control child sessions |
CLAUDE_ | Undocumented | Picks the env_ attachment mode for the file delivery tool. | On or off. It ranks after CLAUDE_ and the REPL bridge, and before the cloud and BYOC modes | Brief mode attachments |
CLAUDE_ | Undocumented | Starts the hydrate prefetch early for a resumed remote session. | On or off. Needs an SDK URL and a resume option | Cloud sessions |
CLAUDE_ | Undocumented | Starts the remote connection early for a resumed remote session. | On or off. Needs an SDK URL and a resume option | Cloud sessions |
CLAUDE_ | Undocumented | Opens the cloud session event stream over a worker socket. | On or off. Needs a cloud session where Claude Code owns the process | Cloud sessions |
CLAUDE_ | Undocumented | When set, the Chrome MCP check reports a denial by the parent organization policy. | On or off. Claude Code deletes it when it builds some child envs | Chrome integration |
CLAUDE_ | Undocumented | Holds the cloud session ID for shell commands that Claude Code runs. Set by Claude Code. | Text. Added to the extra env of spawned shell commands | Cloud sessions |
CLAUDE_ | Undocumented | Reports the container id in session metadata as claude. Its presence also marks a remote or container session. | Text. No default. Set by the container host | Remote and container sessions |
CLAUDE_ | Undocumented | Gives the desktop app version to Claude Code. Claude Code reads it only for the desktop entrypoints. | Text. Used when CLAUDE_ is claude- or local-. Else ignored | Desktop app |
CLAUDE_ | Undocumented | Marks turn handoff as disabled in the admission check for SDK and remote sessions. | On or off, off by default | SDK and remote sessions |
CLAUDE_ | Undocumented | Stops the synced working-file syncer in remote sessions and blocks the self-hosted admitted state. | On or off, off by default | Remote sessions with CLAUDE_ and an SDK URL |
CLAUDE_ | Documented | Starts the session with Chrome integration on or off, ahead of claude. | On, off, or unset. -- and -- win. Remote and Cowork sessions also need this var or the flag | All sessions. Not set from project env before trust |
CLAUDE_ | Undocumented Gated | Forces the remote session recap on or off. | On, off, or unset, off by default. Unset uses a feature flag, default off | Remote sessions that report metadata |
CLAUDE_ | Undocumented | Names the remote runner kind. bridge and byoc change session and bridge behavior. | Text | Remote and bridge sessions |
CLAUDE_ | Undocumented | Sends the runner version in the x- header on worker requests. | Text. Skipped when empty | Remote runner sessions |
CLAUDE_ | Undocumented | Forces the remote control nudge after a long turn. Uses a 5 s threshold, probability 1, and no impression limit. | On or off. Second env accessor, truthy check. Else a feature flag | Interactive |
CLAUDE_ | Undocumented Gated | Allows cloud peer access for cross-session messaging. | On or off, off by default. Else a feature flag. Needs first-party auth and allow_ | First-party sessions with an org |
CLAUDE_ | Undocumented | Sets report for the remote session worker. It takes effect only when CLAUDE_ is also on. | On or off. Both values must be true | Remote session worker |
CLAUDE_ | Undocumented | Marks the session as Cowork. It allows synced skills and treats the session like a remote one for state and cache checks. | On or off. Checked next to CLAUDE_ and the remote_ entrypoint | Cowork |
CLAUDE_ | Undocumented | Makes a cloud session upload the working tree the previous way, as a git bundle. | On or off. Ignored when a settings file sets it or when settings move HOME or CLAUDE_ | Cloud sessions (git bundle upload) |
CLAUDE_ | Undocumented | Feeds the answer value of the parked-permission resume options. No visible effect in a print-mode probe (Probes). | A number of milliseconds, 2000 by default. Whole number of 0 or more. Read next to CLAUDE_ | All sessions |
CLAUDE_ | Undocumented | Feeds the runs field of the parked-permission resume options. No visible effect in a print-mode probe (Probes). | On or off | All sessions |
CLAUDE_ | Undocumented | Feeds the parked field of the parked-permission resume options. No visible effect in a print-mode probe (Probes). | On or off | All sessions |
CLAUDE_ | Documented | Marks a cloud session. When it is true Claude Code raises the Node heap limit to 8192 MB. | On or off. Set automatically in cloud sessions. Many code paths test it | Cloud sessions |
CLAUDE_ | Undocumented | Names the kind of remote environment. The value self_ with CLAUDE_ marks a self-hosted runner. | Text. Also copied into telemetry as remote | Cloud and runner sessions |
CLAUDE_ | Undocumented | Reports a hermetic mode flag. It is true only when CLAUDE_ is also set. No visible effect in a print-mode probe (Probes). | On or off | Cloud sessions |
CLAUDE_ | Documented Gated | Names a file with the MCP servers that a runner delivered. Claude Code loads it as a dynamic scope config. | Text. Read only when CLAUDE_ is true and CLAUDE_ is byoc | Self-hosted runner sessions |
CLAUDE_ | Undocumented | Gives the SDK URL of a remote session. Claude Code uses it when no other URL is set and the URL is valid. | Text. Claude Code also sets it from a stored URL in bridge or byoc mode | Bridge and byoc sessions |
CLAUDE_ | Undocumented Gated | Sends session keepalive callbacks during heartbeat and long hook runs. Hook keepalive also needs a feature flag. | On or off | Cloud sessions |
CLAUDE_ | Documented | Holds the ID of the current cloud session. | Text. Set by Claude Code in cloud sessions and by a self-hosted runner. Telemetry and the session ID parser read it | Cloud sessions |
CLAUDE_ | Undocumented | The value review marks a review-origin session. Such sessions skip some token disk writes. | Text. Compared to review | Cloud sessions |
CLAUDE_ | Documented | Holds the UUID form of the remote session ID. A self-hosted runner puts it in the env of the session it starts. | Set by a runner, from the session ID | Self-hosted runner sessions |
CLAUDE_ | Undocumented | Names a file that replaces the remote settings fetch. The log says skipping API fetch. | Text. Read directly | All sessions |
CLAUDE_ | Undocumented | Turns on the remote tools forward mode that gates the served tools code. Details are not clear from the bundle. | On or off. True only for true. Telemetry also notes whether it is present | Sessions that serve tools to cloud sessions |
CLAUDE_ | Undocumented | A host passes a grant for unattended runs. Claude Code stores it with set and then removes the var. | Text. Read once at startup and removed from the env | Host apps |
CLAUDE_ | Undocumented Gated | Overrides a feature flag. No visible effect in a print-mode probe (Probes). | Off by default. Read from the env object | Sessions that serve tools to cloud sessions |
CLAUDE_ | Undocumented | Pins remote tool serving to the stored claude.ai login. It stops with an error if the endpoint is not Anthropic's own service. | On or off. True only for true. A token from the env does not satisfy it | Sessions that serve tools to cloud sessions |
CLAUDE_ | Undocumented | Picks the remote tools policy mode. Details are not clear from the bundle. | Unset or parity gives parity. Any other value gives interim | Sessions that serve tools to cloud sessions |
CLAUDE_ | Undocumented | Turns off serving local tools to cloud sessions when false. A bundle message says it turns the feature off. | Unset gives on. A true value gives on | Interactive sessions with a cloud link |
CLAUDE_ | Undocumented | A false value turns off the session channel of the remote tools module. Details are not clear from the bundle. | On or off. Compared to the boolean false only | Sessions that serve tools to cloud sessions |
CLAUDE_ | Undocumented | Maps repo names to local checkout paths for multi-repo sessions. File attribution uses the paths. | Text. A bad value logs Failed to parse env map. Pairs with CLAUDE_ | Sessions with several repos |
CLAUDE_ | Undocumented | Marks a session that started from a claude.ai chat. Only the value claude_ is valid. | One of a fixed set of values. Enum with one value claude_. Used in an origin check, in account context, and in the permission classifier input | Claude.ai chat sessions |
CLAUDE_ | Undocumented Gated | Names a GrowthBook feature whose string value replaces the system prompt on each turn. An empty value keeps the normal prompt. | Text. Read only when CLAUDE_ is set. The feature name goes to a flag lookup | Remote sessions |
CLAUDE_ | Undocumented | Sets the tee option of the remote I/O transport. The effect of that option is not shown here. | On or off. Claude Code sets it to 1 for self-hosted runner children | Remote I/O and self-hosted runner |
CLAUDE_ | Undocumented | Marks a child as a CCR v2 session. | On or off. Set by Claude Code to 1 in the environment of self-hosted runner children | Self-hosted runner |
CLAUDE_ | Undocumented | Sets a low free disk level in GiB. The program reads it as disk and forwards it to the remote env. | A number, 0 by default | Likely remote or cloud sessions. Not set from project env before trust |
CLAUDE_ | Undocumented | Sets a low free memory level in GiB. The program reads it as memory and forwards it to the remote env. | A number, 0 by default | Likely remote or cloud sessions. Not set from project env before trust |
CLAUDE_ | Undocumented | Sends Web through the CCR proxy when a CCR session is available. | On or off. Works only with the first-party provider | Cloud sessions, first-party |
CLAUDE_ | Undocumented | Sends Web through the CCR proxy when a CCR session is available. | On or off. Works only with the first-party provider | Cloud sessions, first-party |
CLAUDE_ | Undocumented | Counts worker restarts. A value above 1 marks a restored worker, so tools are not announced again. | A number, 1 by default. Integer, default 1. Also passed in the init data when the remote check is true | Remote workers |
CLAUDE_ | Documented | Sets the prefix of auto-generated Remote Control session names. | - | - |
CLAUDE_ | Undocumented | Overrides the URL of the device bridge for remote tools. | A URL | - |
CLAUDE_ | Undocumented Gated | Passes JSON arguments to the workflow script of a remote session. | - | - |
CLAUDE_ | Undocumented Gated | Holds the workflow script that a remote session runs through a fixed command. | - | - |
CLAUDE_ | Undocumented | Names an extra file descriptor that the remote IO layer writes to. | - | - |
CLAUDE_ | Documented | Gives runner hooks the API base URL. The code-sign helper uses it as a last fallback. | A URL | - |
CLAUDE_ | Documented | Tells hooks and the child session which client platform started the runner session. | - | - |
CLAUDE_ | Undocumented | Stops the runner from reporting awaiting- when the child waits at a prompt after a turn ends. | - | - |
CLAUDE_ | Documented | Sets the -- of the runner git fetch. | - | - |
CLAUDE_ | Documented | Sets a cap in ms for the server-progress wait of the runner git fetch. | A number of milliseconds | - |
CLAUDE_ | Documented | Gives lifecycle hooks the session ID. The code-sign helper reads it when CLAUDE_ is unset. | Text | - |
CLAUDE_ | Documented | Skips the check for a . directory after the checkout hook ends. For non-git source control. | - | - |
CLAUDE_ | Undocumented | Tells the runner to trust the prewarmed canonical checkout and skip its validation. | - | - |
CLAUDE_ | Documented | Turns on the Anthropic git proxy for the self-hosted runner. | - | - |
CLAUDE_ | Undocumented | A presence check in system prompt assembly. With CLAUDE_ it can skip an optional prompt section. A Probes run saw no effect. | A path | - |
CLAUDE_ | Undocumented | Sets the root directory for staged upload files in remote sessions. | - | - |
LOCAL_ | Undocumented | Points the bridge URL to ws://, like USE_. | - | - |
SELF_ | Documented Gated | Sets the base directory for repository checkouts and per-session state. | Text. Flag --. Default is a POSIX container path | Self-hosted runner |
SELF_ | Documented Gated | Sets the label sent at registration and shown beside the runner in the console. | Text, the by default. Trimmed string, default the hostname. Flag -- | Self-hosted runner |
SELF_ | Documented Gated | Writes a global git identity (Claude <noreply@anthropic.) and commit signing at runner start. | On or off. Flag -- | Self-hosted runner |
SELF_ | Documented Gated | Sets the guard mode for settings committed in the repo. | Text. An invalid value fails at startup. Flag -- | Self-hosted runner |
SELF_ | Undocumented Gated | Writes each work-order JWT, decoded JSON and hook stderr to files in this directory. | Text. Dev only, files are pruned after 5 min. Flag -- | Self-hosted runner orchestrator |
SELF_ | Documented Gated | Writes live tokens to disk for debugging. | Text. Debug only, not for production. Flag -- | Self-hosted runner |
SELF_ | Documented Gated | On the first SIGTERM, stops new work and waits up to this long before draining. | A number of milliseconds, 0 by default. The flag -- sets it | Self-hosted runner |
SELF_ | Documented Gated | Keeps the runner warm and polling this long after sessions end. | A number of milliseconds, 0 by default. Max 604800 s. The flag -- sets it | Self-hosted runner |
SELF_ | Documented Gated | Names a file whose presence at drain time reports the exit as a host drain. | Text, unset by default. Telemetry only. The first line may hold a Unix time | Self-hosted runner |
SELF_ | Documented Gated | On SIGTERM, waits up to this long for running turns and background tasks before stopping the session. | A number of milliseconds, 0 by default. Max 86400 s. The flag -- sets it | Self-hosted runner |
SELF_ | Documented Gated | Gives the environment secret that the runner uses to authenticate. | Text. Trimmed string. The flag -- wins | Self-hosted runner |
SELF_ | Documented Gated | Sets the binary that the runner spawns for child sessions. | Text. Default is the runner's own binary. Flag -- | Self-hosted runner |
SELF_ | Documented Gated | Sets the port of the / HTTP listener. | A number, 8080 by default. Integer from 0 to 65535, default 8080. 0 disables it | Self-hosted runner |
SELF_ | Documented Gated | Names the directory of lifecycle hook scripts (checkout, command, post-session). | Text. Missing hooks use built-in behavior. Flag -- | Self-hosted runner |
SELF_ | Documented Gated | Names the host config directory that seeds each session's config dir. | Text. Falls back to CLAUDE_, then ~/.. An empty dir turns it off | Self-hosted runner |
SELF_ | Documented Gated | Chooses where the startup snapshot of the host config is kept. | Text. Another value throws | Self-hosted runner |
SELF_ | Documented Gated | Exits the runner if it gets no work for this long. | A number of milliseconds, never by default. Max 10080 min. The flag -- sets it | Self-hosted runner |
SELF_ | Documented Gated | Locks the runner to one account id at registration. | Text. Flag --. Only that account's sessions are assigned | Self-hosted runner |
SELF_ | Documented Gated | Copies runner logs to a file in append mode. | Text. Flag --. Stdout is unchanged | Self-hosted runner |
SELF_ | Documented Gated | Caps the wall-clock life of each session child. | A number of milliseconds, never by default. Max 10080 min. The flag -- sets it | Self-hosted runner |
⛔ SELF_ | Documented Gated | Deprecated alias of SELF_. | Text. Used only if the new name is unset. Prints a deprecation warning | Self-hosted runner |
SELF_ | Documented Gated | Sets the SIGTERM budget of the post-session hook. | A number of milliseconds. Positive number in ms. Flag -- sets it | Self-hosted runner |
SELF_ | Documented Gated | Pushes outcome branches to origin when the runner ends a session itself. | On or off. Flag --. Adds 30 s to the shutdown budget | Self-hosted runner |
SELF_ | Documented Gated | Deletes per-session state under the base dir when a session ends. | On or off, off by default. Another value throws. Flag -- | Self-hosted runner |
SELF_ | Documented Gated | Retires the runner at a Unix time, in seconds. | A number, never by default. Integer in seconds, valid from 1e9 to 1e11. Else ignored (0) | Self-hosted runner |
SELF_ | Documented Gated | Chooses which server auto-mode classifier lists a session may receive. | Text. Another value stops the runner. Flag -- | Self-hosted runner |
SESSION_ | Undocumented Gated | Sets the base URL of the session ingress for remote (CCR) sessions. It wins over ANTHROPIC_. | Text. Non-empty string. Reads as SESSION_ first, else ANTHROPIC_ | Remote sessions |
VITALS_ | Undocumented Gated | Sets the path of the guest vitals emitter binary for remote sessions. | Must be an absolute path. Else the log says vitals are disabled | Remote sessions |
How It Works
A host program starts Claude Code as a child process and passes variables to it. The child reads them to learn where it runs and how to reach the host. Check the Notes column: some variables are set by Claude Code itself and are not meant to be set by you.
Related Pages
- Environment Variables: how Claude Code reads variables and which value wins.
- SDK and Automation
- Undocumented Items: every item that only the program shows.
Source: the program (variable names found in the 2.1.304 binary) and the Environment Variables page of the official docs.