Uncommitted changes are where mistakes like to hide: half-finished refactors, quick fixes, and edits that never got a second look. Running a Codex review on the current diff helps catch issues early, while the changes are still easy to adjust.
The --uncommitted review targets the pending change set in the current Git repository, typically covering both the index (staged) and working tree (unstaged) diffs. The report surfaces findings with file references and actionable suggestions, making it practical to iterate quickly before committing.
Automated review output is heuristic and should be treated as another signal, not a final verdict. Depending on Codex configuration, diffs and surrounding context may be sent to a remote backend for analysis, so secrets and sensitive content should be removed before running a review. Large, mixed-purpose diffs can also reduce signal-to-noise, so scoping changes improves results.
Steps to review uncommitted changes with Codex:
- Open a terminal in the root of the target Git repository.
$ cd ~/src/example-app
- List the current change set to confirm what the uncommitted review will cover.
$ git status --porcelain=v1 M src/api/client.ts ?? notes/ ?? tests/
- Run Codex against the current uncommitted diff.
$ codex review --uncommitted No correctness issues found in the introduced retry delay helper or accompanying test based on the current changes.
Staging a smaller subset of edits can keep feedback focused when the diff is large.
Uncommitted diffs can contain secrets and credentials, so remove sensitive values before running reviews that may transmit context to a remote backend.
- Save the review output to a file for tracking or sharing.
$ codex review --uncommitted > codex-uncommitted-review.txt
- Print the modified section of a file to confirm the change context.
$ sed -n '1,18p' src/api/client.ts export function requestTimeout(): number { return 30_000; } export function auditLoggingEnabled(): boolean { return true; } export function getRetryDelayMs(attempt: number): number { return attempt * 500; } - Edit the working tree to refine the change if needed.
- Re-run the uncommitted review to confirm the updated results.
$ codex review --uncommitted No correctness issues found in the introduced retry delay helper or accompanying test based on the current changes.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
