العربية
Back

AI

Codex Cloud: Coding Tasks in the Cloud and Reusable Environments

How to start a cloud task, what a published environment is, and how legacy environment chats run: setup, secrets, caching and internet.

Last reviewed:

What it is

Codex Cloud lets you give coding tasks that run in the cloud, from investigating bugs to building features. You review changes and continue from web, mobile or desktop. Each task has its own workspace and can keep working while your computer sleeps.

How to start

  1. Sign in to ChatGPT. On the web or desktop app start a chat and choose Work in > Cloud. On mobile open Codex.
  2. Choose an environment: the default one if shown to start without a repository, or a published environment someone prepared.
  3. Send your first task. The page suggests one that needs no repository, such as writing a Python script that finds duplicate files by content and testing it on sample files.
  4. Review the result, request changes in the same chat, then commit or open a pull request.

Reusable environments

You can create and publish an environment to reuse the same repositories, dependencies and tools across tasks. Select repositories so Codex works out what to install and how to configure it, and review the checks before publishing. In environment settings you configure network, credentials, HTTP secrets, environment variables and who can use it.

How legacy environment chats run

  1. Codex creates a container and checks out your repo at the selected branch or commit SHA.
  2. It runs your setup script, plus an optional maintenance script when a cached container is resumed.
  3. It applies internet settings: setup scripts have internet, agent access is off by default.
  4. The agent runs terminal commands in a loop: edits, checks, validates, and uses AGENTS.md for project lint and test commands if present.
  5. When finished it shows its answer and a diff, and you can open a PR or ask follow-ups.

Caching and secrets

Codex caches container state for up to 12 hours to speed up new chats and invalidates the cache when the setup script, maintenance script, environment variables or secrets change. If the cached state becomes incompatible choose Reset cache. For Business and Enterprise the cache is shared across users. Environment variables last for the whole chat, while secrets are removed before the agent phase. These details come from the Legacy environments page and may differ in the current experience.

Common mistakes

  • Assuming export in a setup script reaches the agent: setup runs in a separate Bash session; persist variables in ~/.bashrc or environment settings (Legacy page).
  • Enabling unrestricted internet without need.
  • Mixing Legacy and current environment details: check the current page for your setup.

Next steps

  • For network permissions in local Codex: sandbox and approvals.
  • To run from scripts: Codex exec.
  • For basics: OpenAI Codex.

Latest updates

No dated update on this topic was found on the official page read on 2026-11-30. We add updates when they appear.

Similar tools

Standalone pages for similar items are added after their official sources are read. We name nothing without a full page.

Related pages

Sources

Wording is ours, from the official source. Images and video belong to their owners and are credited with a link to the official page.

#dev#codex#cloud#environments

Frequently asked questions

Can I start without a repository?

Yes, if the default environment is available. You can also ask Codex to check out any repository available through your connected GitHub or GitLab account. (OpenAI)

OpenAI Codex: OpenAI's Coding Agent and How to Start

Are secrets available to the agent?

On the legacy environments page: secrets get an extra layer of encryption and are only available to setup scripts; they are removed before the agent phase. (OpenAI)

Codex: Sandbox, Approvals and Network Access

Does the agent have internet?

On the legacy page: internet is available during setup, and during the agent phase it is off by default, with limited or unrestricted access configurable. (OpenAI)

MCP Security: Common Attacks and Mitigations