Hi, I'm Rahul. I'm documenting what I learn while building products.
How to Use Codex Inside Claude Code
Use OpenAI’s official Claude Code plugin to review work, investigate bugs, delegate tasks, and hand sessions over to Codex.
You do not have to choose between Claude Code and Codex.
OpenAI has an official Claude Code plugin that lets you use Codex inside the workflow you already have. Codex can review the current code, investigate a bug, try a fix, or continue the whole task in its own thread.
Here is the simplest way to set it up and use it.
What you need
- Claude Code installed
- Node.js 18.18 or newer
- A ChatGPT account with Codex access, or an OpenAI API key
The plugin uses your local Codex installation, authentication, repository, and configuration. If Codex already works on this computer, you normally do not need a separate setup.
1. Install the official plugin
Open Claude Code inside the project where you want to use Codex. Add OpenAI’s marketplace, install the plugin, and reload the available plugins.
/plugin marketplace add openai/codex-plugin-cc /plugin install codex@openai-codex /reload-plugins
2. Check the Codex setup
Run the setup command inside Claude Code. It checks whether Codex is installed and authenticated. When Codex is missing and npm is available, the plugin can offer to install it.
/codex:setup
You can also install the Codex CLI yourself:
npm install -g @openai/codex
3. Sign in when needed
If you have not used Codex on this computer, start the login flow from Claude Code and sign in with your ChatGPT account or API key.
!codex login
When you already use Codex locally, the plugin normally reuses that authentication.
Use Codex as a second reviewer
Let Claude Code complete the work, then ask Codex to review the current changes. A normal review is read-only and will not edit the code.
For larger changes, run it in the background so you can continue working.
/codex:review /codex:review --background /codex:status /codex:result
Challenge the implementation
Use an adversarial review when you want Codex to question the direction itself: assumptions, tradeoffs, failure cases, and whether a safer or simpler approach exists.
/codex:adversarial-review /codex:adversarial-review --base main challenge the caching and retry design /codex:adversarial-review --background look for race conditions
This review is also read-only. It challenges the implementation but does not fix it.
Give a problem to Codex
The rescue command delegates a task to Codex. Use it to investigate a failure, try a small fix, or continue a previous Codex task.
/codex:rescue investigate why the tests are failing /codex:rescue fix the failing test with the smallest safe patch /codex:rescue --background investigate the regression
You can also ask Claude directly: “Ask Codex to investigate this bug.” The plugin can delegate the work for you.
Hand the conversation over to Codex
When you want to stop delegating individual tasks and continue the full conversation in Codex, transfer the current Claude Code session.
/codex:transfer
The plugin creates a persistent Codex thread and prints a codex resume command. You can then continue the imported work in Codex.
Manage background work
Reviews and delegated tasks can take time. These commands let you check progress, read the result, or stop an active job.
/codex:status /codex:result /codex:cancel
The simple workflow
Use Claude Code normally.
When you want another model to check the work, run a Codex review.
When Claude gets stuck, hand the problem to Codex with rescue.
When you want Codex to continue the work completely, transfer the session.