📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

You Can Run Claude AND Codex Together. Here's How.

Mark Kashef14:50

Transcription

Every single week, somebody seems to pick a winner. One week it's Claude Code, and then the next it's Codex, and this cycle keeps repeating over and over again. But while everyone wants to pick a side, the actual play is to use both. Each model has its strengths and its weaknesses.

[music]

A few weeks ago, OpenAI shipped a plugin that lets you create a dynamic duo of Claude and Codex. Barely anyone is telling you how you can use this plugin to get the best experience possible [music] using Claude Code with the intelligence and the prowess of Codex. So, if you watch this video till the end, even if you find Claude Code feeling dumber sometimes, [music] you'll be surprised how smart it can be when it has a sidekick that looks over its plans every single time. Let's jump in.

So, if you're less familiar with what this plugin looks like, when you go into Claude Code after installing it, which is actually very easy, all you have to do is {slash} Codex. Then behind the scenes, you can see you have all of these options. But all of them are basically designed to look over the shoulder of Claude Code. And the way you'd install it is you just go to this URL right here and you can see it's a native plugin from OpenAI themselves. If you scroll to the very bottom, you'll see all the instructions you need to get started. And if you're feeling extra lazy, you can literally feed this URL to Claude Code and have it take the onus of installing this on your OS.

Now, obviously, the prerequisite to using this is having a ChatGPT account, but you can use the $20 plan. You don't need to overspend on the $100 or the $200 plan. Especially given the way that we're going to use it, you don't need to spend that many tokens to get the full juice out of the Codex models.

Now, big picture, if you go on X or on YouTube, there's always a flavor of the month or the quarter when it comes to a specific model. Nine times out of 10, we have Claude Code on one side and then Codex on the other, and then we have Gemini here sitting in the corner eating crayons, where once in a while they'll release something useful, but the models for something like code are still not that great. But the bottom line here is I still think Claude Code is the best model for things like copywriting, design thinking, even design in general sometimes, as well as writing certain types of coding patterns. And when it comes to Codex, it is a master surgeon. If you tell it to do 1 2 3 4 5, it will execute that perfectly nine times out of 10. So, Codex is more token efficient, especially if you have targeted changes that you want to make. So, instead of digging your heels into one set of models, you can use the best of both worlds and have a devil's advocate at your side at all times. And just to clarify, this Codex plugin isn't meant to replace Claude Code. It's very similar to having this Chrome browser right here, and up here we have a series of Chrome extensions. These extensions basically enrich our existing experience. So, once in a while, if you find Claude Code shotty on creating plans one day versus the next, then having Codex review that plan iteratively leads to much better outcomes.

So, once you install the Codex command line interface and log in, you'll never need to log in again, and the best part is you can remotely change what model you're using. It could be 5.5x high, 5.4. You can play around with the models and see which one is the best for your use case. And probably my favorite part is because you still have the firepower of Codex in that back-and-forth terminal, you can always say, "You know what? I want Codex to plan and actually write this code because it seems like you're way more dialed in on this specific area than Claude Code." So, it doesn't just have to be an advisor, it can also be an executor.

Now, when you install the plugin, you get seven {slash} commands out of the box, but behind the scenes, it really boils down to four key decisions. So, your four decisions would be, number one, I want Codex to look at my code, purely review it and not edit it, just basically double-check and see what flaws there are. So, this is meant to be polite and not steerable. And when I say steerable means you can't do {slash} code review and then tell it to do something very specific or focus on one specific bug that you've adjusted.

Now, let's say you're going back and forth with Claude Code, and then eventually you want to add one specific feature, but you're not really sure if the plan makes sense. This is where it makes sense to use this command, which is my favorite one, which is called {slash} Codex adversarial review. And this is really the glorified devil's advocate, where you can tell it, "Listen, I want you to review this exact plan that Claude Code just came up with for this specific feature." So, you can actually pinpoint accuracy tell it what to look at, and it will even ask you, "Do you want me to look at a brand new thread and explore a brand new thread using Codex, or do you want me to use the pre-existing threads that you've used Codex for in the past?"

Now, the next {slash} command is aptly named code rescue, and the whole point of it is bringing in the equivalent of Codex SWAT team members to take a look at all of your existing code in Claude Code. So, instead of doing something very pinpoint, you are looking at a more holistic overview of your entire codebase. So, let's say you vibe coded something with Opus 4.7 and you keep hitting walls no matter what you try. Bringing in the Codex army to take a look at it and audit all the blind spots that Claude Code might have in its coding patterns might be the kickstart that you need to get unstuck.

This last one is a very powerful, but also very expensive {slash} command to run, and this is basically telling Codex, "I want you to automatically, no matter what, every single time Claude Code generates code, I want you to double-check it." Which in theory again sounds amazing, but when it comes to actual tokenomics, if you don't have the $100, $200 ChatGPT plan and you're using a more potent model like 5.5, you will struggle to pay both bills at the same time. This one might make sense if you're working on something in production that's extremely sensitive and you want to double and triple-check every single step for whatever changes you're making.

Now, using this in the terminal, you want to pay attention to one small detail. If you do {slash} Codex and any one of these, let's do the adversarial review. So, you can tell it things like {dash} {dash} wait, {dash} {dash} background, so you can run this review in the background while you go back and forth with your typical Claude Code session, and you can do things like giving it specific scope just using these {dash} {dash} commands. But if you use something more heavy-duty like Codex rescue and we do Codex rescue and we do space, you'll see you have different parameters, many of which are the same as the first, but in this case, you can also manipulate which model you use from Codex, what it should solve, so this is where you can write in plain English, "Go and rescue, take a look at my repo and tell me all the flaws." Right? So, you can send this over and you can do a {dash} {dash} background after this, and then it would run it behind the scenes and you wouldn't see it until it's completed.

And by the way, if you enjoy the way I teach and you want to go infinitely deeper into something like Claude Code and really understand things like context engineering, how everything comes together, how to actually think versus just purely learn mechanics, then you'll want to check out the first link in the description below for my Claude Code Magic course. It's what's called a living course, meaning we continually add brand new [music] modules every single week that we think will take you to the next level. If that interests you, check out the first link in the description below. All right, back to video.

So, now that you have a good grasp for what these {slash} commands are and how they work, let's actually apply it to a real scenario. So, let's say we have this existing app that I put together. It's meant to be a duplicate or a clone of Bitly. If you don't know what Bitly is, it is basically a URL shortener where you can track things like who's clicking on your link, how many clicks are you getting, etc. So, if I go to my agency website right here, promptadvisors.com, and then we pull this URL, then theoretically, we will get a shortened link. There you go. Here's a link, and theoretically, if I click on this link in incognito, this should open up a brand new browser, and then when I refresh this app, I should see one link click. And obviously, we can keep making this more complicated, add things like geotags, locations, etc. But for all intents and purposes, let's say this is my existing application.

Now, if we go back to the terminal, you'll see that it's already executed this code rescue. It's created a brand new session ID in Codex. It's using the Codex command line interface again. It's creating this audit and it's running it behind the scenes. So, once this is done, it will come back with this job ID and tell us exactly what the overall audit of our existing codebase is. And then anytime you want to check on the status of a background job, all you have to do is {slash} Codex status. And then once it's ready, you can do {slash} Codex result. So, now it tells you it's still running for the past 4 minutes, and depending on the size and complexity of your codebase, it could take anywhere between 4 to 15 minutes to do this full review.

Now, this ran for close to 25 minutes, and it went through every single possible case that was critical, that needed to be corrected, anything that would stop this app from scaling or having performance issues in the future, anything related to security, privacy, project hygiene in general, and what it didn't have time to verify. So, you can absolutely use this as the perfect second set of eyes for anything that Claude Code would have missed because Claude Code has a tendency to get excited, it can actually build the thing, but it basically overlooks a series of edge cases along the way until you point them out.

Which is a good segue to the second way that I use this dynamic duo, and this is the number one use case I use the plugin for, which is the adversarial planning loop. I actually have a looping function on my computer where I do {slash} and then some command, and then it runs through and creates a plan with Claude Code, then audits the plan with Codex, and it keeps going until Codex no longer has any glaring issues to bring up. But you don't have to go that far. You can just start off with a plan V1, and then you have Codex review set plan, then we have plan V2, and if you really want to double-check whether Claude Code synthesized all of the criticisms from Codex, you can go back to Codex until Codex has nothing else to say, then you can feel a lot more confident moving forward.

So, let's say you wanted to add a brand new feature to your URL shortening app, and you want to add some form of expiration date for these links. So, let's say say add expiry dates, don't code, go over the edge cases, time zones, and what if expiry is in the past, output a numbered plan. So, Claude Code itself will create this full plan right here, and then if you read it, a lot of people will just close their eyes and say, "Yep, go build it." It will say it's done, and then you will check and find all the bugs for yourself. What you can do is send this specific prompt where you do {slash} Codex adversary review, double-check this plan against the code in insert path here. Then it will ask you, "Do you want me to run this in the background or do you want to wait for the results?" And basically block anything else from moving forward until we have the second review.

So, I'm at the point now in my agentic workflow journey where I will spend anywhere between 30 minutes to an hour and a half purely planning, not writing a single line of code. Because if you have the perfect plan or something close directionally to perfect, implementation is the easy part. It's really the planning and looking for those extra edge cases which will save you tons of time and tokens.

Now, pattern number three is useful if you're locked in and you're in a flow state. Because what you can do is you can keep going back and forth with Claude Code and building on your app incrementally while you have Codex go and run tests on every single feature that you make. So, pattern three is meant to keep you in your flow state. If you're going back and forth with Claude Code and you don't want to go down a rabbit hole fixing one particular bug. So, let's say we go to our app here and we added an additional page where you could check exactly what's happening in real time with any one of these links or where it's being used or who's using it. So, in our app, let's say you created another page here where you could change this shortener to a custom URL of your choice. This could be a very complicated feature. So, maybe Claude Code finishes it, says it's done, says it's ready, and you have Codex go and take a look at it in the background while you keep building on the app. So, essentially, the workflow would be you would do {slash} Code Rescue or {slash} adversary review for that specific feature. Then you would wait, do {slash} Codex status to see how it's going, or you can just do {slash} Codex result. And like you saw before, you'll have the full breakdown of what happened.

Pattern number four is before you finally ship something. Whether that's a PowerPoint deck or it could be an Excel file or an actual app. Claude models are notorious for being trigger-happy for shipping things. So, you can put the brakes on purpose with something like a Codex to be the Debbie Downer that you really need to take a look at all of your code to see, do you have anything that would expose personal data? So, you can purposely employ a Debbie Downer at all times to stop your app from shipping and double-triple-checking that your initial requirements are set. And you'll find that Codex is good at thinking of the next, second-order, and third-order derivative consequences of not having something in there. So, while these Claude models are performing on and off these days, I employ this quite a bit to make sure that Claude Code could do the 80 and then Codex can bring us to the 20. And our goal is to not fall into this hole where we are always absolutely right according to Claude Code. You want to challenge yourself and you want to challenge it.

And pattern number five is really bringing everything together, which I use every single day. Step one, I will open up and fire Claude Code, come up with a plan, go back and forth on that plan. Once we're good to go, I will then set an adversary review on said plan to come up with adjustments to that plan. And again, I have my own {slash} command that loops through this entire process until we get to the part where we're ready to implement. And then when it comes to implementation, if you find Claude Code not doing the best of jobs on one particular domain, you can always ask Codex to take over the keyboard, metaphorically, and write the code itself. And once you're good to go, you're ready to ship. And this gives you a much richer experience where you can get the strengths of both models at the same time.

Now, in terms of economics, assuming that you want Claude Code to still be your daily driver, I would recommend the $100 max plan from Claude Code, and then you layer on the $20 from Codex. Because for all intents and purposes, at least the way that I'm using it, it is the plan auditor. It is the code auditor. Once in a blue moon, it will write the code itself. But because we're using it primarily for auditing, we don't need as much firepower to generate the code as you do with something like Claude Code.

So, hopefully this drives home the point that you don't need to get into these weird bickering wars where you pick one team versus the other team. You can use both Claude and Codex [music] together to get farther, to have a second set of eyes, and to be able to get different ideas from different models trained in different ways.

Now, just in case you want any of the diagrams I showed you here to use as a cheat sheet, I'll include this and some accompanying information that you can use and refer to in case you want to implement this on your end as well. And for those that want to go infinitely deeper in Claude Code and see what my workflows look like day in and day out, as well as all the context engineering that I use to make the best out of every single model, then you'll want to check out the first link in the description below for my Claude Code Magic Course. And for the rest of you, if you found this video helpful and a breath of fresh air, and you want to see more Claude Code and Codex content >> [music] >> together, then do let me know in the comments below and I'll see you in the next one.