Codex
OpenAI's coding agent across a CLI, IDE extension and cloud tasks.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkWhat it is
Codex is OpenAI's coding agent. The same agent is available as an open-source CLI, an IDE extension, a desktop app and cloud tasks that run in their own workspace and come back as changes you review, commit or open as a pull request. It reads AGENTS.md files, loads Agent Skills from .agents/skills folders and can install plugins in the portable Agent Plugins format.
Best for
ChatGPT plan users who hand off scoped tasks and review them as pull requests.
Skills it helps with
Learn Codex by doing
- Evaluate coding agents on your own repository
Run Claude Code and Codex headless against 10 closed issues from your repo, then score them with the real fix's tests and a blind review rubric.
- Permissions and sandboxing for coding agents
Set up Claude Code permission modes and rules, the Codex sandbox and approvals, and a dev container, so an agent can work without free rein.
- Connect MCP servers to Claude Code, Codex and Cursor
Add local and remote MCP servers to Claude Code, Codex and Cursor, choose the right scope, sign in with OAuth and check which tools actually loaded.
- Run coding agents headless in CI
Run claude -p and codex exec in GitHub Actions with pinned versions, narrow permissions, scoped secrets and separate jobs for writing back to the pull request.
- CLAUDE.md and AGENTS.md: instruction files for coding agents
CLAUDE.md vs AGENTS.md: what to put in each, where Claude Code, Codex, Cursor and Copilot look for them, and how to keep one source of truth without drift.
- Your first session with the Codex CLI
Install it, choose a sandbox and approval mode, give it a well-scoped task in a repository and review its changes before you accept.
- Hand a GitHub issue to a background coding agent and review the PR
Write a brief it can finish, set up its environment, hand it to Copilot, Codex or Jules, then review and iterate once.
- Turn a Figma design into code with an agent
Connect the Figma MCP server, map the design's variables to your tokens first, build one frame, then run a visual diff and an axe check.
- Migrate a JavaScript project to TypeScript with a coding agent
allowJs first, convert files leaves first in worktree batches, then raise strictness one flag at a time.
- Schedule a recurring task for a coding agent
Schedule Claude Code tasks and Codex runs: write a self-contained prompt, cut connectors and network to the minimum, test with Run now, and know how to stop it.
- Test-driven development with a coding agent
Agree the seams, write one failing test, lock the tests with a hook while the agent makes it pass, then prove the test can fail.
- Triage production errors with an agent
AI error triage with a coding agent: read errors over a read-only Sentry MCP connection, write a triage note, reproduce in a failing test, then fix behind it.
- Audit and upgrade risky dependencies with an agent
Audit project dependencies with Trail of Bits' supply-chain-risk-auditor skill, group upgrades by risk, update one batch on a branch and prove tests pass.
- Give your coding agent current docs with Context7 or llms.txt
Stop your coding agent using outdated APIs: connect Context7 over MCP, point it at a library's llms.txt, or install a vendor skill, then check it worked.
- Fix a failing CI run with a coding agent
It reads the GitHub Actions logs, explains the cause and fixes it, with stop rules so it never loops or weakens tests.
- Write release notes from git history
Turn merged pull requests into notes users can read, with every line checked against the diff before publishing.
- Security-review a pull request with an agent
Run an AI security code review of one pull request with Trail of Bits' differential-review skill, then test each finding with fp-check before anyone acts on it.
- Set up guardrail hooks for your coding agent
Block dangerous commands in Claude Code with PreToolUse hooks and deny rules, so the agent cannot force-push, wipe files or edit secrets. Test them first.
- Spec-driven feature build: plan, approve, implement, verify
Written spec, approved plan, small tested tasks and a final check against the spec, not vibes.
- Triage GitHub issues automatically with an agent
Label new issues, post a short summary, flag likely duplicates and suggest an owner, with narrow permissions.
- Refactor in parallel with git worktrees and two agents
Use git worktrees to run Claude Code and Codex in parallel on the same refactor from one written plan, compare tests, diff size and readability, then merge one.
- Port one Agent Skill across Claude Code, Codex and Cursor
Strip non-portable fields, make scripts path-safe and install one source folder for every agent.
- Write unit tests for legacy code with a coding agent
An agent writes characterisation tests, you check for weak assertions and prove them with mutation testing.
- Write a useful AGENTS.md: example, template and test
An AGENTS.md example and template with build and test commands, conventions and traps, plus a before-and-after task that shows whether the file actually helps.
- Codex CLI cheat sheet
Codex CLI commands, codex exec for scripts, sandbox and approval modes, config.toml keys, resuming sessions and slash commands, checked against codex --help.
Related tools
Claude Code
Anthropic's agentic coding tool for the terminal, IDEs, desktop and web.
Jules
Google's coding agent that works in a cloud VM and opens PRs.
GitHub Copilot
Completions, chat and a coding agent inside GitHub and popular editors.
OpenHands
Open-source coding agent you run locally, in Docker or in the cloud.
Amp
Coding agent with a CLI, editor integrations and cloud sandboxes for long tasks.
Crush
Charm's terminal coding agent for many model providers.