Codex is not one thing. It is a local CLI, a desktop app, cloud tasks in ChatGPT, an IDE extension, mobile access, automations, skills, MCP, AGENTS.md, hooks, subagents, and app worktrees. This guide maps the pieces without pretending every piece should run unattended.
The practical difference: Claude Code feels terminal-first; Codex puts more of the project in an app surface. If you use both, the win is not picking a side. It is knowing where planning, implementation, and verification each belong.
If you have read the Codex map before, start here. This is the dated layer for guide changes and recently verified product boundaries.
The Codex guide now treats Codex as a multi-surface tool: CLI, App, cloud tasks, IDE extension, and mobile remote access. The practical question is not "use Codex or not"; it is where the work should run and what proof that surface can produce.
OpenAI's current remote-connection docs say mobile setup supports Codex App hosts on macOS and Windows. It still starts from Codex App, not the CLI or IDE extension, and the host must be awake, online, and signed in.
The automation section now separates standalone runs from thread automations and calls out the host/project boundary. Project-scoped Codex App automations may still depend on the app running and the selected project being available on disk.
The context and agent sections now include the working details that matter in practice: instruction discovery order, the documented project-doc byte budget, built-in agent roles, custom TOML agents, and conservative fan-out defaults.
Codex work can happen locally, in the app, in the cloud, in an IDE, or from your phone. The first practical skill is picking the right surface before the task starts.
| Surface | Use it for | Watch out |
|---|---|---|
| Codex CLI | Terminal-native local work, SSH/devbox use, scripts, repo tasks where your local tools and credentials matter. | It is powerful, but you still need sandbox and approval discipline. |
| Codex App | Parallel threads, local/worktree/cloud modes, Git UI, terminal, browser/device validation, skills, hooks, and automations. | Some automations need the app and project available on disk. |
| ChatGPT Codex cloud | Cloud tasks against connected repos: fix bugs, write features, answer codebase questions, propose PRs. | Cloud convenience is not a substitute for scoped tasks and review. |
| IDE extension | Working beside the editor, with connected repo context and familiar code navigation. | Do not split truth between IDE chat and repo docs. |
| Mobile access | Start or continue threads, approve commands, review diffs, screenshots, and outputs from a phone. | The connected host still matters. If the host is asleep or disconnected, remote access stops. |
claude, claude agents, background sessions, cloud routines, remote access, and Computer Use. Codex App bundles more of that into one visible desktop surface. Compare Claude agents and sessions →Codex's repo memory primitive is AGENTS.md. Treat it like code: short, local, versioned, and specific enough to prevent mistakes.
Codex reads global guidance first, then project-path guidance from the project root down to the current directory. More specific instructions appear later and can override broader ones.
OpenAI documents AGENTS.override.md as a higher-priority option alongside ordinary AGENTS.md.
The documented default combined project-doc limit is 32768 bytes. You can raise it, but that is not a free lunch.
Codex can be configured to look for fallback instruction filenames. Useful for teams migrating from other agent conventions.
| Using Codex? | Using Claude Code? |
|---|---|
Put durable repo rules in AGENTS.md and project-local agent/config files. | Put always-true repo rules in CLAUDE.md; defer optional material to skills and path-scoped rules. |
Use ~/.codex/AGENTS.md for personal operating rules. | Use ~/.claude/CLAUDE.md for personal operating rules. |
| Keep instructions under the byte budget and close to the code. | Keep root CLAUDE.md lean; "Would removing this cause mistakes?" remains the test. |
Use this before bloating repo memory. The goal is fewer mistakes, not more lore.
Inspect the AGENTS.md instructions that apply to this directory before changing code. Report: - which files you read - which instructions affect this task - which lines are stale, duplicated, contradictory, or too broad - one small cleanup that would prevent a real mistake Do not edit yet. Keep the recommendation under 10 bullets.
Codex uses the same broad idea as Claude Code: progressive disclosure for procedures, deterministic hooks for guarantees, and plugins for packaging repeated capability.
Use skills for repeatable procedures and reference material that should load only when relevant. OpenAI's Codex docs include skill creation and skill management as first-class app/CLI concepts.
Use hooks for events that must happen regardless of model mood: block risky commands, format after writes, capture state, or enforce checks before stopping.
Package skills, hooks, MCP, and project helpers into installable bundles when a procedure should travel across repos or teammates.
The highest ROI skills are not fancy. They summarize diffs, run checks, generate PR notes, review risky areas, and produce evidence.
Use this when you notice the same long prompt showing up for the third time.
I keep repeating this process: <paste the steps or prompt> Turn it into a Codex skill design. Return: - trigger phrases - a short SKILL.md outline - what belongs in reference files instead of AGENTS.md - one verification step - one case where this should stay a normal prompt Do not propose a plugin unless this process needs to travel across repos or teammates.
Codex subagents are configurable workers. The app adds the practical surface for parallel threads, worktrees, and cloud/local mode selection.
| Codex concept | What to learn | Why it matters |
|---|---|---|
| Built-in agents | default, worker, explorer. | Use different workers for execution vs. investigation. |
| Custom agents | Personal agents in ~/.codex/agents/*.toml; project agents in .codex/agents/*.toml. | Make recurring roles explicit instead of re-prompting them every time. |
| Agent settings | agents.max_threads, agents.max_depth, runtime bounds. | Fan-out has cost and risk. Defaults are conservative for a reason. |
| Worktrees | Use app worktrees for parallel implementation. | Parallel agents need file isolation or they step on each other. |
Run one explorer to map files, one worker to implement a scoped fix, then one fresh reviewer to inspect the diff. Do not start with five writers.
This keeps the reader and writer roles separate without creating a management mess.
Explorer task: Map the files, commands, and risks for this change. Do not edit. Return exact paths, likely tests, and unknowns. Worker task: Use the explorer notes only as input. Implement the smallest safe diff for: <task> Rules: - stay inside <allowed paths> - ask before touching shared contracts - done means tests/checks run and changed files listed
Codex automations are recurring background tasks. The useful version is not "let it do everything"; it is "wake up, inspect, produce a useful artifact, and stop."
Use when each run should be independent: daily triage, weekly docs drift, recurring dependency checks, periodic deploy health reports.
Use when the recurring work should preserve a continuing conversation: ongoing project triage, long-running investigation, recurring status synthesis.
Codex can put automation findings into an inbox. That matters because the human needs a review surface, not a silent transcript graveyard.
Mobile access lets you steer from the phone, but the host still supplies the environment. Use it for approvals and steering, not as a fake cloud machine.
The safest first automation produces a reviewable artifact and changes nothing.
Every weekday morning, inspect the project and produce a triage note. Scope: - read issues, failing checks, recent commits, and TODOs - do not edit files - do not run migrations, deploys, dependency updates, or external writes Output: - top 5 items by urgency - evidence for each item - suggested owner/action - anything that needs human approval
/loop is session-scoped; Remote Control drives a local session from phone/web. Codex automations are app-centered and can be tied to project/thread state. Compare Claude cloud and remote surfaces →MCP gives Codex access to tools and data beyond the repo. Treat every integration as a capability with a blast radius, not a novelty to collect.
| Integration | Best use | Rule |
|---|---|---|
| OpenAI Docs MCP | Current OpenAI API/platform documentation. | Good default for fast-moving OpenAI work. |
| Context7 | Library docs and modern framework references. | Use when training cutoff is likely stale. |
| Playwright / browser tools | Rendered UI verification, screenshots, console logs, flows. | Browser proof beats "looks right in code." |
| GitHub | Issues, PRs, review context, CI failures. | Scope tokens and permissions. Do not let it rewrite history unattended. |
| Sentry / logs | Production error triage and regressions. | Treat external data as untrusted context. |
Run this before adding another integration. Tool access should replace real tab switching or stale guessing.
Before adding MCP for this task, decide if it is worth it. Need: <what live data or action the agent needs> Return: - whether repo files or public docs are enough - the minimum MCP server and permissions needed - whether read-only access is sufficient - what the agent must never do through this tool - how we will verify the result without trusting the tool blindly
Practitioner writeups that hold up converge on a boring loop: plan, persist truth, scope one ticket, execute, verify, report, update durable docs.
| Step | Codex move | Claude Code analog |
|---|---|---|
| 1. Plan | Use ChatGPT/Codex thread as conductor for the next bounded outcome. | Use a lead Claude session or Ultraplan for larger design. |
| 2. Persist truth | Update AGENTS.md, ticket docs, current state, verification notes. | Update CLAUDE.md, skills, memory, and project docs. |
| 3. Execute | Use CLI/App/cloud/worktree based on environment needs. | Use solo session, subagent, background agent, or team. |
| 4. Verify | Run tests, inspect diffs, capture browser/app screenshot evidence where relevant. | Run tests, hooks, browser automation, Computer Use, or reviewer subagent. |
| 5. Report | Require a completion report and unresolved-risk list. | Same. Never accept "done" without evidence. |
Start with the cheapest proof that could catch the bug: diff inspection, targeted test, broader test, type/lint/build, browser or device smoke, then a fresh review. Do not skip the rendered check for UI work.
It names changed files, commands run, what passed, what was not tested, screenshots or links when relevant, and one plain remaining-risk sentence. Anything less is a status update, not proof.
This is the default shape for useful Codex work: scope, evidence, then a report.
Work on exactly this ticket: <paste ticket> Before editing: - inspect the relevant files - name the smallest safe diff - list any paths you will not touch Rules: - do not edit outside <allowed paths> - keep behavior changes explicit - preserve unrelated work Done means: - changed files listed - tests/checks run with results - manual verification noted if relevant - proof attached when UI, mobile, data, or external behavior changed - remaining risks named plainly
The strongest process is a conductor pattern: one deep context holder owns the project truth, while Claude Code and Codex do bounded work in separate lanes. Use them to create independent evidence, not more tabs to babysit.
| Use both for | Codex lane | Claude Code lane |
|---|---|---|
| Alternative reviews | Use Codex App or CLI as the fresh reviewer with repo/browser context. | Use Claude Code reviewer subagent, /code-review, or a background session. |
| Parallel implementation | Run one worktree/thread on the same acceptance criteria. | Run one worktree/background session or team teammate on the same acceptance criteria. |
| Project steering | Use Codex App and mobile access as the dashboard. | Use claude agents, /goal, /loop, and routines for terminal/cloud automation. |
| Final call | Ask Codex to compare diffs and risks. | Ask Claude to compare diffs and risks. If they disagree, demand evidence. |
Use this with either tool. Replace the competitor name honestly: Claude Code, Codex, or a named teammate.
You are competing against <competitor name>. Build the best solution to this exact task. Task: <paste the task> Acceptance criteria: <paste the checklist> Rules: - Same repo, same constraints, no shortcuts. - Optimize for correctness, smallest safe diff, clear product fit, and verification evidence. - Do not imitate the competitor. Beat them by being more precise. - Done means: changed files listed, tests/checks run, risks named, and any manual verification described.
Give Codex Claude's diff, or give Claude Codex's diff. The review should be sharper because it has no sunk cost.
Review this work as if <competitor name> already approved it and your job is to find what they missed. Focus on: - correctness and hidden edge cases - security, data loss, privacy, and permission mistakes - missing tests or weak verification - unnecessary scope creep - mobile/browser/product regressions Give file/line evidence. Rank findings by severity. If there are no real issues, say that clearly and name the residual risk.
Use a fresh session for this. The judge should not be the same context that wrote either attempt.
Compare Solution A and Solution B. Pick the winner or merge the best parts. Judge by: - correctness - maintainability - smallest safe diff - test and browser evidence - product fit - risk of hidden follow-up work Do not compromise by averaging. Make a decision, explain it, and give the next concrete action.
This mirrors the Claude Code checklist style. The next step is making these interactive in the Dojo.
AGENTS.md.AGENTS.md for one package or app.AGENTS.override.md only when override semantics are really needed.project_doc_max_bytes budget.explorer for read-heavy investigation.worker for scoped implementation.agents.max_depth conservative.Primary sources first. Reviews and community writeups are included only as practitioner signal.
| Source | What it supports |
|---|---|
| OpenAI Codex CLI docs | CLI surface, install, local operation, command references. |
OpenAI openai/codex repo | Open-source client and CLI implementation. |
| OpenAI Codex App features | App modes, Git UI, worktrees, terminal, browser/device features, skills, hooks. |
| OpenAI Codex Automations | Standalone and thread automations, Triage inbox, app/project requirements. |
| OpenAI Remote Connections | Mobile access and host boundaries. |
| OpenAI AGENTS.md guide | Instruction discovery, override files, byte budget, fallback names. |
| OpenAI Codex Subagents | Built-in agents, custom TOML agents, max threads/depth/runtime settings. |
| OpenAI Codex MCP | MCP transports, auth, config, server instructions, examples. |
| OpenAI Codex Skills | Skill concepts and management. |
| OpenAI Codex Hooks | Deterministic lifecycle automation. |
| OpenAI Codex Best Practices | Planning, verification, scoped work, and automation caution. |
| OpenAI Help: Using Codex with your plan | Plan and product access reference. |
| Augment Code review | Third-party review signal, not used as primary fact source. |
| Practitioner process thread | Anecdotal pattern: conductor, scoped tickets, durable docs. |