# Automatic code reviews with OpenAI Codex

Source: https://www.youtube.com/watch?v=HwbSWVg5Ln4
Recap page: https://rapidrecap.app/video/HwbSWVg5Ln4
Generated: 2025-11-04T18:31:41.496+00:00

---
## Quick Overview

The video demonstrates how to use OpenAI Codex to automate code reviews by training a specialized model to find bugs and suggest improvements within a GitHub workflow, significantly accelerating the review process for complex codebases.

**Key Points:**
- Codex requires two things for effective code review: integration with all developer tools and seamless plugging into all team workflows.
- The team trained a GPT-4 Codex model specifically to find bugs and investigate issues within their codebase, aiming for high precision.
- The model was trained to prioritize finding critical bugs that matter in real life, rather than producing excessive, low-value comments.
- The demonstration shows enabling the "Enable code review" feature in the Codex settings for a specific repository.
- The model can review code changes locally in the terminal or IDE, or remotely in the cloud via the Codex CLI.
- The custom training included specific instructions to guide the model on what style to follow and which types of problems to ignore or flag, enhancing review quality.
- The primary benefit is accelerating the process, allowing developers to ship better and safer products by catching issues before production deployment.

![Screenshot at 01:29: Maya typing the command /review in the terminal to initiate the Codex code review process on the current changes.](https://ss.rapidrecap.app/screens/HwbSWVg5Ln4/00-01-29.png)

**Context:** Romain and Maya, presenters from the alignment team, introduce a research project focused on leveraging AI capabilities, specifically GPT-4 Codex, to enhance software development workflows, primarily through automated code reviews. They highlight that as AI coding agents generate more code, human verification becomes a bottleneck, necessitating an automated solution that integrates well with existing developer tooling like GitHub.

## Detailed Analysis

Romain and Maya detail how they are using GPT-4 Codex to improve code review efficiency. For Codex to be effective, it must work with all developer tools and integrate into existing team workflows. They specifically trained a Codex model on their codebase to find bugs and investigate issues, focusing on high precision to catch critical bugs without generating noise. They show the setup process, which involves navigating to the Code Review settings and enabling the feature for a specific repository, allowing any submitted pull request to be automatically reviewed by Codex. Maya explains that they trained the model with custom guidelines to focus on important issues and ignore minor style or grammatical errors, ensuring the feedback is valuable. The model can be run locally via the terminal or IDE, or remotely via the Codex CLI. This process allows the model to understand the broader codebase context and even review logs, ultimately helping the team ship better and safer products faster by catching issues before they reach production.

### Requirements for Effective Code Review

- Codex needs to work with all developer tools
- Codex needs to plug into all team workflows

### Codex Model Training & Focus

- Model trained specifically to find bugs and investigate issues
- Aimed for very high precision rate against previous models
- Prioritized catching critical bugs that matter in real life

### Enabling Code Review

- Showed enabling the "Enable code review" option in repository settings
- Demonstrated initiating review via the `/review` command in the terminal

### Customizing Review Behavior

- Model trained with custom instructions on style and what to flag/ignore
- Ability to review locally (terminal/IDE) or remotely (CLI)

### Benefits of Automated Review

- Accelerates the process, helps catch bugs before production, allows developers to contribute confidently to unfamiliar code areas

![Screenshot at 00:00: A clapperboard is used to mark the start of the scene titled "Code Review".](https://ss.rapidrecap.app/screens/HwbSWVg5Ln4/00-00-00.png)
![Screenshot at 00:02: A laptop screen displaying code snippets and text, overlaid with the title "Codex Code review".](https://ss.rapidrecap.app/screens/HwbSWVg5Ln4/00-00-02.png)
![Screenshot at 00:06: Romain and Maya introducing themselves while sitting on a couch.](https://ss.rapidrecap.app/screens/HwbSWVg5Ln4/00-00-06.png)
![Screenshot at 01:29: Maya interacting with the Codex interface on a web browser, selecting the "Enable code review" option.](https://ss.rapidrecap.app/screens/HwbSWVg5Ln4/00-01-29.png)
![Screenshot at 01:43: A GitHub Pull Request creation screen showing a title being added.](https://ss.rapidrecap.app/screens/HwbSWVg5Ln4/00-01-43.png)
![Screenshot at 01:47: The GitHub PR interface showing the Codex connector commenting on the PR thread.](https://ss.rapidrecap.app/screens/HwbSWVg5Ln4/00-01-47.png)
![Screenshot at 02:00: The Codex CLI showing available commands like /init, /status, /approvals, and /model.](https://ss.rapidrecap.app/screens/HwbSWVg5Ln4/00-02-00.png)
![Screenshot at 03:14: The GitHub PR view displaying comments from the Codex connector, including suggested changes in a diff view.](https://ss.rapidrecap.app/screens/HwbSWVg5Ln4/00-03-14.png)
![Screenshot at 04:51: A GitHub PR showing a comment from 'codex-vscode' addressing a font size issue and including before/after code comparisons.](https://ss.rapidrecap.app/screens/HwbSWVg5Ln4/00-04-51.png)
![Screenshot at 06:47: The GitHub interface displaying the 'personal/maia contributor guidelines' document, detailing custom review and style guidelines.](https://ss.rapidrecap.app/screens/HwbSWVg5Ln4/00-06-47.png)
