# How to use Codex in Claude Code

> Use AutoRouter, the Mac app for all your coding agents, to run GPT as Claude Code's own model on your ChatGPT plan: connect the plan, enable Claude Code, and pick a GPT model or AutoRouter with `/model`. To call Codex itself from Claude Code, install OpenAI's Codex plugin with `/plugin marketplace add openai/codex-plugin-cc` and `/plugin install codex@openai-codex`, run `/codex:setup`, then use `/codex:review` for a second review or `/codex:rescue` to hand off a task. The plugin runs on your ChatGPT plan's Codex limits or an OpenAI API key.

Authors: AutoRouter
Author profile: https://autorouter.com/about
Published: 2026-11-25T13:55:00.000Z
Reading time: 6 min
Canonical: https://autorouter.com/blog/codex-in-claude-code
Publisher: AutoRouter (https://autorouter.com)

![AutoRouter runs GPT as Claude Code's own model. What do you want from Codex? A second review: /codex:review, on your ChatGPT plan; Hand off a task: /codex:rescue, on your ChatGPT plan; GPT in /model: AutoRouter, ChatGPT plan connected. Source: OpenAI's Codex plugin for Claude Code and AutoRouter, read November 20, 2026.](https://autorouter.com/blog/images/codex-in-claude-code/1-routes.png)

[AutoRouter, the Mac app for all your coding agents](https://autorouter.com) 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](https://github.com/openai/codex-plugin-cc)).

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](https://github.com/openai/codex-plugin-cc)).

```bash
/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins
/codex:setup
```

1. Run the four commands above in a Claude Code session.
2. `/codex:setup` checks that the Codex CLI is installed and signed in. If it's missing and npm is available, it offers to install it; or run `npm install -g @openai/codex` yourself.
3. If Codex isn't signed in yet, run `!codex login` and sign in with your ChatGPT account.
4. Check that the `/codex:` commands appear and that `codex:codex-rescue` is listed in `/agents`.

![OpenAI's Codex plugin installs from inside Claude Code. 1. Add the marketplace (openai/codex-plugin-cc); 2. Install the plugin (codex@openai-codex); 3. Run /codex:setup (Checks your Codex sign-in); 4. Codex runs the task (On your ChatGPT plan). Source: openai/codex-plugin-cc README, read November 20, 2026.](https://autorouter.com/blog/images/codex-in-claude-code/2-plugin.png)

## What can Codex do inside Claude Code?

The plugin adds slash commands that run the Codex CLI beside your Claude Code session ([OpenAI](https://github.com/openai/codex-plugin-cc)):

| 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](https://github.com/openai/codex-plugin-cc)). 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](https://developers.openai.com/codex/pricing)). Claude Code's own work keeps running on your Claude plan; [Codex usage limits](/blog/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:

1. Download AutoRouter for macOS from [autorouter.com](https://autorouter.com).
2. 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.
3. Allow Accessibility and click Enable for Claude Code.
4. Start a new Claude Code session and pick a GPT model, or AutoRouter, with `/model`, or start with `claude --model auto-claude-route`.

![GPT in Claude Code's /model, on your ChatGPT plan. 1. Connect your ChatGPT plan (In AutoRouter); 2. Enable Claude Code (In AutoRouter's setup); 3. Pick a GPT model (With /model); 4. ChatGPT plan runs it (No API key). Source: AutoRouter setup and FAQ, read November 20, 2026.](https://autorouter.com/blog/images/codex-in-claude-code/3-model.png)

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](/blog/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](/pricing) 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](https://autorouter.com/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 `/model` for the work and `/codex:review` for the check.

[Codex vs Claude Code](/blog/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](https://github.com/openai/codex-plugin-cc)).

### 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](https://github.com/openai/codex-plugin-cc)).

### What happens when my ChatGPT plan runs out?

In Codex, eligible plans can extend usage with ChatGPT credits ([OpenAI](https://developers.openai.com/codex/pricing)). 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](https://autorouter.com)
- [AutoRouter for Claude Code](https://autorouter.com/integrations/claude-code)
- [AutoRouter privacy](https://autorouter.com/privacy)
- [Codex plugin for Claude Code](https://github.com/openai/codex-plugin-cc), OpenAI, read November 24, 2026
- [Codex pricing](https://developers.openai.com/codex/pricing), OpenAI, read November 24, 2026

## Read next

- [How to use Claude Code in Cursor](https://autorouter.com/blog/claude-code-in-cursor.md): Use AutoRouter, the Mac app for all your coding agents, to run your Claude plan inside Cursor's own Agent: connect the plan, enable Cursor and restart it, and new chats start on AutoRouter. To run Claude Code itself in Cursor, install Anthropic's Claude Code extension from Cursor's Extensions view, or run `claude` in Cursor's terminal, and sign in with your Claude account; it runs on your Claude plan with no API key. Without either, Cursor's Agent bills Claude models from prepaid credit at API list price.
- [How to use Claude in Codex and GPT in Claude Code](https://autorouter.com/blog/claude-in-codex-and-gpt-in-claude-code.md): Use AutoRouter, the Mac app for all your coding agents: connect the AI subscriptions you already pay for, and your Claude plan runs inside Codex and your ChatGPT plan inside Claude Code, with no keys or config. The Free plan connects two subscriptions for $0 a month. Natively, Claude in Codex takes a Responses-compatible gateway such as OpenRouter in `config.toml`, and GPT in Claude Code takes a gateway such as a LiteLLM proxy behind `ANTHROPIC_BASE_URL`; both bill per token on a key.
- [How to use MiniMax in Claude Code and Codex](https://autorouter.com/blog/minimax-in-claude-code-and-codex.md): Use AutoRouter, the Mac app for all your coding agents: it puts MiniMax M3.1 Flash in each one's model picker (Claude Code, Codex, Cursor, etc.) with no MiniMax key or config. Natively, set Claude Code's `ANTHROPIC_BASE_URL` to `https://api.minimax.io/anthropic` with your M Plan key and `MiniMax-M3.1-Flash[1m]` model variables in `~/.claude/settings.json`, and add `https://api.minimax.io/v1` as a provider in Codex's `config.toml`.

Tags: [Guides](https://autorouter.com/blog/tags/guides.md), [Claude Code](https://autorouter.com/blog/tags/claude-code.md), [Codex](https://autorouter.com/blog/tags/codex.md)

Drafted with AI from the sources linked above, then checked and edited by the AutoRouter team.

AutoRouter is a Mac app for AI model routing in Codex, Claude Code, Cursor and other supported coding agents. It uses eligible connected subscriptions first. See [setup](https://autorouter.com/setup.md) and [pricing](https://autorouter.com/pricing).
