--environment
A Claude Code CLI flag, read out of the shipped bundle. No mined inventory carries it: everything below comes from what this site has written about it.
What it is
Create a new cloud session that runs on the [self-hosted environment](/docs/en/self-hosted-environments) with the given ID. Environment IDs start with ccpool_. See [--environment dispatch behavior](/docs/en/self-hosted-environments-testing#environment-dispatch-behavior) for dispatch behavior and the flag combinations it rejects. Requires Claude Code v2.1.224 or later
Anthropic's own wording. Read off CLI reference, captured 2026-08-28.
Presence across releases
The miner has never read a build containing this name. It is here because a changelog entry of ours names it, which is evidence that it existed and not evidence of which releases carried it. The inventory starts at v2.1.138 and everything older than that was never mined.
Changelog entries naming it
-
v2.1.248Cloud and pool flags no longer confuse prompt detection
Cloud flags like --pool and --ref no longer swallow their values as your prompt.
named in this entry
-
v2.1.246Forwarding your home settings to a cloud session now records explicit consent
Forwarding your home settings to a cloud session now records your consent separately from permission.
named in this entry
-
v2.1.232--project no longer starts a cloud session
Passing --project alone won't start a cloud session; --ref and --on-branch now need --cloud or --environment.
named in this entry
-
v2.1.229Whitespace-only prompts are rejected for
--cloudand--environmentWhitespace-only prompts on
--cloudand--environmentare rejected instead of sent empty.named in this entry
-
v2.1.224"pool" renamed to "environment" in runner flags, old names still work
Runner "pool" flags are renamed to "environment"; old names still work but warn.
named in this entry
-
v2.1.224Create a cloud session without a terminal
Create a cloud session straight from the command line with --environment and a prompt, optionally as JSON.
named in this entry
-
v2.1.224Clearer error when
--bgand--environmentare combinedCombining --bg and --environment now explains they are different backends and shows the right command.
named in this entry
-
v2.1.224Start a cloud session on a self-hosted environment with
--environmentStart a cloud session on your own environment with claude --environment, plus hidden --ref and --on-branch companions.
named in this entry
-
v2.1.224Flag-conflict error names the flag you actually used
The cloud-session conflict error now blames --environment, the flag you actually typed.
named in this entry
-
v2.1.224Local runner spawn writes into ./runner-setup and checks 127.0.0.1:8080
The setup wizard spawns a detached runner into ./runner-setup and warns it outlives your session.
named in this entry
-
v2.1.224cloud CLI: piped stdin no longer silently overrides a task description
Piped input no longer silently overrides a task description you passed to --cloud.
named in this entry
Documentation pages
- CLI reference reference table Claude Code CLI
- scripting mentions it Claude Developer Platform
- using mentions it Claude Developer Platform
- budgets mentions it Claude Developer Platform
- DCF Model Rubric mentions it Claude Developer Platform
- environments mentions it Claude Developer Platform
- files mentions it Claude Developer Platform
- github mentions it Claude Developer Platform
- mcp-connector mentions it Claude Developer Platform
- migration mentions it Claude Developer Platform
- multiagent-orchestration mentions it Claude Developer Platform
- onboarding mentions it Claude Developer Platform
- quickstart mentions it Claude Developer Platform
A reference table page is one whose own table defines this name, and it is where the description above came from. A page that mentions it carries the name somewhere in its text and may say nothing about it at all. Every page carrying it.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the CLI flag does. All CLI flags.