Unclear What this check controls is not known, so its effect on remote sessions is unclear.
What
Claude Code has a check for whether it is running remotely. It now passes only when all of these are true:
- Claude Code has a remote session id or a container id
- the session is not a child session started by another session
CLAUDE_CODE_ENVIRONMENT_KINDis not set
Why
In practice, setting CLAUDE_CODE_ENVIRONMENT_KIND makes this check fail even in a remote session.
Names in the bundleCLAUDE_CODE_ENVIRONMENT_KIND
Documented inclaude-code/self-hosted-environments-configuration
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
What this check controls is not known, so its effect on remote sessions is unclear.