What
An environment variable is a named value set outside Claude Code that it reads at startup. Claude Code can run in a remote environment, a machine somewhere other than your own computer. It now has a dedicated check for one kind of these, a self-hosted "bring your own cloud" (BYOC) environment:
- The check is true only when
CLAUDE_CODE_REMOTEis set to a true value,CLAUDE_CODE_ENVIRONMENT_KINDisbyoc, andCLAUDE_CODE_REMOTE_ENVIRONMENT_TYPEisself_hosted. CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPEis added to a list of variables that already heldCLAUDE_CODE_REMOTE_HERMETIC_MODE,CLAUDE_CODE_HOSTED_DESKTOPandCLAUDE_CODE_ENVIRONMENT_KIND. The list appears to control which variables are passed along or allowed.- Both
CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPEandCLAUDE_CODE_ENVIRONMENT_KINDare now read in more places than before.
Why
If you run Claude Code in a self-hosted remote environment, it can now behave differently from other remote setups, and this setting now travels with the other environment settings.