VOOZH about

URL: https://thenewstack.io/testing-openai-codex-and-comparing-it-to-claude-code/

⇱ Testing OpenAI Codex and Comparing It to Claude Code - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2025-06-28 09:00:23
Testing OpenAI Codex and Comparing It to Claude Code
tutorial,
AI Agents / Developer tools / Software Development

Testing OpenAI Codex and Comparing It to Claude Code

OpenAI Codex doesn't have the bells and whistles that a vibe coder might desire. But as a tool for experienced developers, it shows promise.
Jun 28th, 2025 9:00am by David Eastman
👁 Featued image for: Testing OpenAI Codex and Comparing It to Claude Code
Photo by Ruhan Shete on Unsplash.
This has been quite the month for “agentic” products. I had a good experience with Claude Code in one post and then compared it to Google Jules. Meanwhile, you can read elsewhere about the new Gemini CLI, and I’ll cover Warp’s “Agentic Development Environment” shortly. But with this post I’ll look at OpenAI Codex, released last month, which OpenAI describes as a “cloud-based software engineering agent.” As with the other products I’ve mentioned, Codex works in the Command Line, not in an editor. Codex doesn’t have the bells and whistles that a “vibe coder” might desire; and indeed, it is very likely to have been conceived purely as a tool for experienced developers.

Starting With OpenAI Codex CLI

Let’s start up this “experimental” project — still only a GitHub page — with a very straightforward npm package.
npm i -g @openai/codex
In some respects, Codex is a bit more ”down home,” as it asks you to tie your API key straight into an environment variable:
export OPENAI_API_KEY="your-api-key-here"
You can find your OpenAI keys here. It will be quite long. You can also use a settings file. To start an interactive session, just use the command codex: 👁 Image
It actually has a better starting summary than its agentic competition, like Claude Code, because it immediately states that it makes suggestions and seeks approval before doing anything destructive. We can also see the model, and the working directory — it doesn’t appear to want or need a context file. Typing “Exit” will let you leave.

Updating JSON Content

My task is simply updating the contents of one JSON file compared to another. This is based on a recent issue I had with a colleague because we weren’t sharing a JSON file on git, so we suddenly got a little out of sync. A JSON file is just a set of key/value pairs. Some people refer to the key as the name field. In the example below, the file just holds city information (some text and an image) and there is an ‘id’ key that allows for direct comparison. Think of the entries as data for a website. The interesting nuance is that the “image” key is probably pointing to a real resource, so instead of updating it with a new image reference directly (that may not exist yet), I asked my colleague to create a “imageintended” key to hold image updates. Of course, navigating indistinct human descriptions is one of the challenges for LLMs. If the LLM always needs exact input, then the dreams of development democracy will evaporate as an experienced developer will always need to be on hand. JSON data isn’t explicitly designed to be compared in this fashion, so a little care must be taken. OK, now to set up out the JSON files. I created the first poorly written original_cities.json file in the working directory:
{ 
 "cities": [ 
 { 
 "id": "London", 
 "text": "London is the capital of the UK", 
 "image": "BigBen" 
 }, 
 { 
 "id": "Berlin", 
 "text": "Great night club scene", 
 "image": "Brandonburg Gate", 
 "imageintended": "Reichstag" 
 }, 
 { 
 "id": "Paris", 
 "text": "Held the Olympics of 2024", 
 "image": "EifelTower", 
 } 
 ] 
}
Note the trailing comma in the Paris entry, as well as the misspelling of “EifelTower” — even though it is just an image name. Also note the spelling and poor format of the Berlin image name. Here is the updated_cities.json file:
{
 "cities": [
 {
 "id": "London",
 "text": "London is the capital and largest city in Great Britain",
 "image": "BigBen"
 },
 {
 "id": "Berlin",
 "text": "Great night club scene but a small population",
 "image": "BrandenburgGate",
 "imageintended": "Reichstag"
 },
 {
 "id": "Paris",
 "text": "Held the Olympics of 2024",
 "image": "NotreDame"
 },
 {
 "id": "Rome",
 "text": "The Eternal City",
 "image": "TheColleseum"
 }
 ]
}
Note that the image name is corrected, but that means it can no longer reference the original. Now here is my roughly put request to Codex: “please update the JSON file original_cities.json with the contents of the file updated_cities.json but if the “image” field is different, please update or write a new “imageintended” field with the new value instead” In other words, updated contents is fine, but preserve the image name as updating this could cause issues. While thinking about this problem, I got back plenty of permission requests, mainly for sed commands: 👁 Image
Of course, this assumes I know what the sed command will do! Finally, it produced a patch: 👁 Image
And then it finished: 👁 Image
It had indeed modified the original_cities.json file correctly:
{
 "cities": [
 {
 "id": "London",
 "text": "London is the capital and largest city in Great Britain",
 "image": "BigBen"
 },
 {
 "id": "Berlin",
 "text": "Great night club scene but a small population",
 "image": "Brandonburg Gate",
 "imageintended": "BrandenburgGate"
 },
 {
 "id": "Paris",
 "text": "Held the Olympics of 2024",
 "image": "EifelTower",
 "imageintended": "NotreDame"
 },
 {
 "id": "Rome",
 "text": "The Eternal City",
 "image": "TheColleseum"
 }
 ]
}

Conclusion

Claude Code actually made a bit of a mess of this, but Codex not only does the merge well, it also provided a very good set of notes about why it did what it did. It fixed up the minor format error, but didn’t get confused by English spelling errors and understood the need to preserve the image reference. However, it clearly did understand the changes it was making — the notes make subtle reference to the purpose. During the thinking process, it asked for permission plenty of times, as we knew it would. Unlike Claude Code, it did not exactly create a transparent plan to follow. It just outputs a heap of sed commands, but these clearly proved good enough when executed. This makes it much less controllable from a vibe coding point of view, because someone inexperienced with code needs to know what will be happening. I wonder whether this is the prototype for a bigger product, or whether OpenAI will cede ground for the moment to Anthropic, Google and Warp — honing its experiment before coming out with its own view of the perfect agentic experience.
TRENDING STORIES
David has been a London-based professional software developer with Oracle Corp. and British Telecom, and a consultant helping teams work in a more agile fashion. He wrote a book on UI design and has been writing technical articles ever since....
Read more from David Eastman
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Anthropic, OpenAI.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.