A few weeks ago, OpenAI announced that Codex is available for Plus users, and I didn't miss a chance to try it. And today, I'm excited to share a guide to OpenAI's Codex. As a developer, I've found it to be a powerful and practical tool.
OpenAI Codex is an AI model that turns your plain English instructions into code. It supports dozens of programming languages (including Python, JavaScript, Go, Ruby, and more) and is powerful enough to understand and generate code in those languages.
In essence, if you describe a programming task or ask a question about code, Codex will try to produce a helpful answer in the form of code or an explanation.
It’s built upon the GPT (Generative Pre-trained Transformer) family of models, specifically trained on a massive dataset of publicly available source code from GitHub and natural language text.
However, don’t confuse, Codex is not an extension for your IDE, it’s a cloud-based software engineering agent that can work on multiple tasks in parallel. You connect it to your GitHub repository, give it tasks in plain English, and it goes to work. That simple! :)
It can:
Alright, theory is nice, but let’s get practical. To try Codex, you will need at least a Plus subscription for ChatGPT and a GitHub account.
Simply open https://chatgpt.com/codex and log in to your account.
The first big step is connecting your GitHub account. Once you click the “Connect to GitHub” button, you’ll be redirected to GitHub to authorize OpenAI.
GitHub will ask you what repositories you want to grant Codex access to. You can choose:
Once authorized, you’ll be taken back to the Codex interface.
Codex works with “environments.” Think of an environment as a dedicated workspace for a specific repository (or a branch within it).
Select your GitHub organization and repository from the dropdowns (these are populated based on the permissions you just gave).
If you want to give Codex access to the internet, you can switch the “Agent internet access” toggle to “On”. It will use it during its setup phase, for example, to download packages. After setup, internet access is usually disabled for the actual coding task for safety.
Then click the “Create environment” button.
Once your environment is ready, you’ll see a main screen with an input box labeled “What are we coding next?” This is where the magic happens! You tell Codex what to do in simple English.
Example tasks:
To get the best out of Codex, simply follow these simple rules:
You’ll see a list of tasks. Codex will show its progress: “Starting container,” “Downloading repo,” “Reading AGENTS.md” (if you have one — more on that later!), “Exploring files,” “Thinking,” “Running a command,” etc.
Reviewing is super important. Codex is an agent, not a perfect oracle. You must review its work.
Once a task is done, you’ll usually get a notification or see the status update.
Clicking on a completed task often shows you a “diff” — what lines were added (green), what lines were removed (red), just like in a Git diff. This is your first line of defense.
There’s usually a “Logs” tab where you can see the step-by-step actions Codex took, commands it ran, and its thought process. This is invaluable for debugging if something went wrong or understanding why it made certain choices.
If you’re happy with the changes, there’s often a “Create Pull Request” button right in the Codex interface.
This will create a new branch in your GitHub repo with Codex’s changes and open a PR for you! It even tries to write a decent PR description.
From there, it’s your standard GitHub workflow: review, comment, request changes (you might ask Codex to iterate!), and eventually merge.
For more examples, please watch my video tutorial.
In my video tutorial, I’ll take you through all the steps from start to finish.
Watch on YouTube:
The ability to delegate entire chunks of work to an AI that understands the context of your whole project is incredibly powerful. It won’t replace developers, but it will change how we develop. It can handle a lot of the boilerplate, the initial scaffolding, or even complex refactoring tasks, freeing us up to focus on the harder architectural problems and more creative aspects of software engineering. I’ll continue playing with it and see if it becomes my everyday tool.
Please let me know your experiences if you’ve used it!
Cheers! :)