Skip to content
BENIBIX Learn

--environment Flag

Also known as claude --environment, --environment, --ref

It starts a cloud session on your own machines.

Think of it like

It is like you bake the cake at home. You do not buy it at the shop.

Example

Jack's company keeps code inside its own network. He runs claude --environment with the team's pool ID, and the task runs on the company's machines.

Why it matters

You get cloud sessions, and the code stays on machines your team owns.

Definition

--environment starts a new cloud session on a self-hosted environment, a pool of your own machines. Give it the environment's ID, which starts with ccpool_. The session works from your current commit. Add --ref with a branch name to start from that branch. It needs Claude Code version 2.1.224 or later.

Example code

bash
claude -p "Run the smoke test" --environment ccpool_abc123 --ref main
Run a task on your own pool, from main.
This flag sends the session to the machines you own.

Common mistake

Passing a name. It needs the ID that starts with ccpool_, which an admin gets when the pool is set up.

Key takeaways

  1. 1
    Your own pool. Not Anthropic's.
  2. 2
    ccpool_ ID. Not a name.
  3. 3
    --ref. Start from a branch.

Learn it properly