Skip to content

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.

Codex Agentcodex-mini APIOpenAI

Two surfaces

Capabilities

CapabilityHow it works
Async executionTasks 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 tasksSubmit multiple tasks simultaneously. Each gets its own isolated sandbox — no state leaks between tasks. Codex manages concurrency automatically.
GitHub-nativeTag @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 configDrop 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 sandboxesEach task runs in a fresh ephemeral environment — no cross-task state, no risk of one agent’s actions polluting another’s workspace.
Full audit trailEvery file change, test run, and bash command is recorded. Review the full session trace before merging any PR Codex opened.

Pricing

PlanMonthlyCodex access
ChatGPT Plus$20Limited Codex tasks per month — shared with other Plus features
ChatGPT Pro$200Unlimited Codex tasks; access to o3-powered agent sessions
API · codex-miniPAYG$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

01

Create AGENTS.md at the repo root

Codex reads this file before starting every task. It overrides its defaults for your project.

AGENTS.md
## Test commands
npm run test
npm run lint
## Branch naming
feat/<slug> # new features
fix/<slug> # bug fixes
## Do not modify
- config/secrets.yaml
- .env files
## Style guide
- TypeScript strict mode
- No default exports
- Prefer named arrow functions
02

Assign 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

01

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.

02

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.

03

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.

04

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.