Run Claude Code agents in Depot's remote agent sandboxes: a secure, isolated environment in the cloud, where you can launch, resume, and share coding sessions.
You'll need a Depot account.
Install the Depot CLI on your machine to configure and launch remote sandboxes.
macOS
Install the Depot CLI with Homebrew:
brew install depot/tap/depotLinux
Install the Depot CLI with the installation script:
curl -L https://depot.dev/install-cli.sh | shAll platforms
Download the binary file for your platform from the Depot CLI releases page in GitHub.
To run Claude Code in remote agent sandboxes, configure your Anthropic credentials. You have two options:
Use the claude CLI to generate a new OAuth token:
claude setup-tokenThis will output a token that you can copy to use in the next step.

Set the token as a secret in your Depot organization:
depot claude secrets add CLAUDE_CODE_OAUTH_TOKEN --value <"claude-code-token">Generate an API key in the Anthropic web console. Learn how to get an API key in the Claude Docs.
Set the API key as a secret in your Depot organization:
depot claude secrets add ANTHROPIC_API_KEY --value <"anthropic-api-key">You can work with public and private Git repositories in your remote agent sandboxes. To use private Git repositories, either install the Depot Code app into your GitHub organization or set your Git credentials as secrets in your Depot organization.
To grant remote agent sandboxes access to clone and push changes to your private GitHub repositories, install the Depot Code app into your GitHub organization:

If you don't want to use the Depot Code app, you can set your Git credentials as secrets in your Depot organization to allow changes to your private repositories. The value of GIT_CREDENTIALS must be one of the following:
x-token as the username and the token you specify as the password.To set your Git credentials as secrets, run the following command:
depot claude secrets add GIT_CREDENTIALS --value <"your-credentials">To create a remote agent sandbox, run the depot claude command. For example:
depot claude \
--session-id feature-auth \
--repository https://github.com/foo/bar \
--branch main \
"Give me a general summary of this repository"
✓ Claude sandbox started!
Session ID: feature-auth
Link: https://depot.dev/orgs/12345678911/claude/feature-authThis command tells the Depot control plane to start a new agent sandbox for Claude Code. The command returns a URL to the session inside of Depot where you can follow the output.

And that's it! Your Depot organization is set up to use remote agent sandboxes for Claude Code.
In addition to using the CLI, you can also manage your remote agent sandboxes directly from the Depot dashboard:
Try the following with your remote agent sandbox:
--branch flag.--resume flag or via the Depot dashboard.--resume and --fork-session flags together.Run depot claude --help or check the CLI reference to see all the available command options.