Build Hour: Codex
A hands-on walkthrough of Codex, now a single, unified agent across your IDE, CLI, and GitHub. This summary covers new features like the IDE extension, automated code review, and best practices for delegating tasks to the local and cloud agent for a more efficient development workflow.
Recent updates have transformed Codex into a single, unified software engineering agent, accessible everywhere you code and connected by your ChatGPT account. This evolution moves away from the previously siloed experiences of the Codex CLI and the asynchronous cloud agent in ChatGPT, creating a more cohesive and powerful workflow for developers.
The new, unified Codex is built on the advanced coding capabilities of GPT-5 and introduces several key features:
- New IDE Extension: Brings the power of the Codex agent directly into VS Code, Cursor, and compatible forks, allowing for seamless pair programming alongside your code.
- Revamped Codex CLI: The open-source CLI is continuously improved, with a better UI and harness to make it more reliable and capable.
- Automated Code Review: When enabled in a GitHub repository, Codex automatically reviews new pull requests, providing insightful feedback and identifying edge cases.
- Local-to-Cloud Handoffs: Developers can start tasks locally and seamlessly hand them off to the secure cloud agent to run asynchronously, freeing up their local machine.
A New Mental Model for Codex
To best leverage Codex, it’s helpful to think of it along two dimensions:
-
Where You Use Codex: This is the developer’s interface.
- IDE: For working directly alongside your code.
- CLI: For developers who prefer the terminal.
- GitHub: For automated code reviews.
- Web/Mobile App: For kicking off asynchronous tasks anytime, anywhere.
-
Where Codex Runs: This is the execution environment.
- Locally: On your machine for direct pair programming, where it can modify your local environment.
- Remotely: In a secure cloud sandbox for asynchronous tasks, which culminates in a pull request.
This model simplifies the experience, making Codex feel like a single, ubiquitous product, much like GitHub is accessible via CLI, web, and mobile but is still just “GitHub”.
Practical Workflows and Demonstrations
A live demonstration using the open-source agents-sdk-ts repository showcased several powerful workflows.
Local Pair Programming with the IDE Extension
The IDE extension offers multiple modes for interaction. In Chat Mode, it acts in a read-only capacity to answer questions about the codebase, such as “What is this repo about?” or “What is the most comprehensive real-time API example in this repo?”.
In Agent Mode, Codex can actively modify code. A task was given to update a React UI to change from capturing a single static image to a continuous stream at one frame per second. The agent analyzed the shared components and proposed changes, which could be accepted, rejected, or refined with follow-up instructions.
Asynchronous Development: Delegating to the Cloud
A key productivity gain comes from delegating tasks. While the local agent was working on the UI, two separate tasks were kicked off to run in the cloud agent:
- Update the Twilio example to include new MCP (Media Control Protocol) examples.
- Perform a similar update on another example app.
This highlights a shift in mindset from being an individual contributor to acting as an architect or engineering manager, structuring and delegating tasks to be worked on in parallel. The cloud agent can run tasks with a “best of N” approach (e.g., four attempts simultaneously), allowing the developer to pick the most successful pull request without extensive prompt engineering.
Automated and On-Demand Code Reviews
Once a cloud task is complete, it can be submitted as a pull request. With Codex code review enabled on the repository, the PR is automatically reviewed. The review is not just static analysis; Codex has its own compute environment where it can run code to validate the changes against the PR’s intent.
In an example, Codex reviewed a colleague’s PR and found a subtle edge case. The colleague then tasked Codex with fixing its own comments, generating a new commit to address the issue before the human reviewer even had to look at it.
From Mobile Idea to Pull Request
Inspiration doesn’t always strike at the desk. An anecdote was shared about solving a complex problem—adding a streamable version to a Rust-based parser with a Python wrapper. The developer, not being a Rust expert, outlined the problem and the desired Python interface in the ChatGPT mobile app late at night. By the next morning, Codex had produced a working pull request implementing the feature in Rust, navigating the complex, multi-language codebase successfully.
Best Practices for Maximizing Codex’s Effectiveness
To get the most out of Codex, consider these best practices:
- Structure Your Code for Collaboration: Use monorepos with clearly defined projects and smaller, componentized files. This helps Codex (and humans) work on multiple tasks in parallel without creating massive merge conflicts.
- Adopt an Architect’s Mindset: Think ahead. Delegate tasks you can’t get to immediately. When you find a bug, instead of adding it to a backlog, kick off a cloud task to have Codex start working on a fix.
- Enable Self-Verification: Provide ways for Codex to check its work. A robust test suite, linters, and formatters are invaluable. Codex will use existing tests and even write its own to validate its changes, significantly increasing the quality of its output.
- Use
agents.mdfor Context: Place anagents.mdfile in your repository (and subdirectories for complex projects) to provide Codex with conventions, setup instructions, and guidance on how to run tests or build the project. The CLI includes a/initcommand to autogenerate a starting template for this file. - Create Plans for Complex Tasks: For large-scale changes or migrations, ask Codex to first generate a step-by-step plan in a Markdown file (
plan.md). This allows you to review the “blueprint” and strategy before kicking off the implementation, ensuring the agent stays on track. - Trigger Tasks When Inspiration Strikes: Use the mobile app or web interface to capture ideas and start tasks immediately, turning downtime into productive time.