Base-branch reviews are useful before opening a pull request or merging a feature branch because they check the full change set that would land on the target branch. That keeps the review centered on the branch-level diff instead of on one commit or only the uncommitted working tree.
The codex review command supports this workflow with --base <branch>, which reviews the changes between the checked-out branch and the named base branch. In a repository that uses main as the merge target, running codex review --base main from a feature branch asks Codex to assess what that branch would introduce relative to main.
The base branch reference must exist locally, and it should be up to date if you want the review to reflect the latest merge target. Review findings are heuristic rather than authoritative, and depending on your Codex configuration, diff context may be sent to a remote backend for analysis, so remove secrets before running the command.
$ cd ~/src/example-app
$ git branch --show-current feature/retry-delay
$ git branch --list main main
Replace main with the actual merge target in your repository, such as master or a release branch, and update that branch first if it is stale.
$ git diff --stat main...HEAD app.py | 4 ++++ 1 file changed, 4 insertions(+)
$ codex review --base main The patch only adds a small standalone helper and does not introduce any clearly incorrect behavior based on the current codebase and diff. I did not find a discrete, actionable bug that is provably introduced by this change.
Add a short prompt after the command when you want the review to focus on a specific risk, such as backward compatibility or performance.
$ codex review --base main > codex-base-review.txt