Uncommitted work can span the index, the working tree, and files that Git has not tracked yet. Running a Codex review before committing gives the whole in-progress change set another pass while the edits are still easy to fix.
Working-tree review covers staged edits, unstaged edits, and untracked files together. Feedback belongs to the state on disk when the review runs, so later edits can make a finding stale.
The repository needs Git and an installed Codex CLI configured with a working model provider. Review can send the diff and nearby repository context to that provider, so the code and data must be authorized for sharing.
Steps to review uncommitted changes with Codex:
- Confirm that the changed files and nearby repository context may be shared with your configured provider.
A review can send source code and data to that provider. Credentials, private configuration, or customer data require removal from the review environment or authorization before the review starts.
- Check the working tree status in the repository to review.
$ git status --short MM checkout.py ?? receipt.py
MM means checkout.py has both staged and unstaged edits. ?? marks receipt.py as untracked; it is also part of an uncommitted review.
- Inspect the combined tracked changes against the current commit.
$ git diff HEAD diff --git a/checkout.py b/checkout.py index 2edbe7d..708d00d 100644 --- a/checkout.py +++ b/checkout.py @@ -1,3 +1,4 @@ def total_cents(prices, shipping_cents=500): """Return item total plus shipping, in cents.""" - return sum(prices) + shipping_cents + subtotal = sum(prices) + return subtotal - shipping_centsThis comparison includes staged and unstaged tracked changes. Untracked files do not appear in the diff.
- Inspect the contents of each untracked file listed by Git.
$ cat receipt.py from checkout import total_cents def receipt_total(prices): return total_cents(prices)Untracked files can contain private configuration, copied logs, or generated data as well as source code.
- Run the uncommitted review in the terminal.
$ codex review --uncommitted The final working-tree change deducts shipping rather than adding it, producing incorrect checkout and receipt totals whenever shipping is nonzero. Review comment: - [P1] Add shipping to the subtotal instead of subtracting it — /work/example-app/checkout.py:4-4 For any nonzero shipping charge, this subtracts shipping despite the documented contract requiring it to be added. For example, `total_cents([1000])` now returns 500 instead of 1500, undercharging by 1000 cents. The new `receipt_total` wrapper inherits the same incorrect result. Restore addition when calculating the total.
Progress and the final review appear in the terminal. An authentication or execution error requires a successful rerun before the response can be treated as a completed review.
Related: How to check Codex login status
Related: How to fix the Codex trusted-directory error - Check each reported finding against the current source.
$ cat checkout.py def total_cents(prices, shipping_cents=500): """Return item total plus shipping, in cents.""" subtotal = sum(prices) return subtotal - shipping_centsA finding should identify the affected file and lines, explain the triggering condition, and describe the impact. Here, subtracting shipping contradicts the function's documented total and also affects receipt_total(). Findings need human assessment, and no findings does not prove the changes are free of defects. Later edits can make a finding stale.