Hand GitHub work to Codex Cloud, and what changed about building an environment

Codex Published: Updated:

Using Codex Cloud from ChatGPT: creating an environment from Work in > Cloud, the install script and start skill Codex writes for you, sending tasks, and reviewing the result.

Verified on Oct 17, 2026 These tools change quickly. Please also check the latest official documentation. How articles are researched and verified
Contents
  1. Prerequisites
  2. Connect GitHub and create an environment
  3. You don't write the setup script
  4. Send a task
  5. Review the result and open a pull request
  6. Keep AGENTS.md in shape
  7. Cloud or local
  8. Summary

Codex Cloud runs tasks remotely rather than on your machine, each in its own workspace, and a task keeps running while your computer is asleep. You can hand it three issues and get three branches back while you work on something else locally.

This article covers connecting GitHub, creating an environment, sending tasks and reviewing the result. The environment part has changed: you no longer write the setup script yourself.

KEY POINT

What you will learn

  • Connecting a GitHub repository, and the environment Codex builds for you
  • The install script and start skill, and how to change them later
  • Sending tasks, getting a pull request, and when to use the CLI instead

Prerequisites

ItemDetail
AccountA supported ChatGPT plan; check the official page for current availability
GitHubAccess to the repository, and the GitHub connection approved
RepositoryThe easier your tests and build are to run, the better Codex can work out the setup

Connect GitHub and create an environment

The documented steps:

  1. "Open ChatGPT on the web, mobile, or in the desktop app, then sign in with your ChatGPT account."
  2. "On the web or in the desktop app, choose Work in > Cloud and open Select environment."
  3. "Choose your GitHub repositories and select Get started. Connect GitHub if prompted."
  4. "For a new environment, review the setup and test results, save changes, and select Publish."
  5. "After publishing a new environment, select Start a new task." Then describe your task and send it.

用語解説

Environment: the per-repository run configuration. With one already published you can start a task right away. Environments are created on the web or in the desktop app.

You don't write the setup script

This is the part that changed. When you create an environment, Codex inspects the repositories and identifies runtimes, tools and services. It saves the setup it tested in two fields:

FieldWhat the docs call it
Install script"commands to install dependencies and prepare development assets"
Start skill"instructions to start services and check that they're ready"

The documentation puts it directly: "Refine the setup in the conversation; you don't need to write an installation script yourself."

To change it later, open Settings > Codex Cloud > Environments, use the environment's … menu and select Edit. Describe the change, save it, and select Republish. The change reaches new work only: "Start a new task to use the update; existing tasks retain their own state."

Verify network access in a new task after publishing

You turn on the internet-access toggle and choose allowed domains, then save and test the services during setup. But access during tasks applies to new tasks after you publish or republish, so the docs tell you to verify it in a new task. Enterprise admins can set requirements through Agent Security that apply alongside each environment's domain settings.

Secrets come in two shapes. Environment variables are "Passed directly to programs in the environment." Network secrets are sent only to HTTPS services you allow: programs receive a placeholder, and "the proxy substitutes the real value for allowed destinations." Personal values stay in your Personal vault and are supplied only when an environment requests them.

Send a task

With an environment published, write the instruction as text:

Fix the bug in issue #42 where the user isn't redirected after login.
Add a failing test that reproduces it first, then confirm it passes after the fix.

Independent tasks run in parallel, so sending several that don't touch each other — separate issues, separate modules — is the efficient pattern.

Review the result and open a pull request

When a task finishes you get the changed files and test results back. The documentation's phrasing: "Review the changes and test results, request follow-ups, and commit or open a pull request when ready."

  • If something needs changing, send a follow-up to the same task rather than starting over.
  • Once the pull request exists, it goes through your normal review flow: CI runs and reviewers look at it.

Codex Cloud (Legacy) is a different thing

The older model, where you wrote a setup script by hand, is now documented separately as Codex Cloud (Legacy). Legacy continues to support Code Review and the Linear and GitHub integrations, and the docs say it is planned for deprecation. This article describes the current environment flow.

Keep AGENTS.md in shape

Cloud tasks read the repository's AGENTS.md too. Putting the test command, the conventions and the off-limits paths there saves you explaining them in every task — see Set up Codex CLI and write an AGENTS.md that Codex actually reads.

Cloud or local

SituationBetter fit
Working through something interactivelyLocal (CLI or the IDE extension)
Several independent tasks that each take a whileCloud
A problem that only reproduces in your local environmentLocal
You don't want to disturb your machine, or want to check from another deviceCloud

The CLI can start a cloud task and list recent cloud chats with their status, so "investigate locally, delegate the implementation, review the PR locally" is a workable loop. For the equivalent with Claude Code, see Run Claude Code in GitHub Actions.

Summary

  • Pick repositories from Work in > Cloud > Select environment, review the setup and test results, and Publish
  • Don't write the install script. Codex inspects the repositories and saves an install script and a start skill; you refine them in conversation, then Edit and Republish
  • Network access and secrets are per environment, and changes reach only new tasks
  • Send independent tasks in parallel, review changes and test results, then commit or open a pull request
  • Put the test command and conventions in AGENTS.md so you don't repeat them per task

FAQ

Where do I start Codex Cloud from?
Open ChatGPT on the web, mobile or the desktop app. On the web or desktop app, choose Work in > Cloud and open Select environment. Environments are created on the web or in the desktop app.
Do I have to write the setup script myself?
No. When you create an environment, Codex inspects the repositories and saves the tested setup as an install script and a start skill. The docs say "you don't need to write an installation script yourself." You refine it in conversation.
What about network access during a task?
You turn on the internet-access toggle and choose allowed domains. Access applies to new tasks after you publish or republish, so verify it in a new task.
How does work come back to the repository?
As changed files and test results you review. "Review the changes and test results, request follow-ups, and commit or open a pull request when ready."

Primary sources

This article was drafted by AI from official documentation and reviewed by the site operator before publishing. Found a mistake? Let us know via the contact page.