Codex in Claude Code
OpenAI shipped an official plugin that runs Codex right inside Claude Code. Two agents, one terminal. Here's the setup and the three ways to actually use it.
Why this is worth two minutes
You don't have to pick one coding agent and abandon the other anymore. This is an official OpenAI plugin, sitting on OpenAI's own GitHub, that lets you call Codex from inside Claude Code, hand off bugs, run reviews, and transfer sessions, without leaving your terminal.
The catch is small and worth knowing up front: only one of the two sides is free here. More on that below.
1 Install it (the two commands)
Inside Claude Code, run these two:
/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex 2 Activate it
Reload so Claude Code sees the plugin, then run the one-time setup:
/reload-plugins
/codex:setup /codex:setup checks that everything's installed and that you're logged in.
3 Log in to Codex (the step people miss)
If setup says you're not authenticated, log in to Codex from inside Claude Code:
!codex login Sign in with your ChatGPT account (the free tier works) or drop in an OpenAI API key. This is the one step that trips most people up, so if something isn't working, start here.
Requirements: a ChatGPT account or an OpenAI API key, plus Node.js 18.18 or later. If /codex:setup can't find Codex at all, install it directly with npm install -g @openai/codex and run setup again.
4 The three ways to run them together
The plugin is just the door. Here's what it's actually for:
- 01 · Claude plans, Codex builds — let Claude architect the whole project, then hand the building to Codex. You save your Claude usage for the thinking, not the typing.
- 02 · Codex reviews before you ship — run a review on everything with
/codex:review, or/codex:adversarial-reviewwhen you want it actively trying to break your code. A second model that didn't write the code is the one you want catching what the author can't see. - 03 · Make them argue it out — hand both agents the same problem and let them go back and forth until they land on the best solution. This is the one people underestimate.
5 Commands worth knowing
/codex:review— a standard Codex review of your code/codex:adversarial-review— a steerable challenge review that hunts for problems/codex:rescue— hand a bug you're stuck on straight to Codex/codex:transfer— spin up a persistent Codex thread for a longer task/codex:statusand/codex:result— check on and pull back a background job/codex:cancel— stop a running background job
The honest part: only one side is free
Claude Code still needs your paid Claude plan. The plugin doesn't change that.
The Codex side, though, works with any ChatGPT account, even a free one. It just counts against your Codex usage limits. So the Codex half of this costs you nothing to try.
6 Straight from the source
This is OpenAI's official plugin. Verify everything and star it here:
Was this useful?
I break down one AI-for-builders workflow like this every week.