Configure cloud environments changedcloud-environments
Nearest release: v2.1.240, published 9 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+14added
Lines−24removed
From line
16
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits56to this page, all time
The whole hunk
from line 16, old and new numbered
/
from line 16
1616
1717## The Default environment
1818
19Onboarding sets up the **Default** environment for you, whether you connect through [the web](/docs/en/web-quickstart#connect-github) or a CLI flow such as `/web-setup`; if web onboarding shows an environment form instead of creating the environment, keep the form's defaults to get the same **Default** environment. **Default** carries no configuration of its own:
19If you don't have an environment yet, onboarding sets up the **Default** environment for you, whether you connect through [the web](/docs/en/web-quickstart#connect-github) or a CLI flow such as `/web-setup`; if web onboarding shows an environment form instead of creating the environment, keep the form's defaults to get the same **Default** environment. **Default** carries no configuration of its own:
2020
2121* [**Trusted** network access](#access-levels): sessions reach package registries and other [allowlisted domains](#default-allowed-domains), and nothing else through the session's network.
2222* No other configuration: **Default** defines no environment variables or setup script, so sessions start with just the [pre-installed tools](#installed-tools).
from line 201
201201| **Python** | Python 3.x with pip, poetry, uv, black, mypy, pytest, ruff |
202202| **Node.js** | 20, 21, and 22, with npm, yarn, pnpm, bun¹, eslint, prettier, chromedriver |
203203| **Ruby** | 3.1, 3.2, 3.3 with gem, bundler, rbenv |
204| **PHP** | 8.4 with Composer |
204| **PHP** | 8.3 with Composer |
205205| **Java** | OpenJDK 21 with Maven and Gradle |
206| **Go** | latest stable with module support |
206| **Go** | Go with module support |
207207| **Rust** | rustc and cargo |
208208| **C/C++** | GCC, Clang, cmake, ninja, conan |
209209| **Docker** | docker, dockerd, docker compose |
210210| **Databases** | PostgreSQL 16, Redis 7.0 |
211| **Utilities** | git, jq, yq, ripgrep, tmux, vim, nano |
211| **Utilities** | git, gh, jq, yq, ripgrep, tmux, vim, nano |
212212
213213¹ Bun is installed but has known [proxy compatibility issues](#install-dependencies-with-a-sessionstart-hook) for package fetching.
214214
215For exact versions, ask Claude to run `check-tools` in a cloud session. It's a shell command installed on the session VM, not a slash command; you ask Claude because [Claude runs all VM commands for you](#run-tests-start-services-and-add-packages).
215To get the versions of most of the tools in this table, ask Claude to run `check-tools` in a cloud session. It's a shell command installed on the session VM, not a slash command; you ask Claude because [Claude runs all VM commands for you](#run-tests-start-services-and-add-packages). For a tool it doesn't report, such as Ruby, PHP, bun, PostgreSQL, or Redis, ask Claude to run the tool's own version command, for example `psql --version`.
216216
217217Node.js versions are installed at `/opt/node20`, `/opt/node21`, and `/opt/node22`, with 22 on `PATH` by default. To work with a different version, ask Claude to prepend that version's `bin` directory, such as `/opt/node20/bin`, to `PATH`.
218218
from line 224
224224
225225You can set `GH_TOKEN` or `GITHUB_TOKEN` yourself in [environment settings](#set-environment-variables), or leave both unset and let the [GitHub proxy](#github-proxy) authenticate for you:
226226
227* If you set a token, it passes through to the container unchanged, so your scripts, and GitHub's [`gh` CLI](https://cli.github.com) if you install it, use it directly.
227* If you set a token, it passes through to the container unchanged, so your scripts and GitHub's [`gh` CLI](https://cli.github.com) use it directly.
228228* If you set neither and the [GitHub proxy](#github-proxy) is handling authentication for your session, both variables read as the placeholder string `proxy-injected` in the commands Claude runs, and the proxy substitutes your real credentials on outbound GitHub requests. `gh` works without a token of your own, but a script that reads `GITHUB_TOKEN` directly gets the placeholder, not a usable token.
229229
230230A token you set is an ordinary environment variable, so anyone who uses the environment can read it; the proxy path keeps the credential out of the environment configuration and the session VM.
from line 231
231231
232232To check which case applies to your session, ask Claude to run `echo $GH_TOKEN`.
233233
234GitHub's [`gh` CLI](https://cli.github.com) isn't pre-installed. If you need a `gh` command the built-in tools don't cover, like `gh release` or `gh workflow run`, install and authenticate it yourself:
234GitHub's [`gh` CLI](https://cli.github.com) is pre-installed. If you need a `gh` command the built-in tools don't cover, like `gh release` or `gh workflow run`, ask Claude to run it. `gh` reads `GH_TOKEN` automatically, so you don't need to run `gh auth login`.
235235
236<Steps>
237 <Step title="Install gh in your setup script">
238 Add `apt update && apt install -y gh` to your [setup script](#setup-scripts).
239 </Step>
240
241 <Step title="Provide a token if the proxy is not handling authentication">
242 If `echo $GH_TOKEN` prints `proxy-injected`, the [GitHub proxy](#github-proxy) authenticates `gh` for you and this step is unnecessary. Otherwise, add a `GH_TOKEN` environment variable to your [environment settings](#set-environment-variables) with a GitHub personal access token; like any environment variable, it's readable by anyone who uses the environment, so scope the token narrowly. `gh` reads `GH_TOKEN` automatically, so you don't need to run `gh auth login`.
243 </Step>
244</Steps>
245
246236### Link output back to the session
247237
248238Each cloud session has a transcript URL on claude.ai, and the session can read its own ID from the `CLAUDE_CODE_REMOTE_SESSION_ID` environment variable. Use this to put a traceable link in PR bodies, commit messages, Slack posts, or generated reports so a reviewer can open the run that produced them.
from line 291
301291
302292To add a setup script, open the environment settings dialog and enter your script in the **Setup script** field.
303293
304This example installs GitHub's [`gh` CLI](https://cli.github.com), which isn't pre-installed.
294This example installs [ShellCheck](https://www.shellcheck.net/), which isn't pre-installed.
305295
306296```bash theme={null}
307297#!/bin/bash
308apt update && apt install -y gh
298apt update && apt install -y shellcheck
309299```
310300
311301### Script requirements
from line 325
3353251. The setup script runs first, before Claude Code launches, and only when no [cached environment](#environment-caching) exists.
3363262. Claude Code launches and runs your SessionStart hooks, as it does at the start of every session, local or cloud.
337327
338| | Setup scripts | SessionStart hooks |
339| ---------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
340| **Where you configure them** | The environment dialog at [claude.ai/code](https://claude.ai/code) | A [settings file](/docs/en/settings#where-settings-live) such as your repo's `.claude/settings.json`; see [What carries over from your setup](#what-carries-over-from-your-setup) for which files reach a cloud session |
341| **When they run** | Before Claude Code launches, skipped when a [cached environment](#environment-caching) exists | After Claude Code launches, on every session including resumed |
342| **Where they run** | Cloud sessions only | Local and cloud sessions |
328| | Setup scripts | SessionStart hooks |
329| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
330| **Where you configure them** | The environment dialog at [claude.ai/code](https://claude.ai/code), or the **Cloud environments** admin page for [shared environments](#organization-shared-environments) | A [settings file](/docs/en/settings#where-settings-live) such as your repo's `.claude/settings.json`; see [What carries over from your setup](#what-carries-over-from-your-setup) for which files reach a cloud session |
331| **When they run** | Before Claude Code launches, skipped when a [cached environment](#environment-caching) exists | After Claude Code launches, on every session including resumed |
332| **Where they run** | Cloud sessions only | Local and cloud sessions |
343333
344334If you have SessionStart hooks in your user-level `~/.claude/settings.json`, don't expect them in the cloud: user-level settings stay on your machine. In a cloud session, Claude Code runs hooks from the repository and from your organization's [server-managed settings](/docs/en/server-managed-settings); sessions in a [self-hosted environment](/docs/en/self-hosted-environments-configuration#permissions-and-tool-approval) also run hooks the operator seeded from the runner host's `~/.claude/`.
345335
No line in this hunk matches that.