Setting Up Cloud Sandboxes
So far, you have been using Codex CLI, which runs locally on your machine. Now it is time to explore Codex Cloud, a fundamentally different way of working with AI coding agents. Instead of one agent on your laptop, you get multiple agents running simultaneously in isolated cloud environments.
What You Will Learn
- What Codex Cloud is and how it differs from the CLI
- How cloud sandboxes work and why isolation matters
- How to access Codex Cloud via the desktop app and web interface
- How to create a project and launch your first cloud task
- How tasks connect back to your repository
What Is Codex Cloud?
Codex Cloud is the cloud-based counterpart to Codex CLI. While the CLI runs a single agent on your local machine, Codex Cloud runs agents in sandboxed environments on OpenAI's infrastructure.
Each cloud task gets its own isolated sandbox — a complete environment with its own filesystem, dependencies, and execution context. This means:
- Tasks cannot interfere with each other. One agent's work does not affect another's.
- Your local machine stays clean. No rogue processes, no unexpected file changes.
- Tasks run in the background. You do not need to keep a terminal open.
- Multiple tasks run in parallel. You can dispatch several tasks at once.
Think of it like having a team of developers, each working in their own branch on their own machine, all at the same time.
Accessing Codex Cloud
There are two ways to access Codex Cloud:
The Codex Desktop App
Launch it from your terminal:
codex app
This opens the Codex application, which provides a graphical interface for managing projects, tasks, and results.
The Web Interface
Go to chatgpt.com/codex in your browser. This gives you the same functionality without installing anything extra.
Both interfaces connect to the same backend, so tasks you start in one are visible in the other.
Understanding Cloud Sandboxes
A cloud sandbox is an isolated execution environment. When you create a task in Codex Cloud, here is what happens behind the scenes:
- Environment creation — A fresh sandbox is provisioned with a clean filesystem
- Repository cloning — Your repository is cloned into the sandbox
- Dependency installation — Project dependencies are installed (npm install, pip install, etc.)
- Task execution — The Codex agent runs your task within this environment
- Result generation — The agent produces a set of changes (a diff) that you can review
- Cleanup — When the task is done, you can review the changes and apply them to your repository
Each sandbox runs independently. If you have five tasks running, that is five separate environments, each with its own copy of your code.
Creating a Project
Projects in Codex Cloud organize your tasks and connect them to a repository. To create a project:
- Open the Codex app or web interface
- Click New Project
- Connect it to your GitHub repository
- Give the project a name and optional description
Once a project is connected to a repository, any task you create in that project will start from the latest code in your repo.
Launching Your First Cloud Task
With a project set up, launching a task is straightforward:
- Open your project in the Codex app
- Type your task description in the input field
- Click Send or press Enter
For example:
Add input validation to all API endpoints in src/routes/ — validate request bodies,
return 400 status codes for invalid inputs, and add appropriate error messages
The task is dispatched to a cloud sandbox and begins running immediately. You will see a progress indicator as the agent works through the task.
Reviewing Task Results
When a task completes, Codex presents the results as a set of changes you can review:
- File diffs — See exactly what was added, modified, or deleted
- Agent reasoning — Read the agent's thought process and decisions
- Command output — See the results of any commands the agent ran (tests, builds, etc.)
You have several options:
- Apply changes — Merge the agent's changes back to your repository (creates a branch or PR)
- Request revisions — Ask the agent to modify its approach
- Discard — Throw away the changes if they are not what you wanted
Cloud vs CLI: When to Use Which
| Aspect | CLI | Cloud |
|---|---|---|
| Execution | Your local machine | OpenAI's servers |
| Parallelism | One task at a time | Multiple simultaneous tasks |
| File access | Direct access to your filesystem | Works on a cloned copy |
| Speed to start | Instant (already on your machine) | Requires sandbox setup |
| Best for | Interactive development, quick fixes | Background tasks, parallel work |
| Approval modes | Suggest, Auto Edit, Full Auto | Agent runs autonomously |
| Requires terminal | Yes | No (web or app interface) |
The two modes complement each other. Use the CLI for interactive, hands-on work where you want to see changes in real time. Use Cloud for tasks you want to fire off and check on later.
Key Takeaways
- Codex Cloud runs agents in isolated sandboxes on OpenAI's infrastructure, not your local machine
- Each task gets its own clean environment with your repository cloned in
- Access Cloud via the desktop app (
codex app) or web interface (chatgpt.com/codex) - Projects connect your tasks to a GitHub repository
- Task results are presented as diffs you can review, apply, or discard
- Use CLI for interactive work and Cloud for background or parallel tasks
- Cloud sandboxes ensure tasks cannot interfere with each other or your local environment

