How to use Codex in Claude Code
AutoRouter6 min read
AutoRouter, the Mac app for all your coding agents runs GPT as Claude Code's own model: connect your ChatGPT plan in AutoRouter, enable Claude Code, and pick a GPT model, or AutoRouter, with /model. Claude Code then does the work with GPT on your ChatGPT plan, with no API key. To call Codex itself from inside Claude Code, install OpenAI's Codex plugin, openai/codex-plugin-cc: /codex:review asks Codex for a review of your changes and /codex:rescue hands it a task, on your ChatGPT plan's Codex limits or an OpenAI API key (OpenAI).
AutoRouter wrote this post. Every OpenAI and Anthropic detail below comes from their docs and repositories as read on November 24, 2026; check the linked page before you paste a command.
How do you install the Codex plugin in Claude Code?
Add OpenAI's marketplace and install the plugin from inside Claude Code. It needs Node.js 18.18 or later, and a ChatGPT plan (Free included) or an OpenAI API key (OpenAI).
/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins
/codex:setup
- Run the four commands above in a Claude Code session.
/codex:setupchecks that the Codex CLI is installed and signed in. If it's missing and npm is available, it offers to install it; or runnpm install -g @openai/codexyourself.- If Codex isn't signed in yet, run
!codex loginand sign in with your ChatGPT account. - Check that the
/codex:commands appear and thatcodex:codex-rescueis listed in/agents.
What can Codex do inside Claude Code?
The plugin adds slash commands that run the Codex CLI beside your Claude Code session (OpenAI):
| Command | What it does |
|---|---|
/codex:review | A read-only Codex review of your uncommitted changes, or of your branch with --base main |
/codex:adversarial-review | A read-only review that challenges your design; takes focus text |
/codex:rescue | Hands a task to Codex: investigate a bug, try a fix, or continue an earlier Codex task |
/codex:transfer | Turns the Claude Code session into a Codex thread you resume with codex resume |
/codex:status, /codex:result, /codex:cancel | Check, read or stop background Codex jobs |
Long reviews run best in the background: /codex:review --background, then /codex:status and /codex:result. /codex:rescue takes --model and --effort; without them, Codex picks its own defaults. You can also just ask Claude Code to delegate a task to Codex.
Does the Codex plugin use your ChatGPT plan?
Yes. The plugin runs the Codex CLI with whatever sign-in Codex already has, so its reviews and tasks count against your ChatGPT plan's Codex usage limits, or bill per token if Codex is signed in with an API key (OpenAI). As of November 24, 2026, OpenAI lists the Codex CLI from Plus ($20 a month), with Pro plans from $100, and its Free and Go cards list GPT-6 Luna in the desktop app (OpenAI). Claude Code's own work keeps running on your Claude plan; Codex usage limits covers how far each ChatGPT plan goes.
How do you run GPT as Claude Code's own model?
The plugin hands work to a separate Codex agent; Claude Code itself still runs on Claude. To have Claude Code do the work with GPT, on your ChatGPT plan, connect the plan in AutoRouter:
- Download AutoRouter for macOS from autorouter.com.
- Open it, sign in or create a free account, and sign in to your ChatGPT plan and the other AI subscriptions you already pay for.
- Allow Accessibility and click Enable for Claude Code.
- Start a new Claude Code session and pick a GPT model, or AutoRouter, with
/model, or start withclaude --model auto-claude-route.
Claude Code needs version 2.1.242 or later and Node 22.18 or later. AutoRouter installs no hooks, and Claude Code keeps its own Claude sign-in, so Claude models keep running on your Claude plan. Choosing a specific model sends requests straight to it; choose AutoRouter instead and it works out how hard each task is and sends it to the model that fits, with hard work on the most capable model your plans cover. Every request shows its model, what it cost and why. How to use Claude in Codex and GPT in Claude Code covers the plan in both directions, and How to choose and change models in Codex and Claude Code covers the wider lineup.
What does each way of using Codex in Claude Code cost?
As of November 24, 2026:
| Route | What runs | What pays |
|---|---|---|
| Codex plugin | A separate Codex agent, from slash commands | Your ChatGPT plan's Codex limits, or your OpenAI API key |
| AutoRouter | Claude Code itself, on a GPT model | Your connected plans; $0 on Free for two subscriptions |
| Both | GPT in /model plus Codex reviews | The same ChatGPT plan |
AutoRouter Free costs $0 a month and connects two subscriptions, and routing across your own subscriptions is free. Pro connects any number and adds every other model, billed at the provider's price plus 10%. When one account reaches its limit, AutoRouter moves on to the account with the most room left, before it spends any credit. AutoRouter earns nothing on plans.
The limits: AutoRouter runs on macOS 14 or later and is in beta. Requests pass through AutoRouter's servers on their way to each provider; AutoRouter doesn't store transcripts, but keeps the message that opens each request, up to 4,000 characters, to review routing, along with records of the model chosen, tokens and cost (AutoRouter privacy).
Should you use the plugin or GPT in /model?
- Use the Codex plugin for a second opinion from another lab: a review before you merge, or a stuck bug handed to Codex while Claude keeps working.
- Use AutoRouter if you want Claude Code itself to run on GPT, or on whichever model fits each task, paid by the AI subscriptions you already pay for.
- Use both if you like each: a GPT model in
/modelfor the work and/codex:reviewfor the check.
Codex vs Claude Code compares the two agents themselves. For Codex inside Cursor, see How to use Codex in Cursor.
Questions
Can I use my ChatGPT subscription in Claude Code?
Yes, two ways. OpenAI's Codex plugin runs Codex from Claude Code on your ChatGPT plan, and AutoRouter runs GPT as Claude Code's own model on the same plan.
Does /codex:review change my code?
No. /codex:review and /codex:adversarial-review are read-only. Use /codex:rescue when you want Codex to try a fix (OpenAI).
Can I move a Claude Code session into Codex?
Yes. /codex:transfer creates a Codex thread from the current Claude Code session and prints a codex resume <session-id> command to continue it in the Codex app or CLI (OpenAI).
What happens when my ChatGPT plan runs out?
In Codex, eligible plans can extend usage with ChatGPT credits (OpenAI). With AutoRouter, a request moves on to the connected account with the most room left before it spends any credit, and on Pro it keeps going from the monthly usage until the plan resets.
Sources
- AutoRouter
- AutoRouter for Claude Code
- AutoRouter privacy
- Codex plugin for Claude Code, OpenAI, read November 24, 2026
- Codex pricing, OpenAI, read November 24, 2026