Back/How I AI
Blog
How I AI

How I AI: 3 Advanced Codex Workflows for Faster, Smarter Development with OpenAI's Alex Embiricos

Unlock the full potential of OpenAI's Codex with these practical workflows from product lead Alex Embiricos. Learn how to manage parallel development with Git worktrees, architect complex projects using the Plans.md technique, and automate code reviews in GitHub to massively accelerate your engineering velocity.

Claire Vo's profile picture

Claire Vo

January 12, 20269 min read

I was hyped for this episode because we finally get to do a deep dive into a tool that is fundamentally changing software development: Codex. And who better to guide us than Alexander Embiricos, the product lead for Codex at OpenAI.

For so many of us, AI coding assistants started as fancy autocomplete tools. But as Alex demonstrates, we've moved far beyond that. Codex is evolving into a true software engineering teammate, capable of not just writing code, but understanding context, planning complex projects, and even participating in code reviews. It’s a powerful partner that can help you whether you're a product manager trying to make a quick change to a repo you've never seen before, or a senior engineer architecting a massive, production-ready application.

In our conversation, Alex breaks down several incredibly practical, real-world workflows that the team at OpenAI uses every day. We go from a true "zero-to-one" Hello World example to the sophisticated planning techniques that allowed a small team to build the entire Sora Android app in just 28 days. He shows us how to manage parallel tasks without creating a mess of merge conflicts and how to automate one of the biggest bottlenecks in modern development: the code review process.

This episode is packed with actionable advice, specific prompts, and terminal commands you can start using immediately. Let's dive in and learn how to truly partner with Codex to accelerate your work.

Workflow 1: From Zero to One with Codex in Your IDE

One of the most common hurdles, especially for semi-technical folks like product managers or designers, is simply getting a new project running locally. Before you can even suggest a change, you have to understand the codebase. Alex kicked things off by showing how Codex can be your guide from the moment you clone a repo.

Step 1: Installation and Understanding the Codebase

First, you need to get Codex set up. Alex works in VS Code, where you can install the Codex extension directly from the marketplace. Once installed and logged in (it’s included with your ChatGPT Plus plan), a little Codex glyph will appear in your sidebar. Alex shared a great pro-tip: drag the Codex icon from the primary sidebar to the secondary sidebar on the right for easier access.

A detailed look at the Visual Studio Code Extensions Marketplace, featuring the 'Codex - OpenAI's coding agent' extension with its key features, installation data, and a list of related AI coding tools.

With a new project open, the first step is often just figuring out what you're looking at. Instead of bugging an engineer, Alex just asks Codex:

How do I play this game?

Codex immediately provides the context and the command needed to get the local server running.

npm run dev

This is a perfect example of using an AI agent to handle those small, foundational questions that can often block non-engineers from getting started.

Step 2: Making a Simple Change with Natural Language

Once the game was running, Alex noticed a bug: the character's jump was way too high. For a small change like this, you don't need a complex plan. You can just tell Codex what you want in plain English.

He opened the Codex chat and typed:

jump is way too big, lower please.
An AI prompt, 'that jump is waaay too big,' being typed into an integrated chat interface within a VS Code-like environment, while the terminal displays ongoing server activity initiated by `npm run dev`.

Instantly, Codex gets to work. It forms a plan: identify the code responsible for the jump mechanic, reduce the jump height value, and verify the change. It then presents the file diff for approval. This simple, conversational workflow empowers anyone to make and test small changes without needing to be an expert in that specific codebase.

Workflow 2: Managing Parallel Development with Git Worktrees

As you get more comfortable, you'll want to tackle multiple tasks at once. But what happens when those tasks might conflict? Running parallel changes on the same branch can lead to a nightmare of merge conflicts. Alex shared a fantastic power-user workflow for this: using Codex to manage Git worktrees.

Step 1: Let Codex Create Your Worktrees

A git worktree lets you have multiple working copies of your codebase checked out to different branches simultaneously, all managed by a single Git instance. It's perfect for prototyping conflicting ideas. But who can remember the exact git commands? Alex doesn't bother; he just tells Codex what to do directly from the terminal.

He uses a handy shortcut to pass a prompt to Codex upon launch:

Codex in here, create two new work trees off the main branch, one called French and one called German.
A terminal window displaying two tabs: one showing the incomplete command `codex codex --` and another featuring an AI prompt 'How do I disable Codex Aut', illustrating interaction with an AI coding assistant in a command-line environment.

Codex executes the necessary git worktree add commands, and instantly, he has two new directories, French and German, each representing a clean copy of the codebase on a new branch. This is a brilliant use of AI to handle developer toil and lower the cognitive load of using advanced tools like Git.

Step 2: Run Parallel Tasks in Isolated Environments

With the worktrees set up, Alex can now run two separate, parallel tasks without fear of them interfering with each other. He opens two terminal tabs:

  1. In the first tab: He navigates into the French directory and gives Codex a task.
cd French
    # Then runs Codex with the prompt:
    translate the input field placeholder strings to French
  1. In the second tab: He does the same for the German directory.
cd German
    # Then runs Codex with the prompt:
    translate the input placeholder string to German
A technical demonstration showing an active terminal window with multiple tabs. The screen displays various `codex` commands, including directory navigation and a file listing, alongside a partial AI prompt to `codex` asking 'How do I disable C...'. This illustrates interaction with a development tool or AI assistant via the command line.

Now, two instances of Codex are working in parallel on the same codebase but in completely isolated environments. Each change can be reviewed, tested, and merged independently. It's a professional-grade workflow that ensures you can move quickly on multiple fronts without tripping over yourself.

Workflow 3: Architecting Complex Projects with the Plans.md Technique

Simple fixes and parallel tasks are one thing, but what about building a major, production-grade feature or application? Alex explained that for complex projects like the Sora Android app, the team at OpenAI doesn't just "vibe code" and hope for the best. They use a structured planning process, and they use Codex to help them create the plan itself.

This is where the Plans.md technique comes in, a method detailed on the OpenAI blog. It involves giving the model a meta-plan—a set of instructions on what makes a good plan—to guide its thinking.

Step 1: Create a Plans.md File

The process starts by creating a file in your repository, typically named Plans.md. You then copy and paste the template from the OpenAI blog post. This template tells Codex how to structure its output, instructing it to create self-contained milestones, consider edge cases, and update the plan as it works.

Screenshot from the OpenAI Cookbook website, displaying the `PLANS.md` document which provides a structured template for AI execution plans, including sections for milestones, design decisions, and progress tracking.

Step 2: Generate the Implementation Plan

With the Plans.md file in place, you can now ask Codex to generate a detailed plan for your complex task. For example, to create a Python SDK based on an existing TypeScript one, Alex used this prompt:

using Plans.md make a plan to build a Python SDK based off our TypeScript SDK. put it in temp.md

Codex then chews on this for a bit and produces a comprehensive, multi-step plan. In Alex's example, it generated a 120-line document that correctly identified naming conventions, broke the work into logical to-dos, and laid out a clear path forward. This gives the human engineer a chance to review the architecture and the approach before a single line of code is written.

A detailed Python SDK development plan, generated by an AI assistant and displayed in a VS Code markdown editor, demonstrates AI-powered code planning during a 'How I AI' podcast.

Step 3: Execute the Plan

Once you're happy with the plan (and you can iterate on it with Codex in the same chat thread to preserve context), you can kick off the execution with another simple command:

implement the plan in sdk_plan.md

Codex will then methodically work through the plan it created, which for a task like this might take 30 minutes to an hour. This workflow combines the strategic thinking of a human architect with the tireless, diligent execution of an AI agent, which is exactly how you achieve the kind of velocity needed to ship a major app in 28 days.

Bonus Workflow: Automated Code Review in GitHub

As we write code faster with AI, the bottleneck quickly shifts from generation to review. To combat this, the OpenAI team has integrated Codex directly into their GitHub workflow to perform automated code reviews.

When a developer opens a pull request, Codex automatically scans the changes. The key here, as Alex pointed out, is to protect scarce human attention. The tool is calibrated to only flag issues it has very high confidence in.

A technical demonstration of OpenAI Codex within a terminal, showing commands (e.g., `cargo test`, `git`), token usage statistics, and options for AI-assisted code review like 'PR Style' or 'Review uncommitted changes'. The interface also displays an error related to resolving a host and a 'conversation interrupted' message from the AI.

This is where it starts to feel like magic. If Codex finds an issue, a human engineer can simply reply to the comment in the PR:

Hey, codex, can you fix it?

Codex will then create and push a new commit with the fix, closing the loop entirely. If it finds no issues, it simply adds a thumbs-up emoji and stays out of the way. This integration is now used on almost every repo at OpenAI, dramatically speeding up the review cycle while maintaining a high bar for code quality.

Conclusion

My conversation with Alex really drove home the point that we are entering a new era of software development. The role of an engineer is shifting from a line-by-line code author to an architect, a reviewer, and a curator of AI-generated work. Tools like Codex help you type less AND work at a higher level of abstraction.

By leveraging workflows like parallel development with worktrees and structured planning with Plans.md, you can massively accelerate not only your execution but also your learning and prototyping cycles. The ability to quickly test conflicting ideas or generate a detailed architectural plan before committing to a path is a superpower. And with integrations like automated GitHub reviews, we can begin to automate the toil out of the entire development lifecycle.

I encourage you to try these workflows yourself. Start small by asking Codex to explain a new codebase, then graduate to managing worktrees and generating plans. The hit us up with your favorite Codex tricks!

---

Brought to you by

  • Brex: The intelligent finance platform built for founders.
  • Graphite: Your AI code review platform.

Become a 10x PM.
For just $5 / month.

We've made ChatPRD affordable so everyone from engineers to founders to Chief Product Officers can benefit from an AI PM.