OpenAI Codex
Async by design. GitHub-native by default.
Codex runs tasks in fully isolated cloud sandboxes — no local environment needed. Assign it work via the ChatGPT interface or tag it directly in GitHub issues and PRs. Multiple tasks run in parallel. You check results when they’re done.
Two surfaces
Capabilities
| Capability | How it works |
|---|---|
| Async execution | Tasks run in OpenAI-managed cloud sandboxes. Submit a task, close your laptop, review a PR diff when it finishes. Tasks can run for hours. |
| Parallel tasks | Submit multiple tasks simultaneously. Each gets its own isolated sandbox — no state leaks between tasks. Codex manages concurrency automatically. |
| GitHub-native | Tag @codex in any GitHub issue or PR comment to assign it work. Codex clones the repo, completes the task, opens a draft PR with a full diff. |
| AGENTS.md config | Drop an AGENTS.md file at the repo root. Codex reads it before every task — define test commands, branch naming conventions, off-limits files, and preferred code style. |
| Isolated sandboxes | Each task runs in a fresh ephemeral environment — no cross-task state, no risk of one agent’s actions polluting another’s workspace. |
| Full audit trail | Every file change, test run, and bash command is recorded. Review the full session trace before merging any PR Codex opened. |
Pricing
| Plan | Monthly | Codex access |
|---|---|---|
| ChatGPT Plus | $20 | Limited Codex tasks per month — shared with other Plus features |
| ChatGPT Pro | $200 | Unlimited Codex tasks; access to o3-powered agent sessions |
| API · codex-mini | PAYG | $1.50/M input · $6/M output — programmatic access for CI pipelines |
| API · o3 (full) | PAYG | $10/M input · $40/M output — highest capability, complex multi-step tasks |
Configuring AGENTS.md
Create AGENTS.md at the repo root
Codex reads this file before starting every task. It overrides its defaults for your project.
## Test commandsnpm run testnpm run lint
## Branch namingfeat/<slug> # new featuresfix/<slug> # bug fixes
## Do not modify- config/secrets.yaml- .env files
## Style guide- TypeScript strict mode- No default exports- Prefer named arrow functionsAssign tasks via GitHub or ChatGPT
Tag Codex in any issue or PR comment, or submit tasks through the ChatGPT Codex panel:
# GitHub issue comment:@codex Fix the broken pagination in the dashboard table.Tests are in src/__tests__/dashboard.test.ts
# Or submit through chatgpt.com/codex:"Add rate limiting middleware to all API routes.Follow the pattern in src/middleware/auth.ts.Run tests before finishing."When to use Codex
Long-running background tasks — hours, not minutes
Codex is built for tasks that take time: large refactors, adding a feature across many files, migrating a codebase from one pattern to another. Submit the task, go to sleep, and review a full diff in the morning. No local machine required, no terminal to babysit.
GitHub-native workflows — triaging and closing issues automatically
Integrate Codex into your GitHub issue workflow. Tag @codex on a well-described bug report and Codex clones the repo, locates the bug, writes a fix, runs tests, and opens a draft PR — all in one step. Engineers review diffs rather than tracking down bugs themselves.
Parallel multi-task execution — run ten tasks simultaneously
Codex runs each task in its own isolated sandbox. Submit ten independent issues at once and all ten run in parallel. This is the right model for sprint-end cleanup, bulk test generation, or dependency upgrades across a monorepo where tasks don’t depend on each other.
No local setup — zero infrastructure to manage
Codex spins up its own sandbox per task. There is nothing to install, no Docker container to maintain, no local GPU needed. The entire execution environment is managed by OpenAI. For teams without DevOps bandwidth or for rapid prototyping in new languages and frameworks, this removes all setup friction.