--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.
Create a new cloud session that runs on the self-hosted environment with the given ID. Environment IDs start with ccpool_. See --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-09-26.
In the changelogs
24Releases whose published page names --environment.
-
v2.1.295
--environmentnow reads environment IDs and names, but still only runs pool IDs--environmentnow recognises IDs starting with env_ and plain names, but only IDs starting with ccpool_ actually work so farfound in this entry's text
-
v2.1.288
Headless cloud session errors now name the flag you actually used
Errors when starting a cloud session without the interactive screen now name the flag you used instead of always saying
--environmentfound in this entry's text
-
v2.1.288
Errors for conflicting cloud session options can name a different option
Errors about conflicting --cloud or --environment options no longer always name --environment or always start with Error:
found in this entry's text
-
v2.1.287
CLAUDE.md nested loading and an
--environmenterror message reworkedThe code that loads nested CLAUDE.md files was simplified, and the error for combining
--environmentwith--cloudis now built in partsfound in this entry's text
-
v2.1.287
Headless cloud sessions stop early if they were not started as cloud sessions
A cloud session without the interactive screen now stops with an error if Claude Code did not recognise it as a cloud launch at start-up
found in this entry's text
-
v2.1.287
Cloud sessions without a monorepo get a default environment
With the no-monorepo option,
--environmentnow falls back to a default environment ID, and its conflict error messages have been rewordedfound in this entry's text
-
v2.1.287
Cloud sessions created with --environment pass on a no-monorepo option
Creating a cloud session with --environment now passes a no-monorepo option along with the environment ID
found in this entry's text
-
v2.1.287
--cloudstops early when it would need a keyboard it can't readIf
--cloudwould open a session in your terminal but there is no keyboard to read from, Claude Code now exits with an error before creating itfound in this entry's text
-
v2.1.285
Cloud sessions started with --environment prepare to pass on blocked tools
Creating a cloud session with --environment can now send a list of blocked tools, though that list is always empty in this build
found in this entry's text
-
v2.1.281
Hidden
claude -p --cloudheadless cloud-print path added, but compiled offCode for a headless
claude -p --cloudrun is added, but the switch that enables it returns false, so no one can use it in 2.1.281found in this entry's text
-
v2.1.268
Remote-session org-policy denials now emit telemetry
Blocked remote-session actions from org policy now emit a tengu_org_policy_denied telemetry event
found in this entry's text
-
v2.1.248
Cloud 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, found in this entry's text
-
v2.1.246
--no-home-settingsreplaced by--forward-home-settings <true|false>The hidden --no-home-settings flag becomes --forward-home-settings true or false, so you can force it on.
found in this entry's text
-
v2.1.246
Forwarding 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, found in this entry's text
-
v2.1.242
/cloud-plugins and a matching opt-in for sending this machine's settings to cloud sessions
You now decide separately whether cloud sessions may use your plugins and your local settings.
found in this entry's text
-
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, found in this entry's text
-
v2.1.229
Whitespace-only prompts are rejected for
--cloudand--environmentWhitespace-only prompts on
--cloudand--environmentare rejected instead of sent empty.named in this entry, found in this entry's text
-
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.224
Create 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, found in this entry's text
-
v2.1.224
Clearer error when
--bgand--environmentare combinedCombining --bg and --environment now explains they are different backends and shows the right command.
named in this entry, found in this entry's text
-
v2.1.224
Start 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, found in this entry's text
-
v2.1.224
Flag-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, found in this entry's text
-
v2.1.224
Local 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.224
cloud 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, found in this entry's text
First cited
7The earliest release whose published evidence quoted --environment was v2.1.224, 7 Aug 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table below.
1 further span in the ledger name it. The list above is the earliest first and stops at 6.
Presence across releases
0The 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.
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.