View all guides
5 min read

Run your first Codex Cloud task with a reusable environment

Create and publish one Codex Cloud environment for a GitHub repo, paste one prompt for a tiny change with checks and a PR, then reuse that setup for isolated cloud tasks while your laptop sleeps.

What you'll learn

  • How to create and publish one reusable Codex Cloud environment for a GitHub repo
  • How to run an isolated cloud task with one prompt, then review the diff and open a PR

Prerequisites

The idea

Prepare the project setup once. Publish a reusable Codex Cloud environment. Each new task starts from that setup in its own cloud workspace, so Codex can keep working while your laptop sleeps. You review diffs on the web, desktop, or mobile.

Announced at OpenAI DevDay 2026. Product docs: Codex Cloud.

Steps

1. Sign in and create a cloud environment

Open ChatGPT on the web or in the desktop app and sign in.

In a new task, choose Work in > Cloud, open Select environment, then Create environment.

You can also start from Settings > Codex Cloud > Environments > Create environment.

2. Connect the repo (access only)

Select your GitHub repository (connect GitHub if prompted), then Get started.

Codex inspects the project, installs dependencies and tools, and tests the workflow. Answer only when it asks for missing access or details.

For a first environment, stick to repo access and the install/setup Codex proposes. Add secrets or network rules only if setup fails without them.

3. Review and publish

Check the setup report, install script, and start skill. Save changes, then select Publish. Wait until you see Environment published.

4. Paste this one prompt

Select Start a new task (or choose your published environment and describe the work). Paste:

In this repo, make a small finishable change that is clearly useful (for example a short README section, a footer credit line, or a simple UI tweak on an existing page). Follow AGENTS.md for lint and test commands if present. Run the project's checks. Summarise what you changed. Prepare a pull request (or commit and open a PR) with a short title and body.

Review the changed files and test results. Ask for follow-ups if needed, then commit or open the PR when you are ready.

Common mistakes

  • Leaving the environment Unpublished. New tasks need a published environment.
  • Hand-writing a long install script when Codex can prepare and test it from the repo.
  • Adding broad internet access or secrets before you need them.
  • Expecting setup edits to change a task that is already running. Republish, then start a new task.

Going further

  • From the Codex CLI, submit a cloud task against your published environment with codex cloud exec "…" --env <ENV_ID> (CLI reference).
  • For multi-PR local agent work on your laptop, compare with Cursor Projects (not the main path here).
Share this guide: