Purpose
Codex plugin for Claude Code is aimed at users who are already using Claude Code, with the goal of letting users conveniently start using Codex within their existing workflow. It can invoke Codex from within Claude Code for code review, or delegate tasks to Codex.
Main capabilities
The plugin provides the following commands:
- /codex:review: Performs a regular read-only Codex review. Suitable for reviewing currently uncommitted changes, or comparing a branch against a baseline branch (such as main). Supports --base <ref> for branch review, and also supports --wait and --background. This command cannot be steered and does not accept custom focus text. The command is read-only and will not make any changes. When running in the background, /codex:status can be used to check progress, and /codex:cancel can be used to cancel an in-progress task. Code review of multi-file changes may take a long time, so running in the background is generally recommended.
- /codex:adversarial-review: Runs a steerable adversarial review that challenges the chosen implementation and design. It can be used to stress-test assumptions, trade-offs, failure modes, and whether there are safer or simpler alternatives. The review target is selected in the same way as /codex:review, including --base <ref>, and it also supports --wait and --background. Unlike /codex:review, it can append additional focus text after the arguments. This command is read-only and will not fix code.
- /codex:rescue: Hands tasks to Codex through the codex:codex-rescue subagent. It can be used to investigate bugs, continue a previous Codex task, or use a smaller model for a faster or more economical pass. Supports --background, --wait, --resume, --fresh. If --resume and --fresh are omitted, the plugin can prompt to continue the repository's most recent rescue thread. If --model or --effort is not passed, Codex chooses the defaults itself; if spark is specified, the plugin maps it to gpt-5.3-codex-spark. Subsequent rescue requests can continue the most recent Codex task in that repository.
- /codex:transfer: Create a persistent Codex thread from the current Claude Code session and print the codex resume <session-id> command. Useful when you have started a debugging or implementation conversation in Claude Code and want to continue the same context directly in Codex. The plugin's existing SessionStart hook automatically provides the current transcript path, and --source can be used as a manual override. This transfer uses Codex's external agent session importer, follows the same conversion rules as importing Claude history in the Codex App, and produces visible turns that can be continued in the App or TUI. The source file must be located under ~/.claude/projects, and older versions of Codex that do not expose the session import feature need to be upgraded first.
- /codex:status: Show running and recent Codex tasks for the current repository. Useful for checking background work progress, viewing recently completed tasks, and confirming whether a task is still running.
- /codex:result: Show the final stored Codex output of a completed task. When available, it also includes the Codex session ID, making it easy to reopen that run directly in Codex with codex resume <session-id>.
- /codex:cancel: Cancel an active background Codex task.
- /codex:setup: Check whether Codex is installed and authenticated. If Codex is missing and npm is available, it can offer to install Codex. It can also be used to manage the optional review gate.
Usage
Prerequisites: A ChatGPT subscription (including the free tier) or an OpenAI API key; usage consumes Codex usage limits. Node.js 18.18 or later is required.
Installation steps (in Claude Code):
-
Add the marketplace: The specific command to add the marketplace has not been provided yet.
-
Install the plugin: The specific command to install the plugin has not been provided yet.
-
Reload the plugin: The specific command to reload the plugin has not been provided yet.
/codex:setup will tell you whether Codex is ready. If Codex is missing and npm is available, it can offer to install Codex for you. If you want to install it yourself Codex, the command is not yet provided. If Codex is installed but not logged in, run:
codex login
After installation, you should see the following slash commands, as well as the codex:codex-rescue subagent in /agents.
A simple first run is to run /codex:review.
The plugin wraps the Codex app server, uses the global codex binary installed in the environment, and applies the same configuration.
Common configuration: If you want to change the default reasoning effort or default model used by the plugin, you can define it in the user-level or project-level config.toml. For example, to always use gpt-5.4-mini in a specific project and set it to high, you can add the corresponding configuration in .codex/config.toml at the root of the directory where Claude is started. The configuration read order is: user-level configuration in ~/.codex/config.toml; project-level override in .codex/config.toml. Project-level overrides are loaded only when the project is trusted. For more configuration options, see the Codex documentation.
Move work back to Codex: Delegated tasks and any stop gate run can also be resumed directly within Codex by running codex resume (with the specific session ID obtained from /codex:result or /codex:status), or by selecting from the list. This allows you to review or continue Codex's work.
When to use
- Pre-release review: Challenge the direction rather than just code details; the review focuses on design choices, tradeoffs, hidden assumptions, and alternatives, stress-testing specific risk areas such as auth, data loss, rollback, race conditions, or reliability.
- Hand issues over to Codex to handle.
- Start long-running tasks, then check on them with /codex:status, etc.
Limitations
- Usage consumes Codex usage limits. A ChatGPT subscription (including the free version) or an OpenAI API key can both be used.
- Requires Node.js 18.18 or higher.
- /codex:review and /codex:adversarial-review are read-only and will not modify or fix code.
- The review gate creates a long-running Claude/Codex loop and may quickly consume usage limits. Enable it only if you plan to actively monitor the session.
- If you are already logged into Codex on this machine, that account should be usable directly; the plugin uses the local Codex CLI authentication. If you use only Claude Code and have never used Codex, you need to log in to Codex with a ChatGPT account or API key. You can use /codex:setup to check whether it is ready, and if not, use !codex login.
- The plugin does not use a separate Codex runtime; instead, it delegates through the local Codex CLI and Codex app server on this machine, using the same Codex installation, local authentication state, repository checkout, and machine-local environment, and following the same Codex configuration.
- If you need to point the built-in OpenAI provider to a different endpoint, you can set openai_base_url in the Codex configuration.
- The source files for /codex:transfer must be located under ~/.claude/projects, and older versions of Codex need to be upgraded first.