AB
AiBoss
Tutorials

codex-plugin-cc Tutorial - A bridging plugin for integrating Claude Code into Codex

Today I'm sharing something suitable for combining two powerful tools. There's always been a debate about whether Claude Code or Codex is better, but we're all adults, why make a choice? I want both.

Today I'll share something suitable for a two-sword combination.

existClaude There has always been a debate about whether Code or Codex is better, but we're all adults, why make a choice? I want both.

The GitHub project codex-plugin-cc was created to resolve this controversy; installing it allows... Claude Codex is running internally within Code.

codex-plugin-cc can be understood as: openingAI Codex Access Claude A bridging plugin for Code.

Project address: https://github.com/openai/codex-plugin-cc

During use Claude Code remains the main window, while Codex acts as a second encoding proxy. Claude Calling is used for code review, challenge review, task delegation, and session migration.

The plugin invokes global codex commands on your machine, namely the local Codex CLI and Codex app-server.

Core Functions:

/codex:review: Let Codex perform code review.

The most common review process consists of three steps:

/codex:review --background /codex:status /codex:result

The first command will start Codex code review and run it in the background.

`/codex:status` is used to check the review progress.

After the task is completed, use /codex:result to view the results.

To review all changes made to the current branch relative to main, you can type:

/codex:review --base main --background

  • /codex:adversarial-review: Enables Codex challenge solutions

It's suitable for checking whether a solution is viable. Codex will focus on checking design trade-offs, hidden assumptions, boundary conditions, and failure modes.

  • /codex:rescue: Hands the task over to Codex for investigation or fix.

Assign a specific problem to Codex. Suitable for handling troubleshooting tasks: build failures, test failures, complex bugs, and continuing old tasks.

  •  /codex:transfer: transfer Claude The session will continue in Codex.

Suitable for already Claude We've discussed a lot of context in the Code section; I'd like to switch to the Codex App or Codex CLI to continue later.

Installation is very easySimpleEveryone first Claude Enter the following in the Code input box:

/plugin marketplace add

After the Add Marketplace pop-up appears, fill in:

openai/codex-plugin-cc

After adding successfully, return to Claude In the Code input box, enter:

/reload-plugins

Finally, enter:

/codex:setup

Case 1 Code Review

Let first Claude Code: Create a new feature:

Prompt wordsAdd the following feature to the current login page: After three consecutive failed authentication attempts, disable the login button for 30 seconds and display the remaining seconds. Only incorrect usernames or passwords should be counted in the failure count; network errors and server errors should not be counted. Further testing is required. Only modify the necessary files; do not submit yet.

/codex:review --background

Codex identified two issues during its review:

1. Permission issue in claude/settings.local.json

The line `.claude/settings.local.json:11Bash(node *)` grants any Node script permission to execute without approval.

2. Login lock countdown issue

In src/components/LoginForm.tsx:14, the page has been open for some time before the third authentication failure. The current value still retains the value at the time of mounting. The first time the rendering is locked, it may display an artificially high countdown.

We can let Claude Continue revising the code:

Prompt words:

Fix the following issues based on the Codex review. Only modify the necessary files, add or adjust the tests, and after fixing them, run `npm test` and `npm run build`, but do not commit.

Do not submit `.claude/settings.local.json` as part of this feature change submission. If it's just local permission settings, please restore this file to its state before this task.

Fixed a lock countdown issue in src/components/LoginForm.tsx: When the third authentication fails and lockoutUntil is set, now should be refreshed synchronously to ensure that the first render countdown after the lock starts starts from 30 seconds, instead of using the old now value when the page is mounted.

Then review it again:

After the code was revised and reviewed, it was discovered that the last authentication failure might be counted as the third consecutive authentication failure.

Continue to let Claude Code revised:

Prompt words:

Fix the following issues based on the Codex review. Only modify the necessary files, add or adjust the tests, and after fixing them, run `npm test` and `npm run build`, but do not commit.

[P2] The counter should be reset after a non-authentication error — src/components/LoginForm.tsx:55

The current network or server error branch will not reset failCount. The sequence auth → auth → network → auth will incorrectly trigger a lockout, even though these four authentication failures are not consecutive. If the requirement is "3 consecutive authentication failures", the counter should be reset on non-authentication errors to break the chain.

Let's review it again:

Okay, the code review passed!

Case 2 Challenge Solution

Let's let...Claude Let's add a "remember username" function to the login page:

Prompt wordsAdd a "Remember Username" function to the current login page: If the user selects this option, the username will be remembered the next time the page is accessed.automaticEnter the username of the last successfully logged-in user; unchecking this option will clear saved usernames. Consider the possibility of localStorage being unavailable; conduct additional testing. Only modify necessary files; do not commit yet.

Then let Codex challenge the solution to see if it's feasible:

/codex:adversarial-review

Codex forClaude The challenging review of the code's solution revealed these issues:

  • safeRemoveStorage failed to swallow deletion.
  • Usernames are permanently stored in localStorage.
  • Changes to the mixin functionality in claude/settings.local.json
  • Read localStorage twice during initialization
  • Save failures in safeSetStorage are ignored.
  • Usernames consisting of only spaces will pass the verification.
  • The key `saved_username` is too generic.
  • The behavior when removeItem throws an exception was not tested.
  • I haven't tested whether to provide feedback to the user when setItem fails to save.
  • The username should not be saved when "Remember username + Login failed" is not tested.
  • If the stored value is a pure space, it should not be initialized with a remembered username.
  • The `vi.stubGlobal('localStorage', …)` method does not perform cleanup after each test, potentially contaminating other tests.

We can continue to discuss these issues. Claude Code improvements:

Prompt words:

Fix the identified issues based on the Codex challenge review results. Only modify necessary files, add or adjust tests, and after fixing, run `npm test` and `npm run build`, but do not commit.

Needs to be fixed:

  1. Do not include `.claude/settings.local.json` in this feature diff. If only local permissions have changed, please restore this file to its state before this task.
  2. Fixed a privacy issue when unchecking "Remember Username": safeRemoveStorage should not swallow failed removeItem events. When removeItem fails, the interface should not pretend that it has been successfully cleared; it should either show the user a clear error status or keep the "Remember Username" checkbox checked.
  3. Fixed the save failure issue: safeSetStorage should not be ignored. There should be user-visible feedback when a user checks "Remember username" and logs in successfully, but localStorage.setItem fails.
  4. When initializing localStorage, read it only once, ensuring that the initial value of username and the state of rememberUsername are derived from the same read result to avoid inconsistencies.
  5. Usernames stored in memory need to be trimmed and validated. Pure spaces should not be initialized as remembered usernames.
  6. Change the localStorage key from saved_username to the application's namespace, for example, codex_login_lab.saved_username.
  7. Add an expiration time to "Remember Username", for example, a 7-day TTL. When saving, write {value, expiresAt}; when reading, if the value has expired, clear it and treat it as if no value was saved.
  8. Supplement test coverage:

– Behavior when removeItem throws an exception

- User-visible feedback when setItem fails

– If you select "Remember username" but the login fails, you should not save the attempted username.

When storing only spaces in localStorage, it should not be initialized with a remembered username.

– localStorage mock/stub needs to be cleaned up after each test to avoid contaminating other tests.

Perfectly resolved; all 12 issues have been fixed.

Case 3: Problem Delivery

when Claude If there are problems with the code you write, you can also hand it over to Codex for fixing.

We let Claude Create a small bug in the code to demonstrate this feature:

Prompt wordsTo test the Codex rescue process, please intentionally introduce a small bug in the current login page: prevent the password input field from being cleared after successful login. Only modify the business logic code, not the tests, and do not commit.

The bug has been created; let's add a test to detect it.

为"登录成功后清空密码输入框"补一个测试。只加测试,不改业务代码,不要提交。

Next, let Codex fix it:

1 /codex:rescue --background fix the failing test with the smallest safe patch

Codex did the correct minimal fix, which is great.

const result = await login(username.trim(), password); setPassword(''); setSuccessMessage(`欢迎回来,${result.displayName}`);

case 4 Session transfer

We just now Claude The code does a lot of things, which is perfect for a transfer. Claude Enter the following in the Code field:

/codex:transfer

It will give us a session ID, which we can use to continue the conversation directly in Codex. In PowerShell, type:

codex resume 019f402e-3ff0-7d42-975d-c88c8bf1e45f

As we can see, we are with Claude All the conversations from Code have been transmitted, so we can now continue this project using Codex.

AI Programming does not converge into an all-in-one tool.

Because real-world development is more like a business process: review, fix, deploy, and each step may be suitable for different... AI.

GitLab 2026 AI Accountability Report: 91% of organizations are using two or more simultaneously. AI Encoding tools: 54% use more than 3.

This indicates that the pain point has shifted from whether or not it exists. AI The question is whether the tools can be used in combination.

Claude Using Code and Codex together isn't for showing off skills, but for... AI After writing, another one... AI Review it once.

codex-plugin-cc letClaude Code handles the main dialogue and implementation, while Codex handles second-person review, solution challenges, issue handling, and conversation continuation. This combination reduces many hidden costs in real-world development: repeatedly switching tools, repetitive explanations of context, manual review, and re-locating issues after test failures.

For us,codex-plugin-cc You can act as a readily available code reviewer. After writing a feature, having Codex review the boundary conditions, test gaps, and hidden risks is more likely to uncover problems than trying to find them yourself by staring at the diff.

codex-plugin-cc It's not about making developers install another tool, but about combining the two... AI The programming assistant was brought into the same work site.

future AI Writing code will become increasingly common; what truly differentiates us is how we organize that code. AI The assistant makes code more stable, reviews earlier, and delivers faster.

Original link:It garnered a whopping 27,000 stars on GitHub.Claude Use Code and Codex together