Skip to content

CLAUDE CODE vs CODEX: quem ENCONTRA MAIS ERROS no seu CÓDIGO?

Read the Portuguese translation →

Author: Sandeco · Watch on YouTube

Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.

Original language: English

Original video: CLAUDE CODE vs CODEX: quem ENCONTRA MAIS ERROS no seu CÓDIGO? · Channel: Sandeco · 10:14 · Watch on YouTube

Topics: AI agents, AI evaluation and benchmarks, Claude Code, Software engineering with AI

The video demonstrates an adversarial code-review workflow in which Claude Code and Codex take turns writing code and reviewing each other’s work. The presenter first shows how to invoke each tool from a terminal, then has Claude Code create an Edmonds algorithm implementation and Codex create a B+ tree. Each tool identifies issues or suggests improvements in the other’s code, and the presenter describes applying fixes and running tests. The central argument is that cross-review by AI can help reduce the human-review bottleneck as AI-generated code becomes harder to evaluate quickly.

  • The presenter demonstrates calling Codex and Claude Code from a terminal and passing them prompts.
  • Claude Code is asked to write a Python implementation of the Edmonds algorithm for finding the maximum number of pairs.
  • Codex is asked to write a Python B+ tree supporting search, insertion, deletion, and range queries.
  • Claude Code calls Codex to review its Edmonds algorithm implementation, and Codex calls Claude Code to review its B+ tree.
  • The reviews identify potential issues and areas for improvement without automatically changing the files.
  • The presenter applies suggested fixes and reports tests, including brute-force checks on 500 graphs and 24,000 random B+ tree operations.
  • The presenter says that human review can become a bottleneck when AI produces large amounts of code.
  • The video presents adversarial review between AI tools as a way to make code evaluation faster, while not replacing human understanding.
Start Chapter Summary
00:00 Introducing AI code review The presenter explains the idea of having Claude Code and Codex write and review each other’s code.
01:06 Calling the tools from a terminal The presenter demonstrates invoking Codex and Claude Code and passing each a simple prompt.
03:17 Writing code and requesting reviews Claude Code writes an Edmonds algorithm implementation and Codex writes a B+ tree, after which each is asked to review the other’s work.
06:25 Review findings and applying improvements The tools report issues and suggestions, and the presenter describes applying fixes and testing the implementations.
09:06 AI review and the human bottleneck The presenter argues that cross-review can help address the growing difficulty of evaluating AI-generated code quickly.

will one be able to find the other’s mistake? — 00:31

in this adversarial review, you can review a lot of code with two harnesses connected to each other — 05:23

These artificial intelligences, despite having similar power, okay? They were trained with different databases — 07:27

human evaluation ends up becoming a bottleneck in the process. — 09:38

Claude Code, Codex, OpenCode, Antigravity, Edmonds algorithm, B+ tree, adversarial code review, Google, Sandeco

00:00 Tell me something, do you trust code written by an AI without reviewing it yourself? What if I use another artificial intelligence to try and find errors that went unnoticed during programming? Today, Cloud Code will write some code and Codex will review it, because this is the style I’m using now to create my code. Later, we will swap them. Codex will write some code and Cloud Code will look for the flaws. One builds and the other questions. But

00:31 will one be able to find the other’s mistake? Or will they both agree on the same incorrect code? That is what we are going to put to the test today. In this video, I will show you how to perform code review using artificial intelligence as well. All right, I have Cloud Code open here on the left side and Codex open here on the right side. Got it? I’m going to ask Cloud Code the following question, look. What terminal command would you use to call Codex in free permission mode? So, if I press enter here, it will return exactly

01:06 which terminal command I could use to call Codex directly. So, to run Codex, I would call codexe dash iolo. And here is the task, that is, the prompt. So, I’ll take it here, I’ll copy it here, open a new Windows terminal anywhere here, no problem at all. I’ll paste it and in this new task I’ll tell it like this, look. say hello Sandeco. And what will happen then? It will immediately open, right, the terminal here. Did you see what happened? It opened the

01:40 terminal, right, the communication with the model here in the GPT6 Astra model, Open provider, right, no approval needed and all that. Its reasoning will be high, right? And down here I will say hello, say hello Sandeco. That’s what the user said, in this case me. And here is Codex answering hello Sandeco. All right. Now let’s invert it . I’ll close the terminal here. Actually, I won’t close it. I’ll just run a CLS here to clear the screen. I’ll leave this terminal quiet right here. And now I’m going to invert it, I’ll call Codex at this point and tell it like this, look. What terminal

02:13 command would you use to call Cloud Code in free permission mode? And then, if I enter here, it will execute this information and bring me the command I could use to call Cloud. All right? Naturally, it will pull from, you know, the official documentation. But you see , you’re going to see that the two harnesses know how to communicate, okay ? So, look, in the same way, right? Cloud main minus minus dangerously ski permissions, right? Eh, OK. And how,

02:44 and how would I pass the prompt in this command? This, this thing here, this that I’m showing you has a lot, is very useful, because I’m going to show you that very soon we can make the two projects talk to each other. So, if I copy it here now, I’ll go back to the terminal we were using before to execute this command here, only I’m going to say the same command I asked, right? Say hello Sandec. Alright, let’s go. So, now opening the cloud, it

03:17 called here for execution, it’s going to call, telling it to say: “Hello, Sandeco, hello Sandec”. And then everything’s fine, it worked, it was a beauty, right? Now, what happens is the following. Well, now I’m here in VS Code with Cloud Code and with Codex also open here in a project, okay? And I’m going to ask Cloud Code to write an algorithm. It’s going to be the Edmonds algorithm, okay? Let’s do the following , look. Here I’m going to ask him exactly this, look. Write, right? I’ll put it here at the top. Write a Python

03:48 program for the Edmonds algorithm, where it finds the largest possible amount of pairs in a network of connections, without using the same participant in two pairs. For example, it allows forming the maximum number of pairs between compatible people, reorganizing previous combinations when this makes it possible to include more participants. This algorithm here, folks, it’s quite annoying to do, a bit complicated. I’m going to tell him here . Besides that, look, name the file cloud.py. I wrote it wrong here, let’s

04:21 put cloud, right? Let’s go. Tell Cloud to do it. Now I’m going to ask Codex to write the following, look. Write a Python program for a B + tree and organize information in a branching structure that allows searching, inserting, and deleting records efficiently, facilitating range queries . Name the file codex.py. So I’m going to send it here now and it’s going to construct this algorithm. Now that Codex is building its code, I’m going

04:51 to ask Cloud itself here to call Codex, okay? In another session to review its code. So I’m simply going to say, look, call Codex to review your code. Ask it to analyze, look for problems and errors, and return a report to you. So I simply ask for this here and send it to Cloud Code. Now Cloud Code will use the code I showed you previously, calling Codex. And Codex will analyze

05:23 the file, returning the review that Cloud Code requested. And so, in this adversarial review, you can review a lot of code with two harnesses connected to each other, get it? This works very well with Cloud Code, Codex, and Open Code. Unfortunately, with Antigravity, it’s not possible to do this. Even with Antigravity there, the CLI, right, the little Antigravity client. Unfortunately, Google hasn’t released an interesting way to call it. I’ve tested it several times and haven’t succeeded. If you manage to do

05:54 it, put it down there in the description, as I’m very interested in that. Got it? But for now, I haven’t managed it yet, but notice that it’s calling here and waiting for Codex to do its analysis. Now, since Codex finished here, let’s do the reverse. Let’s ask Codex to call Cloud Code to analyze the code it created, right? So I’m going to do the following here, look. I’ll put here: ask Cloud Code to analyze and review the code, looking for problems and areas for improvement. So I’ll send this to it, and now Codex

06:25 will call Cloud Code asking for the review. So this is really cool, right? Because now I also have this adversarial approach where Codex has another person to give an opinion on its code. See here, look, Codex has already found something, do you see? It’s saying that Codex reviewed cloud.p and found an error in the algorithm’s logic. It didn’t change any file, okay? But it did make some suggestions, right ? It saw there, uh, high index without validation, right? Problems it pointed out, a high problem, right? High

06:57 problem, index without validation, okay ? So it found that and made a suggestion for improvement. Medium complexity, slowness without edges, okay? Low complexity, negative n accepted. So that is one more solution. And low duplicate edges. And then Cloud Code itself asks: “Do you want me to apply these fixes?” You say yes, if you agree with this request, yes, apply the fixes. And now you will have code that was corrected by another artificial

07:27 intelligence. These artificial intelligences, despite having similar power, okay? They were trained with different databases, folks. There is nothing equal, exactly the same, in the training of these neural networks, okay ? So this is cool because you have several Transformer network paths traveling through the same code to look for problems. It says here that it applied the four corrections for the edge indices, duplicate edges, and isolated vertices, right? It says it tested with brute force on 500 graphs, right? with duplicate edges, inverted edges, and loops, and all of them

07:59 yielded the correct result. Invalid inputs also led to an expected error. So, we have an evaluation here, right, already positive regarding the Cloud Code’s code. Very well, the review finished here. It says the following: the cloud reviewed the file and found no functional bugs in reading the code. It considered the balancing, the deletion, and the leaf linking correct. Got it? It’s a tree, right? So let’s go . Uh, but it pointed out improvements. This is very cool, look. Performance, right? Custom keys, memory, okay? And

08:34 compatibility. Got it? Those were the cloud’s improvement suggestions. And it asks here, right, if you want to apply them. So, I’ll say here, right, apply these improvements. Improvements. OK. One was missing here, so I’ll send it to it here. OK. Then the Codex says here, look: improvements applied in codex.py, right, separators updated, without re-traversing subtrees, okay? Uh, there is a new range iterator that delivers one record at a time, and the

09:06 range continues returning a list, right ? Requirements for keys and Python were fully documented. It says it ran four tests here. All of them passed, including 24,000 random operations and balancing checks. So, look closely at what I want to say with all this here. In AI code generation, the amount of code is increasingly becoming almost impractical for a human to evaluate. Obviously, what would be ideal? You yourself coming here and opening, right , the code to understand, right, the

09:38 Edmonds algorithm here, got it? Or opening the Codex here, got it? and opening, understanding the B + Tree, and checking for problems in this code, right? But what is happening is that the amount of code is becoming impractical for a human to evaluate, right, properly in a timely manner. So, human evaluation ends up becoming a bottleneck in the process. And so when you have adversarial evaluation here, in this way, as I am teaching you, the Codex with the Cloud Code, it becomes much more interesting and things become

10:14 much faster. Got it? Well, I hope you enjoyed this video. A big hug to you and see you next time. M.