Command reference ยท Claude Code
/remote-env
Selects the default environment for cloud agents.
/remote-env sets which cloud environment is used as the default when you start a new cloud session from the terminal, for example with claude --cloud. Cloud environments determine network access, environment variables, and a setup script that runs before the session starts. If you've only created a single environment so far, the command simply shows its current configuration. /remote-env only selects the default environment โ creating, editing, or archiving environments only works via the web interface at claude.ai/code.
The command requires signing in with your claude.ai subscription (Claude Code on the web is currently a research preview for Pro, Max, and Team users, as well as Enterprise users with Premium or Chat+Claude Code seats) and isn't available on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry, since cloud sessions don't run there.
โ WHEN TO USE IT?
Set the default environment once
Before you start cloud sessions more often via claude --cloud or claude.ai/code, use /remote-env to choose the default environment so it doesn't need to be selected again every time
Check the current environment configuration
With only one environment created, run /remote-env to view the currently configured environment along with its settings
โ WHEN NOT TO?
Creating or editing a new environment
/remote-env only selects the default environment; adding, editing, and archiving environments only works via the web interface.
Better: Open the environment selector at claude.ai/code and use 'Add environment' or an environment's settings icon there
Usage via Amazon Bedrock, Vertex, or Foundry
Cloud sessions run exclusively on Anthropic infrastructure and aren't available via third-party platforms like Amazon Bedrock.
Better: Keep working locally as normal, or sign in with a direct claude.ai account for cloud sessions
SOURCES
- Claude Code docs (official) โ code.claude.com