Skip to content

Glossary

Codex cloud environment

Last updated

Definition

A Codex cloud environment is the saved configuration Codex uses to build the container a cloud task runs in: which repository, which image, which setup commands, and what variables and internet access the agent gets.

Also called: Codex environment, cloud environment.

You create environments in Codex's settings on chatgpt.com. Each one has an id, which is what codex cloud exec --env <ENV_ID> expects.

PartWhat it does
Repositorychecked out at the chosen branch or commit
Imagethe default universal image has common languages and tools; versions can be pinned
Setup scriptinstalls dependencies; internet is available while it runs
Maintenance scriptoptional; runs when a cached container is resumed
Environment variablesavailable for the whole task
Secretsencrypted and available only to the setup script
Agent internet accessoff by default during the agent phase; can be allowed

Codex caches a prepared container for up to 12 hours so later tasks start faster, and throws the cache away when the setup script, maintenance script, variables or secrets change. Claude Code has a similar idea for its cloud sessions, also called a cloud environment.

In Pairbar

Pairbar can send a new chat straight to Codex Cloud once it knows which environment to use. In the composer, Cloud → Set environment saves an environment id for the repo; after that, choosing Cloud runs codex cloud exec from the repo on its current branch and opens the task's page. Without one, Codex's own new chat opens with your text typed, and a guide card explains what's left. See the composer and the setup guide.

Frequently asked questions

Does a Codex cloud task have internet access?
During the setup script, yes, so dependencies can install. During the agent phase it's off by default unless you allow it in the environment's settings.
Where do I find a Codex environment id?
In Codex's environment settings on chatgpt.com. Pairbar asks for it once per repo under Cloud → Set environment.
Why did my cached container get rebuilt?
Codex drops the cache after 12 hours or when the setup script, maintenance script, environment variables or secrets change.