⌨️CLAUDE_CODE_REMOTE
Also known as CLAUDE_CODE_REMOTE=true
Set to true when Claude Code runs as a cloud session.
Think of it like
It is like a sign that tells you that you are on a boat, not at home.
Example
Lucy's SessionStart hook installs packages. On her laptop that is slow and not needed, so the hook only does it in the cloud.
Why it matters
A cloud machine starts empty, and a laptop does not. One hook can serve both.
Definition
Example code
bash
if [ "$CLAUDE_CODE_REMOTE" = "true" ]; then
npm ci
fiCommon mistake
Key takeaways
- 1true in the cloud. Set for you.
- 2For hooks. And setup scripts.
- 3Not CLAUDECODE. That is everywhere.